NetBSD Problem Report #57583
From www@netbsd.org Sun Aug 13 16:58:56 2023
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id DC3CE1A9238
for <gnats-bugs@gnats.NetBSD.org>; Sun, 13 Aug 2023 16:58:56 +0000 (UTC)
Message-Id: <20230813165855.0B7871A923A@mollari.NetBSD.org>
Date: Sun, 13 Aug 2023 16:58:55 +0000 (UTC)
From: abs@absd.org
Reply-To: abs@absd.org
To: gnats-bugs@NetBSD.org
Subject: zpool import will not find pools on disklabel partitions
X-Send-Pr-Version: www-1.0
>Number: 57583
>Category: kern
>Synopsis: zpool import will not find pools on disklabel partitions
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Aug 13 17:00:00 +0000 2023
>Originator: David Brownlee
>Release: netbsd-10
>Organization:
>Environment:
NetBSD forsaken.absd.org 10.0_BETA NetBSD 10.0_BETA (GENERIC) #0: Fri Aug 4 19:55:08 UTC 2023 mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64
>Description:
zpool import only appears to check top level devices - dk0, wd0 etc, not partitions.
I had a single partition zpool using latter part of a disk (wd3e) - I know this is generally discouraged but I needed the space to shuffle things around and I wanted to keep all the data on zfs.
Once created the zpool will happily persist, but if "zpool export"ed, it cannot be imported, unless a new directory is created which contains the necessary partition devices but not the zfs devices:
# zpool export onyx3
# zpool import onyx3
cannot import 'onyx3': no such pool available
# zpool import -d /dev onyx3
cannot import 'onyx3': no such pool available
# mkdir /tmp/dev ; ( cd /tmp/dev ; /dev/MAKEDEV wd3 ) ; zpool import -d /tmp/dev onyx3
# disklabel wd3| tail -6
5 partitions:
# size offset fstype [fsize bsize cpg/sgs]
a: 419430400 2048 RAID # (Cyl. 2*- 416103*)
c: 3907027120 2048 unused 0 0 # (Cyl. 2*- 3876020)
d: 3907029168 0 unused 0 0 # (Cyl. 0 - 3876020)
e: 3487596720 419432448 ccd # (Cyl. 416103*- 3876020)
>How-To-Repeat:
Try to import a zfs pool with one or more components on a disklabel partition
>Fix:
(Contact us)
$NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2023
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.