Re: Vanishing GPT/UFS labels
Mark Millard <[email protected]> Tue, 26 May 2026 08:37:03 -0700
| Newsgroups | gmane.os.freebsd.devel.hackers |
|---|---|
| Message-ID | <[email protected]> |
On 5/22/26 21:22, Warner Losh wrote: > > > On Fri, May 22, 2026 at 12:53 AM Stéphane Rochoy > <[email protected] <mailto:[email protected]>> > wrote: > > Warner Losh <[email protected] <mailto:[email protected]>> writes: > > > On Thu, May 21, 2026 at 6:46 AM Stéphane Rochoy > <[email protected] > <mailto:[email protected]>> wrote: > > … > > When I mount using the underlying device, /dev/${md}p2, both > > /dev/gpt/bar and /dev/ufs/bar vanish. And when I umount (using > the mount > > point) both are back. > > > > When I mount using the UFS label, /dev/ufs/bar, only /dev/gpt/bar > > vanish. And when I umount the GPT label don't come back. > > > > GEOM don't seems to agree with itself: `gpart show -l $md` do > confirm both > > partitions kept their GPT label but `glabel status` don't: > > > > $ gpart show -l $md > > => 40 204720 md0 GPT (100M) > > 40 20480 1 foo (10M) > > 20520 184240 2 bar (90M) > > $ glabel status | grep -e foo -e bar > > gpt/foo N/A md0p1 > > ufs/bar N/A md0p2 > > > > I would be happy to hunt what looks like bugs to me but I need some > > insight first: what is the rationale behind the idea to remove a > device > > on mount and, possibly, restore it on umount? > > > > This sounds like the intentional behavior of geom to withdraw the > > devices when aliases are mounted. > > So what I observe when mounting/umounting via the underlying device > (/dev/${md}p2) is the expected behavior. > > But there's some problems when mounting/umounting via the UFS label > (/dev/ufs/bar): > - on mount, /dev/ufs/bar should vanish too [I disagree about the above: The device-name independent naming in use needs to survive for use in my view. For example: avoid the variability for da* naming that can occur with multiple da* devices present.] I am actually writing just about the below. > - and on umount /dev/gpt/bar should come back. > > > Those details aseem wrong to me... I can replicate the umount not restoring /dev/gpt/* on main: # gpart show -pl /dev/nda1 => 40 2930277095 nda1 GPT (1.4T) 40 2008 - free - (1004K) 2048 532480 nda1p1 FBSDFSSDefi (260M) 534528 1562624 - free - (763M) 2097152 2919235584 nda1p2 FBSDFSSDroot (1.4T) 2921332736 7340032 nda1p3 HyperVswp3p5 (3.5G) 2928672768 1604367 - free - (783M) # tunefs -p /dev/gpt/FBSDFSSDroot 2>&1 | grep "volume label" tunefs: volume label: (-L) FBSDFSSDufs # ls -C1 /dev/*/F* /dev/gpt/FBSDFSSDefi /dev/gpt/FBSDFSSDroot /dev/ufs/FBSDFSSDufs # mount -onoatime /dev/ufs/FBSDFSSDufs /mnt # ls -C1 /dev/*/F* /dev/gpt/FBSDFSSDefi /dev/ufs/FBSDFSSDufs # umount /mnt # ls -C1 /dev/*/F* /dev/gpt/FBSDFSSDefi /dev/ufs/FBSDFSSDufs # glabel load # ls -C1 /dev/*/F* /dev/gpt/FBSDFSSDefi /dev/ufs/FBSDFSSDufs If this is wrong, then maybe a bugzilla should be submitted. > > Warner -- === Mark Millard marklmi at yahoo.com