From nobody Tue Nov 28 22:26:28 2023 X-Original-To: stable@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 4SfxrV6cDBz52frr for ; Tue, 28 Nov 2023 22:26:34 +0000 (UTC) (envelope-from SRS0=hzR4=HJ=quip.cz=000.fbsd@elsa.codelab.cz) Received: from elsa.codelab.cz (elsa.codelab.cz [94.124.105.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4SfxrV2yMdz3Pf8 for ; Tue, 28 Nov 2023 22:26:34 +0000 (UTC) (envelope-from SRS0=hzR4=HJ=quip.cz=000.fbsd@elsa.codelab.cz) Authentication-Results: mx1.freebsd.org; none Received: from elsa.codelab.cz (localhost [127.0.0.1]) by elsa.codelab.cz (Postfix) with ESMTP id 2BA63D789A; Tue, 28 Nov 2023 23:26:32 +0100 (CET) Received: from [192.168.145.49] (ip-89-177-27-225.bb.vodafone.cz [89.177.27.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by elsa.codelab.cz (Postfix) with ESMTPSA id 74777D788C; Tue, 28 Nov 2023 23:26:28 +0100 (CET) Message-ID: <6b713a9c-c778-45fb-9626-9ad05df28d50@quip.cz> Date: Tue, 28 Nov 2023 23:26:28 +0100 List-Id: Production branch of FreeBSD source code List-Archive: https://lists.freebsd.org/archives/freebsd-stable List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Missing disk partition devices and GPT lables in /dev/ Content-Language: cs-Cestina, en-US To: stable@freebsd.org References: <34a54774-004d-40de-bf0d-2985da5bc908@quip.cz> From: Miroslav Lachman <000.fbsd@quip.cz> Cc: Warner Losh In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:42000, ipnet:94.124.104.0/21, country:CZ] X-Rspamd-Queue-Id: 4SfxrV2yMdz3Pf8 On 28/11/2023 20:55, Warner Losh wrote: > > The problem is a geom design point. When you have multiple aliases that > you can open, the others are removed from the filesystem view when one > is opened. It looks like from the above that the mirror-0 was created > with the diskid, so that's the device that zfs opens, leaving the ada2 > devices removed. No I really didn't use diskids for pool creation. Those diskids are too long to type. :) That's why I explicitly post about commands I used: > # zpool create -m none sys mirror ada2p3 ada3p3 > > # zpool create -m none tank1 mirror ada2p5 ada3p5 I understand that "some" aliases are hidden when other style of aliases were used but I never see ada0pX missing even if gpt labels are used. Also partition p4 prepared for swap was not used by any name style / alias so I expect to see it there but it is not there. ANd the behavior is the exact opposite - when I now tried to create swap with diskids, /dev/gpt/ directory was instantly created a populated with gpt label aliases: # gmirror label -F -h gmGswap0 /dev/diskid/DISK-Z3010G8Vp4 /dev/diskid/DISK-Z302YC90p4 # ll /dev/gpt/ total 0 crw-r----- 1 root operator 0xf9 Nov 28 23:22 swapC90 crw-r----- 1 root operator 0x115 Nov 28 23:22 swapG8V This is normal example from another machine with similar setup: # ls -1 /dev/ada* /dev/ada0 /dev/ada0p1 /dev/ada0p2 /dev/ada0p3 /dev/ada1 /dev/ada1p1 /dev/ada1p2 /dev/ada1p3 /dev/ada2 /dev/ada2p2 /dev/ada3 /dev/ada3p2 # ls -1 /dev/gpt/ boot0 boot1 disk0tank0 disk1tank0 ssd0tank1 ssd1tank1 swap0 swap1 # zpool list -v NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT ssdtank1 199G 51.4G 148G - - 75% 25% 1.00x ONLINE - mirror-0 199G 51.4G 148G - - 75% 25.8% - ONLINE gpt/ssd0tank1 200G - - - - - - - ONLINE gpt/ssd1tank1 200G - - - - - - - ONLINE tank0 1.80T 714G 1.10T - - 52% 38% 1.00x ONLINE - mirror-0 1.80T 714G 1.10T - - 52% 38.8% - ONLINE gpt/disk0tank0 1.81T - - - - - - - ONLINE gpt/disk1tank0 1.81T - - - - - - - ONLINE As you can see there are aliases in /dev/gpt/, there are partitions for /dev/adaX devices and the pools are made of gpt labels. This is what I expect from the system in my first post. I will try to disable disk_ident as suggested by Freddie Cash. Kind regards Miroslav Lachman