ZFS ZPool Import Fails

sudo parted /dev/sda
GNU Parted 3.5
Using /dev/sda
Welcome to GNU Parted! Type ‘help’ to view a list of commands.
(parted) p
Error: /dev/sda: unrecognised disk label
Model: ATA ST6000VN001-2BB1 (scsi)
Disk /dev/sda: 6001GB
Sector size (logical/physical): 512B/4096B
Partition Table: unknown
Disk Flags:

Unfortunately, running rescue yielded the following result:
(parted) rescue 2K 6T
Error: /dev/sda: unrecognised disk label

I also tried this with /dev/sdb and /dev/sde but received the same error:
sudo parted /dev/sdb
GNU Parted 3.5
Using /dev/sdb
Welcome to GNU Parted! Type ‘help’ to view a list of commands.
(parted) p
Error: /dev/sdb: unrecognised disk label
Model: ATA ST6000VN001-2BB1 (scsi)
Disk /dev/sdb: 6001GB
Sector size (logical/physical): 512B/4096B
Partition Table: unknown
Disk Flags:
(parted) rescue
Error: /dev/sdb: unrecognised disk label

sudo parted /dev/sde
GNU Parted 3.5
Using /dev/sde
Welcome to GNU Parted! Type ‘help’ to view a list of commands.
(parted) p
Error: /dev/sde: unrecognised disk label
Model: ATA ST6000VN001-2BB1 (scsi)
Disk /dev/sde: 6001GB
Sector size (logical/physical): 512B/4096B
Partition Table: unknown
Disk Flags:
(parted) rescue
Error: /dev/sde: unrecognised disk label

This forum thread ([SOLVED] Deleted partition table on drive, how to rescue? / Newbie Corner / Arch Linux Forums) makes it seem like running mklabel might solve this issue?

In case it helps, here’s the result for /dev/sdd and /dev/sdf:

sudo parted /dev/sdd
GNU Parted 3.5
Using /dev/sdd
Welcome to GNU Parted! Type ‘help’ to view a list of commands.
(parted) p
Model: ATA ST8000NT001-3LZ1 (scsi)
Disk /dev/sdd: 8002GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 1049kB 2149MB 2147MB swap
2 2150MB 8002GB 7999GB zfs

sudo parted /dev/sdf
GNU Parted 3.5
Using /dev/sdf
Welcome to GNU Parted! Type ‘help’ to view a list of commands.
(parted) p
Model: ATA ST8000NT001-3LZ1 (scsi)
Disk /dev/sdf: 8002GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 1049kB 2149MB 2147MB swap
2 2150MB 8002GB 7999GB zfs

Actually for the case in that example, the answer was to use sgdisk to recover the primary partition table which was zapped using the backup partition table at the end of the disk. It would have been easy-peasy to do this.

But judging by this example alone mklabel might do the trick (i.e. not do any damage to a potentially recoverable drive) - but that is a guess on my part rather than an expert opinion.

Any ideas what label would be best to use with the mklabel command? That’s how I’m reading that thread; that you specify the label you want assigned to the device.

sudo parted /dev/sda help mklabel

sudo parted /dev/sdx mklabel gpt

1 Like

Here are the results. Unless I’m mistaken, I don’t believe parted found any data to rescue on sda, sdb, or sde:

sudo parted /dev/sda
GNU Parted 3.5
Using /dev/sda
Welcome to GNU Parted! Type ‘help’ to view a list of commands.
(parted) p
Error: /dev/sda: unrecognised disk label
Model: ATA ST6000VN001-2BB1 (scsi)
Disk /dev/sda: 6001GB
Sector size (logical/physical): 512B/4096B
Partition Table: unknown
Disk Flags:
(parted) rescue
Error: /dev/sda: unrecognised disk label

sudo parted /dev/sda mklabel gpt
Information: You may need to update /etc/fstab.

sudo parted /dev/sda
GNU Parted 3.5
Using /dev/sda
Welcome to GNU Parted! Type ‘help’ to view a list of commands.
(parted) p
Model: ATA ST6000VN001-2BB1 (scsi)
Disk /dev/sda: 6001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags

(parted) rescue 2K 6T
(parted) p
Model: ATA ST6000VN001-2BB1 (scsi)
Disk /dev/sda: 6001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags

sudo parted /dev/sdb
GNU Parted 3.5
Using /dev/sdb
Welcome to GNU Parted! Type ‘help’ to view a list of commands.
(parted) p
Error: /dev/sdb: unrecognised disk label
Model: ATA ST6000VN001-2BB1 (scsi)
Disk /dev/sdb: 6001GB
Sector size (logical/physical): 512B/4096B
Partition Table: unknown
Disk Flags:
(parted) mklabel gpt
(parted) p
Model: ATA ST6000VN001-2BB1 (scsi)
Disk /dev/sdb: 6001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags

(parted) rescue 2K 6T
(parted) p
Model: ATA ST6000VN001-2BB1 (scsi)
Disk /dev/sdb: 6001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags

sudo parted /dev/sde
GNU Parted 3.5
Using /dev/sde
Welcome to GNU Parted! Type ‘help’ to view a list of commands.
(parted) p
Error: /dev/sde: unrecognised disk label
Model: ATA ST6000VN001-2BB1 (scsi)
Disk /dev/sde: 6001GB
Sector size (logical/physical): 512B/4096B
Partition Table: unknown
Disk Flags:
(parted) mklabel gpt
(parted) p
Model: ATA ST6000VN001-2BB1 (scsi)
Disk /dev/sde: 6001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags

(parted) rescue
Start? 2K
End? 6T
(parted) p
Model: ATA ST6000VN001-2BB1 (scsi)
Disk /dev/sde: 6001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags

At this point we have two choice to recover the partition(s).

  1. Guess whether there was a swap file, guess at the size(s) (good chance of getting it wrong).

  2. Pick an empty disk to sacrifice and create a non-mirrored ZFS pool on it in order to find out what partitions we should put back on the other two disks.

Once we have defined partitions, we need to try setting the UUID on one of them and see whether the pool will import. If not we need to change that UUID to something random and try the missing UUID on another disk. If we do this 3 times and it doesn’t work then I am out of ideas.

You will need to research how to do the above - then check out what you plan to do here before you do it. This is the last chance and if you do something silly you will decrease the already small chance of getting your data back.

Sorry I can’t help more - but I am caring for my wife who is just out of hospital.