The Next Level of Details
The basic setup was 9-STABLE on a relatively fast, low-profile USB2 flash drive supporting two ZFS pools: a 2-drive mirror, and a 6-drive RAID-6. Both pools were shared via Samba to the internal home network.
When the shares stopped responding, the console was found unresponsive, as well, so I had no choice but to press the case's reset button. The OS restarted with lots of complaining ... basically unusable, if memory serves. That was days ago, and if I made a note of the errors, I can't find it right now; I could try harder if the exact issue matters. But the clear impression to me was the issues were all about the USB OS flash drive and nothing to do with the ZFS drives. [And, I am still open to being wrong.]
When I found the backup dump of the OS drive, I found it was from the previous version: 9.1-RELEASE back when only the ZFS mirror was built (pre-RAIDZ2). After that backup, I think I built the RAID6 under 9.1-REL, upgraded to 9-STABLE and then did a
zpool upgrade only on that pool, but I could have also built it after the upgrade ... I can't be sure right now.
IMPORTANT: After the original 9.1-REL to 9-STABLE upgrade, ZFS complained about a legacy format due to 9-STABLE that was not in 9.1-REL. Per above, I somehow allowed the new feature on the RAID6 pool but did not bother with it on the mirrored pool. This means that the mirror always mentioned I should upgrade whenever I did a
zpool status. Fortunately, I found what the mirror reported pre-crash:
Code:
status: The pool is formatted using a legacy on-disk format. The pool can still be used, but some features are unavailable.
action: Upgrade the pool using 'zpool upgrade'. Once this is done, the pool will no longer be accessible on software that does not support feature flags.
That is the background ... next is what I did post-crash. My goal was just get things back to same as it was before.
I used the same, original install 9.1-REL drive (from which I installed onto the original, now-failed 8GB flash drive), and I installed FreeBSD to a new (and much slower) PNY 16GB flash drive I had lying around. Then, I did a full restore from the 9.1-REL dump backup via instructions I found
here (where "random1" is the source containing the dump file):
Code:
newfs -U /dev/da2p2
mount /dev/da2p2 /mnt/PNY
mount /dev/da4 /mnt/random1
cd /mnt/PNY
restore -rvf /mnt/random1/allroot.dump
Naturally, this got me back to a running system under 9.1-RELEASE, the way it was back in February. A
zpool status showed the mirror was fine but also reported two old, obsolete zpools which had originally helped me learn & play with ZFS. It was detecting those pools as
UNAVAIL and
FAULTED but nothing about the RAID6 pool. (The messages are further below.)
I figured this was because the RAID6, being upgraded with a feature only in 9-STABLE, could not be read under 9.1-REL. And, since I never upgraded the mirror with this feature, that was why the mirror was fine.
So I upgraded the OS using a backup of
/usr/src I had from my 9-STABLE upgrade, still trying just to get back to where I was. Somehow, the process gave me an unexpected upgrade because now I am mysteriously at 9.1-STABLE, unintentionally.
Code:
# uname -a
FreeBSD raid.quinns.int 9.1-STABLE FreeBSD 9.1-STABLE #0 r246798: Sun Oct 20 08:39:50 EDT 2013 dude@raid.mine.int:/usr/obj/usr/src/sys/GENERIC amd64
But that is better, right? So I figure
zpool status should give back my RAID6 pool now. However, instead I am getting the same info I was getting just before this last upgrade (i.e., under 9.1-REL):
Code:
# zpool status
pool: mir1
state: ONLINE
status: The pool is formatted using a legacy on-disk format. The pool can
still be used, but some features are unavailable.
action: Upgrade the pool using 'zpool upgrade'. Once this is done, the
pool will no longer be accessible on software that does not support feature
flags.
scan: scrub repaired 0 in 4h32m with 0 errors on Sun Sep 8 05:52:54 2013
config:
NAME STATE READ WRITE CKSUM
mir1 ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
gpt/mir1disk1 ONLINE 0 0 0
gpt/mir1disk2 ONLINE 0 0 0
errors: No known data errors
pool: tempmir1
state: UNAVAIL
status: One or more devices could not be opened. There are insufficient
replicas for the pool to continue functioning.
action: Attach the missing device and online it using 'zpool online'.
see: http://illumos.org/msg/ZFS-8000-3C
scan: none requested
config:
NAME STATE READ WRITE CKSUM
tempmir1 UNAVAIL 0 0 0
mirror-0 UNAVAIL 0 0 0
16317492388348038357 UNAVAIL 0 0 0 was /dev/gpt/tempmir1disk1
13969314449511946543 UNAVAIL 0 0 0 was /dev/gpt/tempmir1disk2
pool: tempmir1backpool1
state: FAULTED
status: The pool metadata is corrupted and the pool cannot be opened.
action: Destroy and re-create the pool from
a backup source.
see: http://illumos.org/msg/ZFS-8000-72
scan: none requested
config:
NAME STATE READ WRITE CKSUM
tempmir1backpool1 FAULTED 0 0 1
ada7 ONLINE 0 0 6
When the system crashed, pools
tempmir1 and
tempmir1backpool1 were long gone. That obviously means this pool info somehow came back from my restore; I didn't expect that, but I don't know exactly how this all works. However, my novice work with ZFS so far indicates to me that these pools "should" be able to act fairly independently of system if treated correctly, so I believe (and hope) that the true RAID6 configuration should still be on the RAID6 drives themselves and, since I haven't written anything to them, they should somehow be retrievable back to its pre-crash state.
By the way, I strongly prefer recovering this pool to rebuilding it, if at all possible. And I have been reading and doing this long enough to know what you all are thinking about backups. I know, I know, so I don't need that lecture. :stud In fact, the mirrored pool is backed up and off-site. But this pool holds entertainment only: serving out my discs, ripped & renamed individual TV episodes, stored recordings off my old VHS and my DVR and the like. It took a lot of time and work, but I took a calculated risk because I simply cannot afford another 10+TB of drive to back all this up (and I planned, but had not yet gotten to, backing up certain pieces that are harder to replace). Therefore, this is not "the end of the world" or the loss of something completely irreplaceable if I have to start from scratch, but it is going to be a long road of re-doing things if I have to do that.
Thanks in advance for your consideration and assistance with recovering this. I hold out hope that it is something simple I do not know because I am a ZFS admin novice.