created on | January 19, 2022 |
This article describes how several removable media (i.e. portable hard disk, USB sticks) can be mounted at the same mount point, At a certain point of time, of course, only one media of the set of media, that you want to mount under that mount point. An application of this is swapping backup media, i.e. portable hard disks of the same model.
In , multiple entries with different labels or UUIDs pointing to the same mount point do not work. A possible solution is to define the same label to all the devices that are to be mounted at the specific mount point. Predefined, different UUIDs can be assigned to the devices in order to be able to identify the media currently mounted.
When mounting partitions, labels should be preferred over UUIDs anyway, as stated in the the mount man page, section :
" The recommended setup is to use tags (e.g. LABEL=label) rather than /dev/disk/by-{label,uuid,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). "
mount man page, section *Indicating the device*
Define label for partition :
Setting a predefined UUID of the partition :
In , configure the mounting of the partitions with the specified label under the mount point:
mount man page