Autofs mounts in non-global zones are unmounted when autofs is restarted in the global zone. See the testcase below:
# zoneadm list -cv
ID NAME STATUS PATH
0 global running /
1 zone1 running /export/zone1
Lets create autofs/lofs automounter map (for autofs/nfs the problem is same).
We choosed lofs to make zone setup easier - no network needed.
# zlogin zone1 tail /etc/auto_direct
/t1 -fstype=lofs :/t2
Following sequence shows that in zone1 after first autofs restart in global zone
lofs is unmounted, after second the autofs is completely removed (testing shows
that sometime sutofs must be restarted 3times):
# zlogin zone1 ls /t2
x
# zlogin zone1 ls /t1 << we did not activate autofs yet
# zlogin zone1 automount -v
automount: /t1 mounted
# zlogin zone1 ls /t1
x
# svcadm restart autofs
# zlogin zone1 df /t1 << here we see that lofs is away, but autofs is still there
/t1 (auto_direct ): 0 blocks 0 files
# svcadm restart autofs << second try will remove autofs completely
# zlogin zone1 df /t1
/ (/ ): 7803356 blocks 1020622 files
# zlogin zone1 ls /t1
#