LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-16-2004, 03:30 AM   #1
kiwi8
LQ Newbie
 
Registered: Jul 2004
Posts: 4

Rep: Reputation: 0
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?
 
Old 07-16-2004, 04:53 AM   #2
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
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
 
Old 07-16-2004, 05:50 AM   #3
kevinatkins
Member
 
Registered: Jan 2004
Location: cheshire, uk
Distribution: Ubuntu Hoary
Posts: 605

Rep: Reputation: 32
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.
 
Old 07-17-2004, 11:18 PM   #4
kiwi8
LQ Newbie
 
Registered: Jul 2004
Posts: 4

Original Poster
Rep: Reputation: 0
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.
 
Old 07-18-2004, 01:09 PM   #5
kevinatkins
Member
 
Registered: Jan 2004
Location: cheshire, uk
Distribution: Ubuntu Hoary
Posts: 605

Rep: Reputation: 32
hi,

you probably want to have a look at your /etc/hosts.allow and /etc/hosts.deny files...
 
Old 07-18-2004, 06:13 PM   #6
kiwi8
LQ Newbie
 
Registered: Jul 2004
Posts: 4

Original Poster
Rep: Reputation: 0
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!
 
Old 07-18-2004, 06:33 PM   #7
kiwi8
LQ Newbie
 
Registered: Jul 2004
Posts: 4

Original Poster
Rep: Reputation: 0
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to mount a nfs mount from linux client to AIX nfs server dennyqian AIX 8 09-22-2006 03:34 AM
mount a share from server 2003 on linux amon Linux - Networking 7 04-26-2006 12:53 PM
make "localhost" point to a subdirectory of Apache server oudent Linux - Networking 2 07-21-2005 07:37 PM
Linux & MS Sharepoint server. How to mount? rjkfsm Linux - Networking 5 06-19-2005 03:00 PM
read-only shared mount between linux and w2k server fostiator Linux - Networking 1 06-10-2004 03:14 AM


All times are GMT -5. The time now is 11:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration