Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
hi to all. i have two machines 'A'(192.168.100.20) and 'B'(192.168.100.21) with dapper loaded.Both machines have two user accounts staff and student consequently i have a two directories /home/staff and /home/student on machine A as well as B.
Now i want these directories to be mounted by machine B at boot time in such way that if user logs in as staff on machine B he should have rw access to the mounted folder A:/home/staff and have no access to A:/home/student. similarly if user student logs in at B he should have rw access to A:/home/student but not to A:/home/staff.
i have installed and started portmap as well as nfs-kernel-server on A. i have also installed portmap and nfs-common on B. now everything works OK and if i mount thru terminal like this:
sudo mount 192.168.100.20:/home/staff /home/staff
it works ok.
but if i write this in /etc/fstab it does not mount the relevant files at boot time:
192.168.100.20:/home/staff /home/staff default 0 0
i mean i can mount manually but fstab entry is not working.
PLEASE HELP I HAVE BEEN ON THIS FOR A WEEK NOW.
Click here to see the post LQ members have rated as the most helpful post in this thread.
i checked my system fstab entry, there is nothing wrong with it. here is exact entry:
192.168.100.20:/home/staff /home/staff nfs defaults 0 0
192.168.100.20:/home/student /home/student nfs defaults 0 0
and it is not working. i ran showmount -e on server the output was the exported directories. i ran showmount on client it showed the result ok. the portmap is running on client. i donot know how to check if nfs-common is running. but if run mount commond thru terminal the directories get mounted. whats happening here? please help.
I have the exact same problem. After boot mounting works, while putting it in fstab doesn't mount is successfully.
I've noticed that when I put the nfs line in fstab, portmap has a problem loading at boot.
Perhaps this happens because mount, when it reads the fstab line, acts different than typing mount ip:foo foo. Perhaps understanding how mount reads fstab will get me to the bottom of this...
Yes this thread is way old, but I have relevant info.
One thing to keep in mind when comparing commands in a virtual terminal to commands executed at startup from an fstab file is that the command syntax may be slightly different. So in a virtual terminal, if you had a dash(-) as part of a directory name, you might put it in quotes, /”Joe-Linux-NFS”/ . But with fstab, homey don't play that game-it might not won't work with the quotes, only without, /Joe-Linux-NFS/ .
I'm not sure how that plays with different issues like a space in the name. I think there you might have to put the entire directory in quotes with fstab. Trial and error, or get giggy with the manual.
Having a dash in a directory name won't require escaping. You are right that bash isn't parsing the /etc/fstab file so you need to escape spaces in directory names as \040.
One could use the _netdev option in the fstab mount options. This allows the startup scripts to first mount local file mounts with "mount -a -O no_netdev", excluding nfs mounts. Then after the network is ready, it can mount those with _netdev entries.
Also be sure to check out automount, autofs and auto.master manpages. I think that autofs replaced netfs in recent kernels. Make sure you aren't using RH 9 which is obsolete and not secure.
Last edited by jschiwal; 03-10-2011 at 04:43 PM.
Reason: file -> directory
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.