Size: 1957
Comment:
|
Size: 2880
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
## page was renamed from SetupFileSystem | |
Line 5: | Line 4: |
You may need to take a step back and look at [[PartitionTablesSetup|creating a partition table first]]. <<TableOfContents>> |
|
Line 10: | Line 13: |
== Managing File Systems == | == Mounting File Systems == |
Line 18: | Line 21: |
On a Linux system, `/etc/fstab` informs on what drives should be mounted and with what options. This configuration file is structured as: | On a Linux system, `/etc/fstab` informs on what volumes should be mounted and with what options. This configuration file is structured as: |
Line 41: | Line 44: |
Henceforward you will see reference to `sdXN`, where you should understand that `X` needs to be replaced with the relevant letter and `N` with the relevant number. You should also understand how to find that relevant letter and number combination, and the risks of finding the incorrect letter or number. |
|
Line 69: | Line 74: |
# mkfs.ext4 /dev/sde1 | mkfs.ext4 /dev/sdXN |
Line 76: | Line 81: |
/dev/sda5 /var ext4 defaults,noatime 0 0 | /dev/sdXN /var ext4 defaults,noatime 0 0 |
Line 78: | Line 83: |
---- === FAT32 === The main advantage to FAT32 is it near-universal mount-ability. (Expect issues on a vanilla macOS environment!) The cost of getting that is steep though. Expect much slower performance, greater instability, and incompatibility with standard Linux file metadata. On Linux, run as superuser: {{{ mkfs.vfat /dev/sdXN }}} ---- === MS-DOS === On Linux you can run as superuser: {{{ mkdosfs /dev/sdXN }}} But you should also know that `mkdosfs` is a symlink to `mkfs.vfat`. |
File System
File systems are standards for organizing, maintaining, and accessing data on a disk drive. This will not be a crosswalk of file systems.
You may need to take a step back and look at creating a partition table first.
Mounting File Systems
fstab
On a Linux system, /etc/fstab informs on what volumes should be mounted and with what options. This configuration file is structured as:
# <device> <dir> <type> <options> <dump> <fsck> UUID=f9fe0b69-a280-415d-a03a-a32752370dee none swap defaults 0 0
Spacing between columns is arbitrary. The <dir> column is the mount point, while the <type> column indicates file system type.
The <fsck> column is used by the fsck utility, and enables boot-time filesystem checks.
0 disables checks.
1 runs corrections based on checks. This is important for the root device.
2 forces reboot on error.
The <options> column can contain any of: noatime (do not write access times), noauto (do not wait on fsck), nofail (do not indicate errors if unavailable), and so on.
The <dump> column is used by the dump utility--if you don't need that utility (and most people don't), set it to 0.
Creating File systems
Henceforward you will see reference to sdXN, where you should understand that X needs to be replaced with the relevant letter and N with the relevant number. You should also understand how to find that relevant letter and number combination, and the risks of finding the incorrect letter or number.
ext2
Don't.
ext3
Seriously. Don't.
ext4
If you are creating ext4 file systems, you probably are using Linux. Therefore, let's assume you have the Linux toolset available.
Running as superuser:
mkfs.ext4 /dev/sdXN
Consider disabling access time on secondary and storage drives. Setting this metadata isn't always helpful and carries a speed cost.
# <device> <dir> <type> <options> <dump> <fsck> /dev/sdXN /var ext4 defaults,noatime 0 0
FAT32
The main advantage to FAT32 is it near-universal mount-ability. (Expect issues on a vanilla macOS environment!) The cost of getting that is steep though. Expect much slower performance, greater instability, and incompatibility with standard Linux file metadata.
On Linux, run as superuser:
mkfs.vfat /dev/sdXN
MS-DOS
On Linux you can run as superuser:
mkdosfs /dev/sdXN
But you should also know that mkdosfs is a symlink to mkfs.vfat.