Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Dec 2022 09:32:55 -0700
From:      Warner Losh <imp@bsdimp.com>
To:        Alexey Dokuchaev <danfe@freebsd.org>
Cc:        FreeBSD Current <current@freebsd.org>
Subject:   Re: Disk partitions disappear when mounting others
Message-ID:  <CANCZdfqXhq7XkMDy_aMTfkbsg_D0RjnRDLzUqScwkgQkd=XZ7A@mail.gmail.com>
In-Reply-To: <Y6gDliAtfu0aI5bD@FreeBSD.org>
References:  <Y6gDliAtfu0aI5bD@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000c8b81e05f0a9929f
Content-Type: text/plain; charset="UTF-8"

On Sun, Dec 25, 2022, 1:02 AM Alexey Dokuchaev <danfe@freebsd.org> wrote:

> Hi there,
>
> I'm in the process of moving my data from a dying HDD, and just noticed
> something weird.  It's an MBR partitioned drive, and there is a FreeBSD
> slice and Fedora LVM in EBR, accessible as
> /dev/linux_lvm/fedora-{swap,home,root}.
>
> The problem is that once I mount my old FreeBSD partition, e.g.
> /dev/ada0s2a, those LVM nodes are gone, logging this:
>
>   GEOM_LINUX_LVM: disk pv0 already initialised in fedora
>   GEOM_LINUX_LVM: Disk diskid/DISK-XXXXXXX1s4+00000001 removed from pv0.
>   GEOM_LINUX_LVM: Device linux_lvm/fedora-swap removed.
>   GEOM_LINUX_LVM: Device linux_lvm/fedora-home removed.
>   GEOM_LINUX_LVM: Device linux_lvm/fedora-root removed.
>
> If I unmount /dev/ada0s2a and mount any Fedora's partition, then I can
> longer access other slices as there's only /dev/ada0 remains; ``gpart
> show''
> also does not list them, but only those under diskid/DISK-XXXXXXX1.
>
> Why is this happening?  What should I fix to stop my partitions from
> disappearing and reappearing?


Something has them open. My guess is the Linux lvm geom provider opens too
many things. It's been standard geom behavior to remove the other device
aliases in /dev when one is open.

Though the problem may be in tasting during open since gpart list shows
them gone.

Warner

Thanks,
>
> ./danfe
>
>

--000000000000c8b81e05f0a9929f
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto"><div><br><br><div class=3D"gmail_quote"><div dir=3D"ltr" =
class=3D"gmail_attr">On Sun, Dec 25, 2022, 1:02 AM Alexey Dokuchaev &lt;<a =
href=3D"mailto:danfe@freebsd.org">danfe@freebsd.org</a>&gt; wrote:<br></div=
><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1=
px #ccc solid;padding-left:1ex">Hi there,<br>
<br>
I&#39;m in the process of moving my data from a dying HDD, and just noticed=
<br>
something weird.=C2=A0 It&#39;s an MBR partitioned drive, and there is a Fr=
eeBSD<br>
slice and Fedora LVM in EBR, accessible as /dev/linux_lvm/fedora-{swap,home=
,root}.<br>
<br>
The problem is that once I mount my old FreeBSD partition, e.g.<br>
/dev/ada0s2a, those LVM nodes are gone, logging this:<br>
<br>
=C2=A0 GEOM_LINUX_LVM: disk pv0 already initialised in fedora<br>
=C2=A0 GEOM_LINUX_LVM: Disk diskid/DISK-XXXXXXX1s4+00000001 removed from pv=
0.<br>
=C2=A0 GEOM_LINUX_LVM: Device linux_lvm/fedora-swap removed.<br>
=C2=A0 GEOM_LINUX_LVM: Device linux_lvm/fedora-home removed.<br>
=C2=A0 GEOM_LINUX_LVM: Device linux_lvm/fedora-root removed.<br>
<br>
If I unmount /dev/ada0s2a and mount any Fedora&#39;s partition, then I can<=
br>
longer access other slices as there&#39;s only /dev/ada0 remains; ``gpart s=
how&#39;&#39;<br>
also does not list them, but only those under diskid/DISK-XXXXXXX1.<br>
<br>
Why is this happening?=C2=A0 What should I fix to stop my partitions from<b=
r>
disappearing and reappearing?</blockquote></div></div><div dir=3D"auto"><br=
></div><div dir=3D"auto">Something has them open. My guess is the Linux lvm=
 geom provider opens too many things. It&#39;s been standard geom behavior =
to remove the other device aliases in /dev when one is open.=C2=A0</div><di=
v dir=3D"auto"><br></div><div dir=3D"auto">Though the problem may be in tas=
ting during open since gpart list shows them gone.=C2=A0</div><div dir=3D"a=
uto"><br></div><div dir=3D"auto">Warner</div><div dir=3D"auto"><br></div><d=
iv dir=3D"auto"><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote=
" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> =
Thanks,<br>
<br>
./danfe<br>
<br>
</blockquote></div></div></div>

--000000000000c8b81e05f0a9929f--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfqXhq7XkMDy_aMTfkbsg_D0RjnRDLzUqScwkgQkd=XZ7A>