Tuesday, 6 December 2011

Shutdown stalls using HAST + ZFS

I've been playing around with hast and zfs which is pretty neat.

However, I have found a problem where if you try to restart a host that is running HAST as a primary node with a mounted zpool the server fails to complete the shutdown process and requires a hard reset.

You can fix this by modifying the HAST init script and force it to unmount any zfs filesystems before stopping HAST.

vi /etc/rc.d/hastd

        zfs unmount -a
${hastctl} role init all

After adding the zfs unmount command into the hastd_stop_precmd section as shown above you should be able to safely restart your system

Note: If you do a csup at any point this change could be overwritten so take care. Also, be aware that this will unmount all zfs filesystems, if you need to only unmount a specific filesystem then you should modify the unmount command accordingly.

No comments: