Home > OpenSolaris, Storage > Opensolaris – ZFS recovery after kernel panic

Opensolaris – ZFS recovery after kernel panic

October 19th, 2009 Daz Leave a comment Go to comments

Recently i hit what i thought was a huge disaster with my ZFS array. Essentially i was unable to import my zpool without causing the kernel to panic and reboot. Still unsure of the exact reason, but it didn’t seem to be due to a hardware fault. (zpool import showed all disks as ONLINE)

When i tried to import with zpool import -f tank the machine would lockup and reboot (panic).

The kernel panic;  (key line)

> genunix: [ID 361072 kern.notice] zfs: freeing free segment (offset=3540185931776 size=22528)

Nothing i could do would fix it… tried both of these options in the system file with no success;

set zfs:zfs_recover=1
set aok=1

After a quick email from a Sun Engineer (kudos to Victor), the zdb command line that fixed it;

zdb -e -bcsvL <poolname>

zdb is a read only diagnostic tool, but seemed to read through the sectors that had the corrupt data and fix things??  (not sure how a read only tool does that) – the run took well over 15hrs.

Updated: 20/10/2009

Apparently if you have set zfs:zfs_recover=1 in your system file the zdb command will operate in a different manner fixing the issues it encounters.

Remember to run a zpool scrub <poolname> if you are lucky enough to get it back online.

Related posts:

  1. zfs – now has dedup! Cool. zfs as of version 21 has deduplication built in....
  2. OpenSolaris – Samba server Time to share your newly created ZFS volume via samba...

Related posts brought to you by Yet Another Related Posts Plugin.

Categories: OpenSolaris, Storage
  1. No comments yet.
  1. No trackbacks yet.
To submit your comment, click the image below where it asks you to... Clickcha - The One-click Captcha