A gotcha with the automounter and loopback mounts

May 30, 2007

On Solaris, there is a combination gotcha with the automounter and mounts on the same host. It goes like this:

  1. your fileserver normally has /dev/whatever mounted on /export/foo.
  2. your generic automounter configuration mounts fileserver:/export/foo as /foo.
  3. you need to do some maintenance to the filesystem, so you unshare and unmount /export/foo.
  4. after you're done you try to remount it, but you get a message that the mount point is busy. The only mention of /export/foo that mount shows is something that looks like:
    /foo on /export/foo ...

What has happened is that something on your fileserver tried to touch /foo during your maintenance, so the automounter went ahead and mounted it from where you told it to. Loopback mounts don't check NFS share permissions so the mount wasn't denied, and loopback mounts (like NFS mounts) just put directory A on directory B, so the automounter didn't stop because there was no filesystem there; there was an /export/foo directory and that was good enough.

The direct way out is umount /foo. Unfortunately this may not be good enough if something is actively banging on that name, because the automounter will just remount it again; you may need to find the something and shoot it.

(In our case it was mail delivery. Why we are doing mail delivery directly on the fileservers is a long story.)

Written on 30 May 2007.
« On storing source code in some non-text format
Please test your error paths »

Page tools: View Source.
Search:
Login: Password:

Last modified: Wed May 30 22:48:38 2007
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.