ZFS multiple mountpoints

Hi,

is it possible to set multiple mountpoints for one ZFS file system?
For example following config:

Code:
# zfs list
NAME               USED  AVAIL  REFER  MOUNTPOINT
zpool              219K  97.9G    32K  /zpool
zpool/jail          63K  97.9G    32K  /jail
zpool/jail/mach1    31K  97.9G    31K  /jail/mach1
zpool/ports         31K  97.9G    31K  /zpool/ports

And I want to mount zpool/ports to /usr/ports and /jail/mach1/usr/ports.

Any hints?
Thanks
Fous
 
honza801 said:
is it possible to set multiple mountpoints for one ZFS file system?
No.

And I want to mount zpool/ports to /usr/ports and /jail/mach1/usr/ports.

Use nullfs(5):

# zfs set mountpoint=/usr/ports zpool/ports
# mount -t nullfs /usr/ports /jail/mach1/usr/ports

Or in fstab:
Code:
/usr/ports   /jail/mach1/usr/ports  nullfs  rw      0       0

Make it really funky by adding it to /etc/fstab.mach1 and use:
Code:
jail_mach1_mount_enable="YES"

Then it'll be mounted when the jail starts and unmount when it stops.
 
Back
Top