From: Greg Ercolano <erco@(email surpressed)> Subject: [SYSADMIN/OSX]: Setting up OSX (10.3) to automount NFS on boot Date: Sun, 05 Dec 2004 09:01:38 -0800 |
Msg# 764 View Complete Thread (4 articles) | All Threads Last Next |
An easy way to get OSX machines to automatically your NFS file server at boot time. SETTING UP OSX TO AUTOMOUNT A REMOTE NFS SERVER ----------------------------------------------- There are many ways to do this, but this approach I like the best, because it can be done *completely* from the command line, which means it can be completely automated via rsh/rcp. In this example, we have a file server named "meade", which has a local disk "/net" that we export to the network. "meade" is a linux file server; its /etc/exports file reads: /net 192.168.0.0/255.255.255.0(rw,no_root_squash,insecure) We want to configure the OSX machine to mount meade's "/net" partition so that it shows up as "/meade/net" (which is similar to the UNC scheme the Windows machines here use to mount this drive, eg. //meade/net) Here are the steps for your OSX machine: 0) Make sure AUTOMOUNT=-YES- is in your /etc/hostconfig. 1) As root, create the empty directory /meade. (This is the directory into which the automounter will create the 'net' mount) mkdir -m 755 /meade 2) Create the file /etc/auto.meade to contain: net -rw,bg,intr,hard 192.168.0.14:/net --- ---------------- ------------ ---- | | | | | | | Partition on "meade" to mount | | | | | Meade's IP address. I use the IP instead, | | so even if DNS is down, the mount will work. | | | Mount flags. Use 'hard' mounts to avoid NFS timeout errors. | Name that will appear in /meade, eg. "/meade/net" 3) Test automount: automount -m /meade /etc/auto.meade ls -la /meade/net/ (Note trailing '/' needed in ls command) 4) If the test works, configure the command to run on boot: vi /System/Library/StartupItems/NFS/NFS Find the bottom of the 'StartService()' function, and add the above automount command before the closing brace, eg: StartService() { : : default startup commands here : automount -m /meade /etc/auto.meade # ADD THIS LAST } StopService() { : 5) Now when you reboot, you should be able to eg. 'ls -la /meade/net/' to see the directory, and read/write files through the Finder. Also, you should be able to go to this directory through the finder; just hit SHIFT-G in a finder window, and type "/meade/net". COMMENTS -------- This approach does NOT suffer from the "Zero KB available" problem with the finder, which can happen if you manually mount NFS partitions. REFERENCES ---------- http://www.hacksciences.com/hackblog-archives/000077.html http://sial.org/howto/osx/automount/#s4 http://hacks.oreilly.com/pub/h/341 <-- (thanks James Wan@Universal) |
From: Greg Ercolano <erco@(email surpressed)> Subject: Re: [SYSADMIN/OSX]: Setting up OSX (10.3) to automount NFS on boot Date: Wed, 08 Dec 2004 04:17:28 -0800 |
Msg# 770 View Complete Thread (4 articles) | All Threads Last Next |
[reposted, with permission] From: David Green <david@pi..> Subject: Re: [SYSADMIN/OSX]: Setting up OSX (10.3) to automount NFS on boot Date: Sun, 5 Dec 2004 09:40:21 -0800 To: Greg Ercolano <erco@se..> Greg, Thank you for posting this. I have been looking into the best way to do this also, without using the GUI of "NetInfo Manager". The way that I was mounting my NFS volumes was in the NFS startup items, in the same place where you added the 'automount....' line. I was just using mount_nfs command. This worked, but I think that automount is the correct way to mount the drives. The only warning that I heard from Apple about modifying the NFS startup items is that system updates may clobber the changes. I update the OS of the render machines very rarely, but this is still good info to know. The command 'nicl' allows command line control of "NetInfo Manger." I have some notes on adding mount points from the command line that I can send you, after I find them ;) Let me know what you think, - David On Dec 5, 2004, at 9:01 AM, Greg Ercolano wrote: > > An easy way to get OSX machines to automatically your NFS file > server at boot time. > > SETTING UP OSX TO AUTOMOUNT A REMOTE NFS SERVER > ----------------------------------------------- > [..] |
From: Greg Ercolano <erco@(email surpressed)> Subject: Re: [SYSADMIN/OSX]: Setting up OSX (10.3) to automount NFS on boot Date: Wed, 08 Dec 2004 04:22:22 -0800 |
Msg# 771 View Complete Thread (4 articles) | All Threads Last Next |
> The command 'nicl' allows command line control of "NetInfo Manger." I > have some notes on adding mount points from the command line that I can > send you, after I find them ;) Cool, send em. One of the "references" links in my post refers to some ways to implement automounts into NetInfo using "niutil". > The only warning that I heard from Apple about modifying the NFS > startup items is that system updates may clobber the changes. That's true, that is a possibility. Probably the best thing to do is hack up your own bootscript in /Library/StartupItems/, which Apple says even major OS upgrades won't mess with. I've been thinking about moving Rush over to that technique. If you don't have a /Library/StartupItems directory, you must create it first. It follows the same format as the one in /System. > I update the OS of the render machines very rarely, but this is > still good info to know. I can tell you that on Friday night I took their latest OSX upgrade, and for the first time, one of their updates hosed my machine. On reboot, it refused to boot my firewire drive anymore (where I had Panther installed for the last year or so), and the box would only boot the internal drive (which had an old 10.1 version on it) So I had to stop everything I was doing, and spend hours re-installing everything on my internal drive. Had to kill my 10.1 install, and do the whole shebang; install Panther, developer CDs, updates, maya, afterfx, rush, tablet, etc, etc. Set me back 4 hours and counting. Yechh! Even now, I can't boot the firewire drives, even though I have them selected. And, I can 'see' them fine once the internal drive's OS boots. This sucks! Guess I need to report it. My whole system of being able to boot different versions of OSX for testing purposes just went out the window because of that damn update. I'll definitely think twice about taking updates now. [Note: David replies to the above:] > I have heard about this happening. I think it has something to do > with the firmware of the firewire bridge. Here are some posts from > other hosed users: > > http://discussions.info.apple.com/webx?14@97.WNEjaMAnAhW.1@.689e7fce > http://episteme.arstechnica.com/eve/ubb.x?a=tpc&s=50009562&f=8300945231&m=293001637631 |
From: James J <james.jan@(email surpressed)> Subject: Re: [SYSADMIN/OSX]: Setting up OSX (10.3) to automount NFS on boot Date: Wed, 08 Dec 2004 13:19:10 -0800 |
Msg# 772 View Complete Thread (4 articles) | All Threads Last Next |
GregThanks for this automount. I've tried many different ways of mounting at startup. startup items, netinfo, finder, login hooks.. you name it. All seem to have some sort of bugs weather it be no space left in finder or timeout of mounting. This mount by far is the most stable i've seen. I'll be putting this to good use . Thanks James Jan On Dec 8, 2004, at 4:22 AM, Greg Ercolano wrote: [posted to rush.general]> The command 'nicl' allows command line control of "NetInfo Manger." I > have some notes on adding mount points from the command line that I can> send you, after I find them ;) Cool, send em. One of the "references" links in my post refers to some ways to implement automounts into NetInfo using "niutil". > The only warning that I heard from Apple about modifying the NFS > startup items is that system updates may clobber the changes. That's true, that is a possibility. Probably the best thing to do is hack up your own bootscript in /Library/StartupItems/, which Apple says even major OS upgrades won't mess with. I've been thinking about moving Rush over to that technique. If you don't have a /Library/StartupItems directory, you must create it first. It follows the same format as the one in /System. > I update the OS of the render machines very rarely, but this is > still good info to know.I can tell you that on Friday night I took their latest OSX upgrade,and for the first time, one of their updates hosed my machine.On reboot, it refused to boot my firewire drive anymore (where I had Panther installed for the last year or so), and the box would only bootthe internal drive (which had an old 10.1 version on it)So I had to stop everything I was doing, and spend hours re-installing everything on my internal drive. Had to kill my 10.1 install, and do the whole shebang; install Panther, developer CDs, updates, maya, afterfx,rush, tablet, etc, etc. Set me back 4 hours and counting. Yechh! Even now, I can't boot the firewire drives, even though I have themselected. And, I can 'see' them fine once the internal drive's OS boots.This sucks! Guess I need to report it.My whole system of being able to boot different versions of OSX for testing purposes just went out the window because of that damn update. I'll definitelythink twice about taking updates now. [Note: David replies to the above:]> I have heard about this happening. I think it has something to do > with the firmware of the firewire bridge. Here are some posts from> other hosed users: >> http://discussions.info.apple.com/webx?14@97.WNEjaMAnAhW.1@.689e7fce > http://episteme.arstechnica.com/eve/ubb.x? a=tpc&s=50009562&f=8300945231&m=293001637631 |