ZFS: Unmount or Take a Filesystem Offline

The mount and unmount commands are not used with ZFS filesystems. The filesystem concept has changed with ZFS in which we are likely to see many more filesystems created per host. A ZFS pool can be taken offline using the zpool command, and a ZFS filesystem can be unmounted using the zfs command as described in this tech-recipe.

Given a ZFS pool techrx, the command to take it offline is as follows:

zpool offline techrx

Using the command in this manner takes the techrx pool offline permanently (i.e., will remain offline following a reboot) until it is manually brought online.

To take the same pool offline temporarily (so that it will be online automatically at the next reboot), add the -t option:

zpool offline -t techrx

Individual filesystems within a pool can be umounted with the zfs command. To unmount the /techrx/home/qmchenry filesystem, use this command:

zfs unmount techrx/home/qmchenry

All other filesystems in the techrx pool are left unchanged.


About Quinn McHenry

Quinn was one of the original co-founders of Tech-Recipes. He is currently crafting iOS applications as a senior developer at Small Planet Digital in Brooklyn, New York.
View more articles by Quinn McHenry

The Conversation

Follow the reactions below and share your own thoughts.