I’m an OpenBSD user, but it shouldn’t be hard to translate this to Linux:
If the partition I want to mount is /dev/sd0i
, and sd0’s UID/DUID is 3c6905d2260afe09
, I mount /dev/sd0i
at /3c6905d2260afe09.i
. fstab entry looks like
3c6905d2260afe09.i /3c6905d2260afe09.i ffs rw,whatever_flags 0 0
well diskletters/numbers can change between boots and hardware configurations, and unless you have a good label for the partition, this is the only way I can think of to name your permanent mount points that isn’t problematic/incorrect in some other way. This will always work correctly with any amount of partitions with any amount of disks; and it’s not exactly hard to get the DUID of a disk, at least on OpenBSD. It’s also highly scriptable as such.