Saturday, November 16, 2024
HomeSolarisSolaris system administrationZFS: Set or Change the Mount Point of a Filesystem

ZFS: Set or Change the Mount Point of a Filesystem

Creating new ZFS filesystems may seem strange at first since they are initially mounted under their parent filesystem. This is no problem since ZFS provides a simple and powerful mechanism for setting the mount point for a filesystem.


To change the mount point of the filesystem techrx/logs to /var/logs, you must first create the mount point (just mkdir a directory) if it does not exist, and then use the zfs command:

mkdir /var/logs
zfs set mountpoint=/var/logs techrx/logs

The filesystem will be unmounted (as long as you are not currently in that filesystem) and remounted as /var/logs.

One great consequence of this design is that a huge pool can be created (multi-volume mirror or raidz or a SAN lun, etc.) and as many filesystems as you can imagine created in that pool. These filesystems can then be mounted anywhere in the system that you want.

Quinn McHenry
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.
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

LATEST REVIEWS

Recent Comments

error: Content is protected !!