I have a 3-way mirrored ZFS pool configured for backup purposes, alongside a ZFS-on-root pool that my system utilizes. All hard drives in the setup have GPT labels. Recently, I encountered an issue where ada0p1 was missing its label when I ran the
After executing these commands, the label has been successfully restored, and the output from
As you can see, ada0p1 is now recognized as gpt/wdc0.
I would like to perform a similar operation for my zroot pool, which currently shows the following status:
The partition nda0p3 has a label of gpt/zfs0, but it's missing from the /dev/gpt directory:
My question is: how can I import the zroot pool with the
Thank you for your help!
zpool status
command. Fortunately, I managed to recover the label using the following commands:
Code:
# zpool export tank
# gpart modify -i 1 -l wdc0 ada0 # (Not sure if this step was necessary)
# zpool import -d /dev/gpt tank
After executing these commands, the label has been successfully restored, and the output from
zpool status
is as follows:
Code:
# zpool status
pool: tank
state: ONLINE
scan: resilvered 1.32M in 00:00:01 with 0 errors on Mon Sep 30 18:00:05 2024
remove: Removal of vdev 2 copied 1.63G in 0h0m, completed on Sun Sep 15 20:54:16 2024
5.53K memory used for removed device mappings
config:
NAME STATE READ WRITE CKSUM
tank ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
gpt/wdc0 ONLINE 0 0 0
gpt/toshiba0 ONLINE 0 0 0
gpt/hgst0 ONLINE 0 0 0
I would like to perform a similar operation for my zroot pool, which currently shows the following status:
Code:
# zpool status zroot
pool: zroot
state: ONLINE
config:
NAME STATE READ WRITE CKSUM
zroot ONLINE 0 0 0
nda0p3.eli ONLINE 0 0 0
The partition nda0p3 has a label of gpt/zfs0, but it's missing from the /dev/gpt directory:
Code:
# gpart show -l nda0
=> 40 500118112 nda0 GPT (238G)
40 204800 1 efiboot0 (100M)
204840 67108864 2 swap0 (32G)
67313704 432804448 3 zfs0 (206G)
My question is: how can I import the zroot pool with the
-d
parameter while the system is running? I would like to see the gpt/zfs0 label instead of the partition name in the output of zpool status
. For reference, I am using GELI for the zroot pool.Here’s what’s currently listed in my /dev/gpt/ directory:
Code:
# ls /dev/gpt/
efiboot0 hgst0 toshiba0 wdc0
Thank you for your help!