ZFS: Set or change the mount point of a filesystem

Contributor Icon Contributed by qmchenry  
Tag Icon Tagged: Solaris system administration  

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 big, honkin’ pool can be created (multi volume mirror or raidz or a SAN lun, whatever) 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.

 

1 Comment -


  1. Nikkkor said on November 18, 2010

    Thanks it was very helpful for me :)

 

RSS feed for comments on this post. TrackBack URL

Leave a comment -