Home Explore Blog CI



man-pages

2nd chunk of `mount.man`
c00d5039af9fe90b4ef200ed9252fa07c16c73d1361ae4ef0000000100000fa8
 device and filesystem
       Most devices are indicated by a filename (of a block special device),
       like /dev/sda1, but there are other possibilities. For example, in the
       case of an NFS mount, device may look like knuth.cwi.nl:/dir.

       The device names of disk partitions are unstable; hardware
       reconfiguration, and adding or removing a device can cause changes in
       names. This is the reason why it’s strongly recommended to use
       filesystem or partition identifiers like UUID or LABEL. Currently
       supported identifiers (tags):

       LABEL=label
           Human readable filesystem identifier. See also -L.

       UUID=uuid
           Filesystem universally unique identifier. The format of the UUID is
           usually a series of hex digits separated by hyphens. See also -U.

           Note that mount uses UUIDs as strings. The UUIDs from the command
           line or from fstab(5) are not converted to internal binary
           representation. The string representation of the UUID should be
           based on lower case characters.

       PARTLABEL=label
           Human readable partition identifier. This identifier is independent
           on filesystem and does not change by mkfs or mkswap operations. It’s
           supported for example for GUID Partition Tables (GPT).

       PARTUUID=uuid
           Partition universally unique identifier. This identifier is
           independent on filesystem and does not change by mkfs or mkswap
           operations. It’s supported for example for GUID Partition Tables
           (GPT).

       ID=id
           Hardware block device ID as generated by udevd. This identifier is
           usually based on WWN (unique storage identifier) and assigned by the
           hardware manufacturer. See ls /dev/disk/by-id for more details, this
           directory and running udevd is required. This identifier is not
           recommended for generic use as the identifier is not strictly
           defined and it depends on udev, udev rules and hardware.

       The command lsblk --fs provides an overview of filesystems, LABELs and
       UUIDs on available block devices. The command blkid -p <device> provides
       details about a filesystem on the specified device.

       Don’t forget that there is no guarantee that UUIDs and labels are really
       unique, especially if you move, share or copy the device. Use lsblk -o
       +UUID,PARTUUID to verify that the UUIDs are really unique in your
       system.

       The recommended setup is to use tags (e.g. UUID=uuid) rather than
       /dev/disk/by-{label,uuid,id,partuuid,partlabel} udev symlinks in the
       /etc/fstab file. Tags are more readable, robust and portable. The
       mount(8) command internally uses udev symlinks, so the use of symlinks
       in /etc/fstab has no advantage over tags. For more details see
       libblkid(3).

       The proc filesystem is not associated with a special device, and when
       mounting it, an arbitrary keyword - for example, proc - can be used
       instead of a device specification. (The customary choice none is less
       fortunate: the error message 'none already mounted' from mount can be
       confusing.)

   The files /etc/fstab, /etc/mtab and /proc/mounts
       The file /etc/fstab (see fstab(5)), may contain lines describing what
       devices are usually mounted where, using which options. The default
       location of the fstab(5) file can be overridden with the --fstab path
       command-line option (see below for more details).

       The command

          mount -a [-t type] [-O optlist]

       (usually given in a bootscript) causes all filesystems mentioned in
       fstab (of the proper type and/or having or not having the proper
       options) to be mounted as indicated, except for those whose line
       contains the noauto keyword. Adding the -F option will make mount fork,
       so that the filesystems are mounted in

Title: Device and Filesystem Identification and Configuration Files
Summary
This section discusses how devices and filesystems are identified for mounting, recommending the use of UUIDs and Labels over device names due to their instability. It details various identifiers like LABEL, UUID, PARTLABEL, PARTUUID, and ID, and advises using tags (e.g., UUID=uuid) in /etc/fstab for readability and robustness. It also mentions the files /etc/fstab, /etc/mtab, and /proc/mounts, which store information about mount points and filesystems, and how the `mount -a` command uses /etc/fstab to mount filesystems.