If you get into the broken state, what happens if you run: zpool list -H -o health "$ZFS_RPOOL" zpool export "$ZFS_RPOOL"
Try that literally first. If $ZFS_RPOOL is unset, then replace it by hand with the name of your pool.
If you get into the broken state, what happens if you run:
zpool list -H -o health "$ZFS_RPOOL"
zpool export "$ZFS_RPOOL"
Try that literally first. If $ZFS_RPOOL is unset, then replace it by hand with the name of your pool.