Le 29/12/2016 à 22:14, The Wanderer a écrit :
On 2016-12-29 at 15:59, Pascal Hambourg wrote:

Le 29/12/2016 à 16:53, Richard Owlett a écrit :

I added these two lines to /etc/fstab:
/dev/sda7       /media/sda7     ext2    users,rw     0       0
/dev/sda8       /media/sda8     ext2    users,rw     0       0

Don't do that. Really.

1) Don't use drive or partition device names such as /dev/sda7. They are
unreliable. Use persistent identifiers such as UUID or LABEL instead.

How does that work if these are for removable devices (as I think from
past threads may well be the case here),

Then you should use "noauto" so that the system does not try to mount a non-existent filesystem at startup.

and you may be plugging
half-a-dozen different devices into the same port at different times
(and want each one to be mounted to this same place)?

You can use the symlinks in /dev/disk/by-path/ which names are based on the connection path of the device.

AFAIK, both UUID and LABEL are device- or FS-specific. If that's not the
case, I'd be interested to learn about it.

UUID and LABEL are metadata bound to the contents (filesystem or whatever), not to the device. PARTUUID and PARTLABEL are bound to the partitions and usable if the partition scheme (such as GPT), kernel and libblkid support it. You can create several filesystems on separate drives with the same UUID or LABEL, but I would not recommend it.

Reply via email to