Re: Disk partitions disappear when mounting others
- In reply to: Warner Losh : "Re: Disk partitions disappear when mounting others"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 01 Jan 2023 08:35:14 UTC
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