From: Greg Ercolano <erco@(email surpressed)> Subject: [SYSADMIN/OSX] Setting up NFS mounts on OSX: using mount(1) in boot Date: Thu, 04 May 2006 05:27:44 -0400 |
Msg# 1282 View Complete Thread (1 article) | All Threads Last Next |
Not long ago, we were forced to create NFS mounts to our file servers with the Automounter, because if you tried to hack mount(1) commands directly into the boot scripts, it would make a bug surface in the Finder causing it to report "0 Gig Available" on a server that had plenty of space, and give "disk full" errors when users tried to drag+drop files to the server. This "Finder" bug forced everyone to use the more lengthly procedure of configuring NFS mounts with the Automounter, specifically: http://seriss.com/cgi-bin/rush/newsgroup-threaded.cgi?-view+764+764+770+771+772 Well, it looks like Apple recently fixed that bug (hooray!) in recent maintenance releases for both 10.3.9 and 10.4.5, so now it seems you can again just shove mount(1) commands into boot scripts, and the Finder is happy with it. My favorite approach is to put the mounts into the S99rush boot script, (/usr/local/rush/etc/S99rush) in the 'start' section just before the part where it actually starts rushd. This ensures the mounts are active before rush kicks in any renders after a reboot. Here's a working example that shows some example commands one might add to the S99rush boot script to mount an NFS file server: --- snip # Mount the drive # > Redirect errors to /var/log/system.log via logger(1) # > When mounting the server, use its IP address, not its hostname. # DNS is often not resolving right after a reboot. # ( if [ ! -d /Volumes/Jobs ]; then echo "Creating /Volumes/Jobs mount point" mkdir /Volumes/Jobs fi echo "Mounting /Volumes/Jobs" /sbin/mount -t nfs -o intr,bg 192.168.0.3:/Volumes/Raid_5 /Volumes/Jobs ) 2>&1 | logger -t "JOB-MOUNT" --- snip Nice thing about this is you can then just copy the S99rush script around to other machines to quickly install the mount, eg: rcp /usr/local/rush/etc/S99rush somehost:/usr/local/rush/etc rsh somehost /usr/local/rush/etc/S99rush start ...or quickly deploy the mount to a *whole farm* of machines automatically, eg. from a csh: foreach i ( host1 host2 host3 .. ) echo -- Working on $i rcp /usr/local/rush/etc/S99rush ${i}:/usr/local/rush/etc rsh $i /usr/local/rush/etc/S99rush start end So, if you've been taking Apple's software updates, you might find this an easier way to manage NFS mounts on large networks of Apple machines. |