Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Restoring automounts




On Jun 5, 2007, at 11:41 AM, Scot Hacker wrote:

Hi all  - Quick question I couldn't find an answer to in the archives.

Servers A and B store user homes, Server C is a web server that automounts those homes on boot and makes available user Sites folders through apache. If either A or B is rebooted and C is not, those Site folders become inaccessible, since the mount is broken.

The question is, is there a command I can run that will re- initiate the same mount connection that occurs at boot time, so I can restore the mounts on C without restarting the server? I see that I can build map files and pass them to the automount command., but am thinking there must be an easier way - a command that will reproduce whatever mount process is normally run during boot.

I'd like to set up some kind of automated job to check for the mounts and re-mount the broken connections if necessary.

Thanks,
Scot

Hello,

Yes, this is possible. The high level view: On server C, unmount all automounted filesystems, kill all automount processes, restart the two automount processes, make the symlink in /N/S.

The low-level view:

On server C, umount anything that was automounted, except for the two automount mounts. Basically, everything returned by the following:

mount | grep "automounted" | egrep -v '^automount'

Unmount them with 'umount' as follows:

umount /private/Network/Servers/servername/Volumes/volname

or if there are open files, you can force it with: (make sure somebody's not ssh'd in with a text editor open...)

umount -f /private/Network/Servers/servername/Volumes/volname

Slay all the automount processes:

killall automount

Make sure they're dead

ps auxww | grep auto

Restart automount (two commands entered seperately):

/usr/sbin/automount -m /Network -nsl -mnt /private/var/automount
/usr/sbin/automount -m /automount/Servers -fstab -mnt /private/ Network/Servers -m /automount/static -static -mnt /private/var/automount


Make the symlink for /Network/Servers

ln -s /automount/Servers /Network/Servers

Automount is started at boot time by the NFS startup item. This item also handles NFS services, so simply re-executing this startup item may affect more than just the automounts if you are also an NFS server.

Hope this helps,
-Andre
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macos-x-server mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/macos-x-server/email@hidden

This email sent to email@hidden
References: 
 >Restoring automounts (From: Scot Hacker <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.