If zfs umount fails it leaves the file system unshared.
# zfs create examples/share
# share | grep examples/share
- /examples/share rw ""
# cd /examples/share
# zfs umount examples/share
cannot unmount '/examples/share': Device busy
# share | grep examples/share
#
This is not what the user expects, especially as the workaround for 6509628 requires a unmount to fail.
Ben grabbed some truss output:
"
I just threw in a truss in the SMF script and rebooted the test system and it failed again.
The truss output is at http://www.eecis.udel.edu/~bmiller/zfs.truss-Apr27-2007
thanks,
Ben
"
Work Around
Use this script to unmount
#!/bin/ksh -p
zfs unmount $1 || [[ $(zfs get -Ho value sharenfs $1) == "off" ]] || zfs share $1