Date: Sun, 1 Jan 2023 08:35:14 +0000 From: Alexey Dokuchaev <danfe@freebsd.org> To: Warner Losh <imp@bsdimp.com> Cc: FreeBSD Current <current@freebsd.org> Subject: Re: Disk partitions disappear when mounting others Message-ID: <Y7FFwgBzWuO4fgdi@FreeBSD.org> In-Reply-To: <CANCZdfqXhq7XkMDy_aMTfkbsg_D0RjnRDLzUqScwkgQkd=XZ7A@mail.gmail.com> References: <Y6gDliAtfu0aI5bD@FreeBSD.org> <CANCZdfqXhq7XkMDy_aMTfkbsg_D0RjnRDLzUqScwkgQkd=XZ7A@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Dec 25, 2022 at 09:32:55AM -0700, Warner Losh wrote: > On Sun, Dec 25, 2022, 1:02 AM Alexey Dokuchaev <danfe@freebsd.org> wrote: > > ... > > 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. Well, yeah, but it's weird to see that on a detached harddrive. It's not like it's still opened under another operating system, I'm simply mounting existing partitions one by one to move my data to a new SSD. > Though the problem may be in tasting during open since gpart list shows > them gone. I've found out that putting either geom_linux_lvm_load="YES" or kern.geom. label.disk_ident.enable=0 in /boot/loader.conf remedies the problem. Just in case someone encounters the same issue. When I was still booting off this disk, I had geom_linux_lvm_load="YES" so that's probably why it did not bite me before. ./danfe
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Y7FFwgBzWuO4fgdi>