On Fri, 19 Jan 2024, Tomas Kuchta wrote:

The solution is simple, do not use device names such as /dev/sdx or labels
pairing said device names to labels. Those solutions are not reliable for
pluggable devices such as USB/TB drives.

Tomas,

The MediaSonic Probox is permanently plugged into a USB port on the host.
It's not in-and-out like thumb drives.

It is obvious that you prefer the 3-4 letter device names. If you change
your mind, and start prioritizing reliability - use UUIDs directly instead.

I guess you've not read my previous threads nor this one. I used the UUIDs
for two of the Probox drives, but in /etc/fstab I cannot determine which
drive each is. I thought that labels worked with all block storage devices,
not only those internal to a host.

The fstab man page says, in part,

"LABEL=<label> or UUID=<uuid> may be given instead of a device name. This is
the recommended method, as device names are often a coincidence of hardware
detection order, and can change when other disks are added or removed. For
example, `LABEL=Boot' or `UUID=3e6be9de-8139-11d1-9106-a43f08d823a6'. (Use a
filesystem-specific tool like e2label(8), xfs_admin(8), or fatlabel(8) to
set LABELs on filesystems).

"It's also possible to use PARTUUID= and PARTLABEL=. These partitions
identifiers are supported for example for GUID Partition Table (GPT)."

I also no not see if I could add a comment after a UUID entry so I know
which drive it is.

My web searches for 'mounting external drives in fstab using labels' finds
nothing pertinent.

I suppose that your solution is that I create a text file with either the
drive UUID or the partition UUID and the name of the device in non-sysadmin
English.

Rich

Reply via email to