Sifting through some documentation, I couldn’t find a little walkthrough of how to remove a zfs filesystem from a zone. I’ve seen plenty of docs for adding zfs filesystems to zones. The process is very simple once I gave it a try:
$ mount |grep disk02
/export/disk00/zones/zonehost/root/export/disk02 on tank_001/zfs_fs_disk02/read/write/setuid/devices/nonbmand/exec/xattr/atime/dev=4010008 on Thu Nov 19 15:28:20 2009
root@globalhost 13:23:24 /
$ umount /export/disk00/zones/zonehost/root/export/disk02
root@hostname 13:25:05 /
$ zonecfg -z zonehost
zonecfg:zonehost> info
fs:
dir: /export/disk02
special: tank_001/zfs_fs_disk02
raw not specified
type: zfs
options: []
zonecfg:zonehost> remove fs dir=/export/disk02
Running info again will show that there isn’t an fs anymore associated with the zone. Now exit back into the global zone and change the zfs mountpoint back from legacy to where your zf’s default mountpoint was before:
zfs set mountpoint=/tank_001/zfs_fs_disk02 tank_001/zfs_fs_disk02