What's the best way to mount an NFS share during boot?
1 Answer
What is "better" depends on your needs. If it is your home box, I'd go with autofs. If you add an entry in /etc/fstab
, which requires mount at boot time and there is anything wrong with the NFS server, then your boot will hang. Autofs based solution will let you boot every time, also if there's a problem with your NFS server.
If you decide to use fstab
anyhow, then add netdev
option. This prevents mount attempt until networking is up.
-
Great answer! This is on a server so I'll probably go with autofs. Sep 18, 2011 at 6:09
-
Look it up in your
man
page formount
. It's possible, that the option varies between versions/distributions. I took mine from RHEL 6 man page Sep 18, 2011 at 6:20