On Thu 07 Mar 2019 at 13:49:42 (-0700), Cousin Stanley wrote: > David Wright wrote: > > > I prefer to populate fstab with canonical information > > that actually belongs to the filesystems that are to be mounted. > > I don't understand what you're saying here. > > Does a disk label not belong to a filesystem > that is to be mounted ?
Yes. Using a concrete example from /etc/fstab, in: LABEL=sand1g /media/camera1g vfat rw,errors=remount-ro,utf8,tz=UTC,shortname=lower,user,noauto,fmask=137,dmask=027 the characters sand1g have been written in the partition on the device, an SD card. (The fact that they're lowercase means that it's unlikely I wrote that LABEL in DOS or Windows.) But were I to have put in /etc/fstab: /dev/disk/by-label/sand1g /media/camera1g vfat rw,errors=remount-ro,utf8,tz=UTC,shortname=lower,user,noauto,fmask=137,dmask=027 I would not expect to find the characters /dev/disk/by-label/ anywhere in the partition. That string belongs to the linux system, not to the card. That's what I meant by "actually belongs to the filesystems". > > A filesystem that has a label, > > has that label regardless of any OS. > > > > It's real, defined in the filesystem's documentation. > > > > All that stuff in /dev/disk/ is just an ephemeral > > bunch of convenient symbolic links, presumably conjured > > up by udev or somesuch, if not the linux kernel > > But are they not accurate after boot > for particular disks on a particular machine ? I don't question its accuracy. > > I'm not clear about which other sort of label > > might be referenced by LABEL= > > I'm not either but if I use /dev/disk/by-label > I think I know what sort that is .... :) OK, I thought you had something in mind. BTW, in looking at man mount (to remind myself of the -L option), I noticed that it actually mentions this business: "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." Cheers, David.