On Sun, 23 Mar 2008, msl wrote:

> I have some zfs filesystems with two "//" at the beggining like 
> "//dir1/dir2/dir3. And some other filesystems "correct" with just one 
> "/" (/dir1/dir2/). The question is: Can i set the mountpoint correctly?

You can set the mountpoint at any time with 'zfs set mountpoint=/dir1/dir2 
<dataset>'

-bash-3.2# zfs create tank/filesystem
-bash-3.2# zfs get mountpoint tank/filesystem
NAME             PROPERTY    VALUE             SOURCE
tank/filesystem  mountpoint  /tank/filesystem  default
-bash-3.2# zfs set mountpoint=//dir1/dir2 tank/filesystem
-bash-3.2# zfs get mountpoint tank/filesystem
NAME             PROPERTY    VALUE            SOURCE
tank/filesystem  mountpoint  //dir1/dir2      local
-bash-3.2# zfs set mountpoint=/dir1/dir2 tank/filesystem
-bash-3.2# zfs get mountpoint tank/filesystem
NAME             PROPERTY    VALUE            SOURCE
tank/filesystem  mountpoint  /dir1/dir2       local
-bash-3.2#

Note that if you set a mountpoint with a trailing / character, that / is 
propagated to all datasets which inherit the mountpoint:

-bash-3.2# zfs create tank/filesystem/child
-bash-3.2# zfs get mountpoint tank/filesystem/child
NAME                   PROPERTY    VALUE                  SOURCE
tank/filesystem/child  mountpoint  /dir1/dir2/child       inherited from 
tank/filesystem
-bash-3.2# zfs set mountpoint=/dir1/dir2/ tank/filesystem
-bash-3.2# zfs get mountpoint tank/filesystem/child
NAME                   PROPERTY    VALUE                  SOURCE
tank/filesystem/child  mountpoint  /dir1/dir2//child      inherited from 
tank/filesystem
-bash-3.2#

As a result of the inheritance, you get the double-/ in the middle of the 
mountpoint name.


Regards,
markm
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to