Hi Corinna,
Corinna Vinschen wrote:
Hi Christian,
On second thought...
I had a bad night tonight and was thinking a long time about this and
that. It suddenly occured to me that there might be another problem
with this approach, attaching ordinals to the label name.
Assuming you have a single filesystem labled "VOLUME" which is on a
fixed disk. So you get something like this:
$ ls -l /dev/disk/by-label
total 0
lrwxrwxrwx 1 corinna vinschen 0 Nov 22 10:09 VOLUME -> ../../sdb1
lrwxrwxrwx 1 corinna vinschen 0 Nov 22 10:10 root -> ../../sda3
Now you insert an USB Stick with a FAT32 filesystem, also labeled
"VOLUME". Now you get something like this:
$ ls -l /dev/disk/by-label
total 0
lrwxrwxrwx 1 corinna vinschen 0 Nov 22 10:12 'VOLUME#0' -> ../../sdb1
lrwxrwxrwx 1 corinna vinschen 0 Nov 22 10:12 'VOLUME#1' -> ../../sdc1
lrwxrwxrwx 1 corinna vinschen 0 Nov 22 10:10 root -> ../../sda3
So the label name changes, depending on inserting or removing another
partition.
This is intentional. If the first duplicate appears, it is IMO better to
also replace the original name to show that a duplicate exists.
Not saying I have a good solution myself, so I wonder if we should just
let it slip, but I thought we should at least talk about it...
Users should be aware that unspecific label names like VOLUME could not
be used as a persistent link if drives are changed.
Same may apply to by-partuuid names as preformatted SD-cards and USB
flash drives may have a null MBR serial number.
Regards,
Christian