Solved ZFS io error after power loss (can't read MOS of pool zroot)

Hi,

Working on a VM with FreeBSD on a Windows machine I had to hard shutdown my laptop. It happened multiple times and I see it as a good test to see how ZFS reacts. For the VM it will be like the power is suddenly down.

Usually I can just import the pool via the bootcd, this time i get a IO error and see:
> ZFS: i/o error - all block copies unavailable
> ZFS: can't read MOS of pool zroot

This error is famous I see more people that have this error on this forum. I don't have any mirroring setup, so there is no redundancy to fall back to.

But if we go back to the basics lets not focus on details. So for some reason the pool does not go open, and now i am stuck. I think this is weird , I am sure the data is still on the disk, why is there no way in ZFS to recover this? I mean my windows also crashed 5 times, it still works. But it seems now all the data in the VM is not accessible any more ... Falling back on redundancy is just, you pay for extra discs and that's fine. But it's not logical for me that at this moment I cannot recover anything from that disk.

Here a zdb run:

VirtualBox_vm2_26_03_2020_10_04_42.png


Here error on startup:
VirtualBox_vm2_26_03_2020_10_05_36.png


Here data from dmesg, seems to be a geli error, althoug I can still attach the disk without issues:

VirtualBox_vm2_26_03_2020_10_17_32.png


Extra output from zdb:
VirtualBox_vm2_26_03_2020_13_28_13.png


Meanwhile problem is solved.

I have my data and OS in one pool zroot. Would my data have less risk to be impacted if I created 2 pools : one with zroot and one with zdata? Instead of now having mountpoint zdata inside zroot (/zroot/zdata)?

Best Regards,
R
 
Last edited:
Back
Top