crush depth

Boot Config

Did a pile of server updates today, and for some reason one specific VPS refused to boot with this error:

Boot error

It turned out I hadn't updated the boot code to handle the latest zpool version. There's a note about this buried at the bottom of the zpool administration chapter of the FreeBSD documentation:

This would be fine, except I've literally never had to do this once on any number of physical machines or virtual machines over more than a decade of continual upgrades. I don't understand why it was suddenly a problem on this one machine.

I mounted a FreeBSD ISO into the virtual machine, booted from it, temporarily imported and mounted the zroot zpool to /mnt and ran:

# gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 vtbd0

Exported the zpool again, and rebooted. Machine came up.