Hi! Unfortunately I faced the similar problem.
What I've done (all through the web ui):
- I had zfs mirror with two 2Tb drives;
- I bought two 4Tb drives, appended one to existing mirror and waited for resilvering, it completed successfully;
- I deattached two 2Tb drives from pool (I think it was a mistake);
- I was trying to append second 4Tb drive to pool as second drive of the mirror, but apparently it wasn't already a mirror. I didn't understand how to do it.
- I found the button to expand pool to full size of 4Tb. I thought it would solve the problem with adding second drive to mirror, since pool was 2Tb, and I was trying to add 4Tb drive. But there was an error, and instead of expand to 4Tb, sole drive was disconnected from pool.
- I had the pool without any drive, and there was a suggestion to append disconnected 4Tb drive to pool as a new drive. But I didn't want to lose data. So I decided to import pool from 4Tb drive, since resilvering was successful.
- Button import showed no pools to import. So I decided to export the empty pool.
- Having no pools, import, the same way, showed no pool to import.
Now I have two 2Tb detached drives with the data, and one 4Tb drive, which wasn't detach, with the data, I hope.
Trying to use
zpool import
from any of three drives failed with an error:
no pools available to import
Code:
bomber@truenas:~$ sudo /usr/sbin/zpool import -D -d /dev/sdb
no pools available to import
bomber@truenas:~$ sudo /usr/sbin/zpool import -D -d /dev/sdc
no pools available to import
bomber@truenas:~$ sudo /usr/sbin/zpool import -D -d /dev/sdd
no pools available to import
bomber@truenas:~$ sudo /usr/sbin/zpool import -D -d /dev/sdd1
no pools available to import
zdb
also wasn't able to help:
Code:
bomber@truenas:~$ sudo /usr/sbin/zdb -l /dev/sdb
failed to unpack label 0
failed to unpack label 1
failed to unpack label 2
failed to unpack label 3
bomber@truenas:~$ sudo /usr/sbin/zdb -l /dev/sdc
failed to unpack label 0
failed to unpack label 1
failed to unpack label 2
failed to unpack label 3
bomber@truenas:~$ sudo /usr/sbin/zdb -l /dev/sdd
failed to unpack label 0
failed to unpack label 1
failed to unpack label 2
failed to unpack label 3
bomber@truenas:~$ sudo /usr/sbin/zdb -l /dev/sdd1
failed to unpack label 0
failed to unpack label 1
failed to unpack label 2
failed to unpack label 3
sgdisk
showed something interesting only for 4Tb drive:
Code:
bomber@truenas:~$ sudo /usr/sbin/sgdisk -p /dev/sdb
Creating new GPT entries in memory.
Disk /dev/sdb: 3907029168 sectors, 1.8 TiB
Model: WDC WD20EARX-00A
Sector size (logical/physical): 512/4096 bytes
Disk identifier (GUID): CE4B77D0-93F4-4143-A0A9-0FFFD905BBCD
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 3907029134
Partitions will be aligned on 2048-sector boundaries
Total free space is 3907029101 sectors (1.8 TiB)
Number Start (sector) End (sector) Size Code Name
bomber@truenas:~$ sudo /usr/sbin/sgdisk -p /dev/sdc
Creating new GPT entries in memory.
Disk /dev/sdc: 3907029168 sectors, 1.8 TiB
Model: WDC WD20EARX-00P
Sector size (logical/physical): 512/4096 bytes
Disk identifier (GUID): B2157331-9163-47FA-BC09-A4897FC80E9A
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 3907029134
Partitions will be aligned on 2048-sector boundaries
Total free space is 3907029101 sectors (1.8 TiB)
Number Start (sector) End (sector) Size Code Name
bomber@truenas:~$ sudo /usr/sbin/sgdisk -p /dev/sdd
Disk /dev/sdd: 7814037168 sectors, 3.6 TiB
Model: WDC WD40EFPX-68C
Sector size (logical/physical): 512/4096 bytes
Disk identifier (GUID): 7BC873C3-B3BA-4776-BB3F-ECB3521CD9E7
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 7814037134
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)
Number Start (sector) End (sector) Size Code Name
1 2048 7814037134 3.6 TiB BF01
bomber@truenas:~$ sudo /usr/sbin/sgdisk -p /dev/sdd1
Creating new GPT entries in memory.
Disk /dev/sdd1: 7814035087 sectors, 3.6 TiB
Sector size (logical/physical): 512/4096 bytes
Disk identifier (GUID): A62B361C-3B24-4B41-BC3D-2A0E70621E67
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 7814035053
Partitions will be aligned on 2048-sector boundaries
Total free space is 7814035020 sectors (3.6 TiB)
Number Start (sector) End (sector) Size Code Name
zpool list
sees only boot drive:
Code:
bomber@truenas:~$ sudo /usr/sbin/zpool list -vL
NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
boot-pool 67G 22.8G 44.2G - - 10% 34% 1.00x ONLINE -
sda3 67.3G 22.8G 44.2G - - 10% 34.0% - ONLINE
The magic with
dd
didn't show anything for both 2Tb detached drive. They apparently don't contain any lables anymore...
Code:
bomber@truenas:~$ sudo dd if=/dev/sdb bs=1M | strings | grep metaslab_shift
^C859+0 records in
858+0 records out
899678208 bytes (900 MB, 858 MiB) copied, 16.1243 s, 55.8 MB/s
bomber@truenas:~$ sudo dd if=/dev/sdc bs=1M | strings | grep metaslab_shift
^C810+0 records in
809+0 records out
848297984 bytes (848 MB, 809 MiB) copied, 14.7885 s, 57.4 MB/s
But there is something in 4Tb drive I found!
Code:
bomber@truenas:~$ sudo dd if=/dev/sdd bs=512 iseek=4096 count=2048 of=/tmp/img.sdd
2048+0 records in
2048+0 records out
1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.0157901 s, 66.4 MB/s
bomber@truenas:~$ sudo /usr/sbin/zdb -l /tmp/img.sdd
------------------------------------
LABEL 0
------------------------------------
version: 28
name: 'Data'
state: 0
txg: 65964494
pool_guid: 839021082166356816
errata: 0
hostid: 901624821
hostname: 'truenas'
top_guid: 6527413099654331064
guid: 6527413099654331064
vdev_children: 1
vdev_tree:
type: 'disk'
id: 0
guid: 6527413099654331064
path: '/dev/disk/by-partuuid/3ac1a818-76a6-420f-be89-69fcc6a3d7c4'
whole_disk: 0
metaslab_array: 30
metaslab_shift: 34
ashift: 12
asize: 2000394125312
is_log: 0
DTL: 4231
create_txg: 4
features_for_read:
labels = 0 1
failed to unpack label 2
failed to unpack label 3
It's remnants of my pool! But I couldn't find offsets to find label 2 and 3.
Please help! How can I restore my data?
I use TrueNAS Scale 23.10.1