Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Jan 2019 04:59:31 +0100
From:      Polytropon <freebsd@edvax.de>
To:        freebsd@dreamchaser.org
Cc:        FreeBSD Mailing List <freebsd-questions@freebsd.org>
Subject:   Re: gpart volume names in /dev?
Message-ID:  <20190128045931.fdd89d9b.freebsd@edvax.de>
In-Reply-To: <c2651ac5-1a03-8ab3-0dde-ab0c6589a24d@dreamchaser.org>
References:  <c2651ac5-1a03-8ab3-0dde-ab0c6589a24d@dreamchaser.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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.

Example:

	/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:

http://www.wonkity.com/~wblock/docs/html/disksetup.html#_the_new_standard_gpt

https://www.freebsd.org/doc/handbook/geom-glabel.html



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190128045931.fdd89d9b.freebsd>