Help! two machines ran out of swap and corrupted their zpools!

Volodymyr Kostyrko arcade at b1t.name
Tue Nov 22 14:35:39 UTC 2016


Pete French wrote:
>> zpool import -N -O readonly=on -f -R /mnt/somezpoool
>>
>> If that doesn't help try:
>>
>> zpool import -N -O readonly=on -f -R /mnt/somezpoool -Fn
>
> I got someone to do this (am still having toruble finding time
> as am supposed to be off sick) and it causes instant kernel panic
> on trying to import the pool. Same as it does on boot.

Instapanic, huh...

Ok, let's put documentation aside and focus on unsupported development 
features.

You'll need a list of available transactions:

zdb -ul <vdev>

This one when given a vdev lists all uberblocks with their respective 
transaction ids. You can take the highest one (it's not the last one) 
and try to mount pool with:

zpool import -N -O readonly=on -f -R /mnt/somezpool -F -T 
<transaction_id> <pool>

Then check available filesystems. If it breaks again - retry with older 
transaction id.


-- 
Sphinx of black quartz judge my vow.


More information about the freebsd-stable mailing list