I believe I have a failing drive, but was able to use dd to dump the unencrypted contents of the device into another larger ZFS volume. I am trying to import the pool through the file, but am unable:
The failing pool was z_1000.1 and the pool in which I was able to dump the unencrypted contents is z_3000.1.
I also tried renaming the file to z_1000_1_geli to see if the '.' was problematic, but that made no difference:
I also ran zdb -l z_1000_1_geli and it returned 0 indicating to me that a valid label was found.
I came across zhack label to attempt to repair labels:
But, it did not appear to help.
serverfault.com
docs.oracle.com
zpool import -d /z_3000.1/z_1000.1.geli
The failing pool was z_1000.1 and the pool in which I was able to dump the unencrypted contents is z_3000.1.
I also tried renaming the file to z_1000_1_geli to see if the '.' was problematic, but that made no difference:
zpool import -d .
pool: z_1000.1
id: 6958346380830492025
state: UNAVAIL
status: One or more devices are missing from the system.
action: The pool cannot be imported. Attach the missing
devices and try again.
see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-3C
config:
z_1000.1 UNAVAIL insufficient replicas
mirror-0 UNAVAIL insufficient replicas
/z_3000.1/z_1000_1_geli UNAVAIL invalid label
16719197543973587382 UNAVAIL cannot open
da0.elip1 UNAVAIL cannot open
I also ran zdb -l z_1000_1_geli and it returned 0 indicating to me that a valid label was found.
I came across zhack label to attempt to repair labels:
zhack label repair -cu z_1000_1
But, it did not appear to help.
Calculated filesize to be 1000204881920
error: label 0: UB TXG of 0 expected, but got 22168640
It would appear the device was not properly removed.
error: label 1: UB TXG of 0 expected, but got 22168640
It would appear the device was not properly removed.
error: label 2: UB TXG of 0 expected, but got 22168640
It would appear the device was not properly removed.
error: label 3: UB TXG of 0 expected, but got 22168640
It would appear the device was not properly removed.
label 0: uberblock: skipped checksum: skipped
label 1: uberblock: skipped checksum: skipped
label 2: uberblock: skipped checksum: skipped
label 3: uberblock: skipped checksum: skipped
How can one recover/write a label (clone existing one)?
ZFS stores 4 labels, 2 at the beginning of a device, 2 at the end. When they are corrupted a pool cannot be mounted. I had a case of 3 broken labels (failed to unpack), but 1 was still intact. I co...