gpart volume names in /dev?
freebsd at edvax.de
Mon Jan 28 03:59:55 UTC 2019
On Sun, 27 Jan 2019 19:48:02 -0700, Gary Aitken wrote:
> Once upon a time on a 10.3 system I had entries in /dev corresponding
> to gpart labels. e.g. ada1p2 was listed as hdd-1TB-root. I was then
> able to use those names in fstab, which was handy because I think fstab
> would still work even if the drives were connected differently.
This is correct.
> How does one get gpart labels to show up in /dev?
They should show up automatically as soon as a drive's partitions
have been labeled. When such a partition gets mounted, the label
file in /dev will disappear, this is completely normal. I'm not
sure, but maybe even if you use the device name for mounting,
the label could disappear as the corresponding provider is no
longer available for mounting.
> Can I simply list the label as /dev/hdd-1TB-root (in the above example)
> in fstab and it will happen automagically?
Note that depending on the _kind_ of labels, the entry in /etc/fstab
has to be in a specific format.
/dev/ada1p2 <- device name
/dev/gpt/hdd-1TB-root <- label from gpart
/dev/label/hdd-1TB-root <- label from glabel
/dev/ufsid/1234567890abcdef <- UFS ID
You can find more information here:
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
More information about the freebsd-questions