Solved Can I mount partitions that has no zpool label?

Hi. Can I mount partitions that has no zpool label?

Code:
% zdb -l /dev/ada0p1
failed to unpack label 0
failed to unpack label 1
failed to unpack label 2
failed to unpack label 3

% zdb -l /dev/ada1p1
failed to unpack label 0
failed to unpack label 1
failed to unpack label 2
failed to unpack label 3
 
Are you sure that's even ZFS? What does gpart show ada0 tell you?
 
They were zfs partitions until I accidentally and blindly ran zpool labelclear on them... I had important data in the partitions and I don't have any backup.
 
Last edited:
I'm guessing that running zpool create with with old label would not just rewrite labels?
I'm assuming it would just result in a new, empty, pool. This isn't like a partition table, recreating that would certainly make the 'old' partitions available again, the data inside those partitions isn't removed when you destroy the partition table. But in this case you're removing ZFS metadata.
 
Thanks SirDice; thats basically what I was thinking.
A quick look at man zpool shows a "zpool initialize" subcommand with the description, which made me wonder.
Code:
     zpool-initialize(8)
             Begins initializing by writing to all unallocated regions on the
             specified devices, or all eligible devices in the pool if no
             individual devices are specified.
 
I am lucky because I could reach to my data with the help of testdisk program. I returned the hard drive back to the ext4 structure that it was in the past and saw the data. I should stay away of zpool labelclear command.
 
Back
Top