Differences between revisions 7 and 10 (spanning 3 versions)
Revision 7 as of 2021-06-02 20:05:05
Size: 1852
Comment:
Revision 10 as of 2021-06-02 20:19:05
Size: 2082
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## page was renamed from FileSystemSetup
= File System Setup =
= File Systems =
Line 4: Line 3:
File systems are standards for organizing, maintaining, and accessing data on a disk drive. '''File systems''' are protocols for the organization of data. Compared to commercial operating systems, Linux is compatible with a large number of file systems.
Line 6: Line 5:
See also [[PartitionTablesSetup|this document]] for creating a partition table, and [[FileSystemMounting|this document]] for using a new file system. See also [[PartitionTablesSetup|this document]] for creating a partition table.
Line 14: Line 13:
== Creating File systems == == Setup ==
Line 16: Line 15:
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. Devices are referenced as `sdXN`, where `X` is the relevant interface letter and `N` is the relevant partition number.
Line 20: Line 19:
=== ext2 === === ext2 and ext3 ===
Line 23: Line 22:

----



=== ext3 ===

Don't.

----
Line 38: Line 27:
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:
Run as superuser:
Line 53: Line 40:
----
Line 59: Line 44:
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. The main advantage to FAT32 is it near-universal mount-ability. (Expect issues on a vanilla macOS environment!) The cost is performance, instability, and incompatibility with standard Linux file metadata.
Line 61: Line 46:
On Linux, run as superuser: Run as superuser:
Line 67: Line 52:
----
Line 73: Line 56:
On Linux you can run as superuser: Run as superuser:
Line 81: Line 64:
----



== Usage ==

A file system is used by mounting it as a disk.



=== mount ===

To manually mount a volume, try:

{{{
mount /dev/sdXN /mnt/DIR
}}}

You may need to specify the file system type, using the `--types FSTYPE` option.

If you run into persistent errors, try `fsck /dev/sdXN` to check for file system errors.



=== udisksctl ===

'''udisksctl''' wraps the `udisks` utility to aids in mounting devices.

Run `udisksctl status` to see an overview of all devices. A volume can be mounted or unmounted using `udiscksctl mount -b /dev/sdXN` and `udiscksctl unmount -b /dev/sdXN`,



=== fstab ===

The standard way to mount disks on startup is the '''fstab''' file. See [[Linux/fstab|here]] for details.

File Systems

File systems are protocols for the organization of data. Compared to commercial operating systems, Linux is compatible with a large number of file systems.

See also this document for creating a partition table.


Setup

Devices are referenced as sdXN, where X is the relevant interface letter and N is the relevant partition number.

ext2 and ext3

Don't.

ext4

Run 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 is performance, instability, and incompatibility with standard Linux file metadata.

Run as superuser:

mkfs.vfat /dev/sdXN

MS-DOS

Run as superuser:

mkdosfs /dev/sdXN

But you should also know that mkdosfs is a symlink to mkfs.vfat.


Usage

A file system is used by mounting it as a disk.

mount

To manually mount a volume, try:

mount /dev/sdXN /mnt/DIR

You may need to specify the file system type, using the --types FSTYPE option.

If you run into persistent errors, try fsck /dev/sdXN to check for file system errors.

udisksctl

udisksctl wraps the udisks utility to aids in mounting devices.

Run udisksctl status to see an overview of all devices. A volume can be mounted or unmounted using udiscksctl mount -b /dev/sdXN and udiscksctl unmount -b /dev/sdXN,

fstab

The standard way to mount disks on startup is the fstab file. See here for details.


CategoryRicottone

Linux/FileSystems (last edited 2023-07-19 15:07:39 by DominicRicottone)