Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have two machines under the same subnet, running CentOS 5.7. I would like one to run as a server, with the other being able to access a drive on the 'server'. Further to this, I would also like to store the profiles of the 'client' machine on the 'server' machine, thus mounting the network drives on booting. How can I go about accomplishing this? I've Googled extensively, but I can't find any information on the subject without a heavy slant to Windows/Linux interaction, and would appreciate a straight forward answer on where to look and possibly what to do. Thanks .
You just want NFS to achieve that. Nothing fancy, just an entry in /etc/exports.
if this scales you'll be wanting centralized user accounts, I'd say openldap is the best way to do that.
Thanks for the recommendations, and the possible way forward with user accounts. I'll update my progress at the end of the day, add a few datails about what worked for me.
Not much progress, I spent most of my day doing actual work (god forbid!). I did, however, try the following:
Added the line '/raid *(rw,sync)' to /etc/exports on the server. The path /'raid corresponds to the directory I intend to share (which is a raid volume).
Restarted the nfs service on the server using '/etc/init.d/nfs restart'.
Added the directory /raid on the client computer.
Attempted to mount the nfs volume using 'mount -t nfs4 192.168.10.31:/raid /raid'
It is at this point I received 'mount.nfs4: Operation not permitted'. The mount command was issued as root, so I assume it's not a permissions problem. My diagnostic process was as follows:
I checked that NFS4 is enabled (using 'rcpinfo -p'), and it is on port 2049 for both TCP and UDP.
I've checked that the rpc.idmap daemon is running on both the server and the client (using 'ps -ef | grep idmap'), which it is.
The firewalls are disabled (We have a hardware firewall), and I confirmed this using 'iptables -L' and seeing that the default input, output and forward policy is "ACCEPT".
I ran 'showmount -e 192.168.10.31' (where that ip address corresponds to the server), and received the following:
Quote:
Export list for 192.168.10.31:
/raid *
If I have understood correctly, this means that /raid is being shared, and can be mounted by anyone. Except, apparently, my client computer!
your server side exports config is for conventional nfs, I would suggest just sticking with that, and not worrying about nfs4 for now.
Ah, thanks! Seems to be working now, a silly mistake on my part.
Something I didn't include above was automatically starting the NFS service. This was done through the 'ntsysv' utility (started from the console).
Now, I think I'll give openldap a try. Should I start a new thread, or continue in this one? Seems I should start a new one, given that this thread has served it's purpose, and gives a pretty good little summary of setting up an nfs share.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.