mount subdirectory from another Linux server
New to Linux. Just installed RedHat Linux on my server. How do I "map"/mount to a subdirectory from another RedHat Linux server?
|
On the server, edit /etc/exports.
(I'm taking this from my memory, can't check it right now) Say you want to share /misc on server (IP 192.168.30.1) to anybody in 192.168.30.0, add a line like: /misc 192.168.30.0/24(rw) as root, run #exportfs -a On the mounting machine, mount as usual: # mount 192.168.30.1:/misc /mnt/mymountpoint |
hi,
yes, to expand on pingu's post, you need to set up nfs - configure the server box as an nfs server, then mount the exported directory in the normal manner on your client machine. i can't remember off the top of my head what the various steps are in configuring an nfs server - you may find that red hat includes a gui nfs configuration tool - suse certainly does in yast. there are a number of tutorials out there - try searching this site, or google, for nfs configuration. |
I've added an entry in /etc/exports on the server. Restarted nfs. Tried to mount and here's what I got:
mount: server:/subdir failed, reason given by server: Permission denied. |
hi,
you probably want to have a look at your /etc/hosts.allow and /etc/hosts.deny files... |
There were no entries in either /etc/hosts.allow or /etc/hosts.deny
I added an entry in /etc/hosts.allow with the name of the server trying to mount the subdirectory. I restarted the nfs server. Still got the same "Permission denied" error. Any suggestions? Thanks! |
Finally got it working! My mistake, I had the wrong entry in /etc/exports file. I had the name of the server rather than the client. All's working now. Next challenge is to have the subdirectory mounted automatically so I don't have to manually do it each time after rebooting.
|
All times are GMT -5. The time now is 02:19 AM. |