Re: Vanishing GPT/UFS labels

Warner Losh <[email protected]> Fri, 22 May 2026 22:22:11 -0600
Newsgroups gmane.os.freebsd.devel.hackers
Message-ID <CANCZdfp+3TpedB0OvUDejTPtQdBPBbCNX6guueL1q-V8R_mcrA@mail.gmail.com>
On Fri, May 22, 2026 at 12:53 AM Stéphane Rochoy <
[email protected]> wrote:

> Warner Losh <[email protected]> writes:
>
> > On Thu, May 21, 2026 at 6:46 AM Stéphane Rochoy <
> [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
> - and on umount /dev/gpt/bar should come back.
>

Those details aseem wrong to me...

Warner