From nobody Sun Jan 1 08:35:14 2023 X-Original-To: current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NlC424TQVz1Lm7X for ; Sun, 1 Jan 2023 08:35:14 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NlC423qTjz3ppS; Sun, 1 Jan 2023 08:35:14 +0000 (UTC) (envelope-from danfe@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1672562114; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=5NSshynNv4DifPwjlD9JBmhETnx69uVQPBKPlFxfSMk=; b=mrNqzs/fqrlqV5aNDk5fipQWl8YUwNu0cPmZasQ06fgEUMmG1K/i03kLTDMe6RXdozvooo BKR+qBM+rXzhuQ7m+WBEbEIbVmeiuQ7E+b8eX3zwzfPllYs6b4VK8kzjYjC/QoHOOIEiCB U1cP+oPFV1V/7K4ah/VkXsFlb0d5oSgwUaHxN0/Hi2ACUsUhvphZAmIp+5hcuIKFQu/aBX FcnfByCZyS4zImD3vSik/FZfdI/dkO70f04Af0PUVyxb3LxRCqK0LuD8nt1l260OB6VCik LXHe9F/WalT88zx+1hrlzBVbwSOMjtRb5R5zz+dCjIN6am1yuFYpXVgoeEwoSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1672562114; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=5NSshynNv4DifPwjlD9JBmhETnx69uVQPBKPlFxfSMk=; b=nOFQw3kfHOPJLcV9ebFTaP2XeHKlRrSHllVsrYgZFyVGCbLqDWXL46cxQiITNRY3um3plC XHQuhsSvWSSTJb54sa34/rXP1gKKISGRX6fvzBLl8EZZg7lCuVSLCHpmoib/CfDeLx00zG MWQ9PWdqbdYwZVYAt3UBO/06VElGzEoGjAmXaDV+OuaF59ppuJ3WY60AoOXVWtitsQRo2R BHypog2vAO6p4pRVQ6e9O5Bj6BiAW9JUKND1jomZ7UOlLk18S7DUa0gkpCr0anWMCwMC3s x+u1DefLaHZIX3FFf7w/Pk9ArsGG3zhyiHwisLTvsCu/AO9M+gOd4ZmCgjWeIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1672562114; a=rsa-sha256; cv=none; b=BcXJmekw0Z3aAdfnxSCRdH2BZEan0U5ttQ2CDPzws8sWAYYaYhR5rzT6SURQofDyKxWt9c ZOzfTBeoaUwd/wbeHi3kZzIvA/NJt+0at8HypHXlq81qcDMvKgFooqOGmfqJCShJk1LwZw R5fsdo1FYhY+s68D4MsVoD1fFiGQFJNdgl6OyS4+/4vbJUvKLUIyRZqi6b1cSoJ+7mHY0M uaPIJVoH5xYt4LCHx3juBryKBFXSpguHraXiS7hpzFdkMuyxDrYU5uNgX+klVUZO6htSXE Tr58qohG5mnuPBPHluAE2SmufQA54pzzukABGggW2fFX/jUQS/4qS/wbcth9cA== Received: by freefall.freebsd.org (Postfix, from userid 1033) id 6C0611D12C; Sun, 1 Jan 2023 08:35:14 +0000 (UTC) Date: Sun, 1 Jan 2023 08:35:14 +0000 From: Alexey Dokuchaev To: Warner Losh Cc: FreeBSD Current Subject: Re: Disk partitions disappear when mounting others Message-ID: References: List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-ThisMailContainsUnwantedMimeParts: N On Sun, Dec 25, 2022 at 09:32:55AM -0700, Warner Losh wrote: > On Sun, Dec 25, 2022, 1:02 AM Alexey Dokuchaev 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