How to protect against ZFS on Root power interruption boot failure?

I have an x220 which I've been learning the ropes on for FreeBSD. Earlier today it either ran out of power on suspend, or just ran out of power, and on bootup, I could no longer login, or even get to the boot screen. I posted screenshots below, but I decided to do a reinstall because I had some work I needed to get done. I did manage to view some data on the zpool zroot, but the status indicated the disk or data had been damaged. Boot information was throwing zfs - all block copies unavailable, and couldn't find boot kernel.

Unfortunately I lost a key I'd generated for a fresh server due to that and had to destroy the instance and spin a new one up with a new key on another computer. It was pretty new so not a big deal.

My main concern is that I thought ZFS with CoW was supposed to avoid scenarios like this. Is there a way to safely backup boot files or something so that if I do encounter this issue again, I can restore it?

I'd like to keep using ZFS on my laptop purely for the convenience of learning how to use the tools, so I see this as a learning experience to be mindful of in the future.
1548504505926890.jpg1548504506251750.jpg154850450658682.jpg
 
You should post details. I never encountered such an issue with zfs (nor with all the file systems / OSes I tried). Maybe it's x220 specific and maybe someone will know what to do. Because it's just unusable if disk data are destroyed/lost each time you have a power outage.
 
Agreed.. updated with screenshots, hoping that's enough, I already wiped and reinstalled the system.
 
I also never had any problems with a root pool regardless of power outages. You might want to check your disk for errors.
 
I think that long time ago I had same problem on very similar hardware (ThinkPad T410/T420s/X220) but don't remember what was causing it. IIRC it was caused by dd-ing the wrong disk or playing with gpart :D
 
Unfortunately I can't blame it on gpart or dd, I only messed with gpart after the fact. :confused:
 
Back
Top