LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Reply
 
Search this Thread
Old 05-23-2005, 04:34 PM   #1
mijohnst
Member
 
Registered: Nov 2003
Location: Huntsville, AL
Distribution: RHEL, Solaris, OSX, SuSE
Posts: 401

Rep: Reputation: 31
Mounting NFS Share To Another Machine


I was wondering if this is possible. I have a linux machine that connects to two different networks. Is it possible that if I mount a remote NFS share to my dual network computer and then export it out so that machines from the other network can use it?

Poor Example:

Box_1 (/share1) --> Box_2 (mount Box_1:/share1 /share2) --> Box_2 (export /shar2) --> Box_3 (mount Box_2:/share2)

Last edited by mijohnst; 05-23-2005 at 04:45 PM.
 
Old 05-23-2005, 04:50 PM   #2
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,982
Blog Entries: 1

Rep: Reputation: 83
I guess you can. From the point of view of the system, a NFS mounted partition is a directory, just like anyother... so I guess you could. Haven't tried though, so maybe there's a "catch"
 
Old 05-23-2005, 06:22 PM   #3
mijohnst
Member
 
Registered: Nov 2003
Location: Huntsville, AL
Distribution: RHEL, Solaris, OSX, SuSE
Posts: 401

Original Poster
Rep: Reputation: 31
Thanks Eantoranz.

I"m trying to do it, but it's not working right because it says "mount: box_2:/share2 failed, reason given by server: Permission denied"

At least it's doing something.

Last edited by mijohnst; 05-23-2005 at 06:33 PM.
 
Old 05-23-2005, 06:44 PM   #4
mijohnst
Member
 
Registered: Nov 2003
Location: Huntsville, AL
Distribution: RHEL, Solaris, OSX, SuSE
Posts: 401

Original Poster
Rep: Reputation: 31
Maybe someone can see what I'm doing wrong.

###########
Box_2
###########

/etc/exports

/home 10.10.10.1/255.255.252.0(async,rw,no_root_squash)
/share2 *(async,rw,no_root_squash)


##########
Box_3
##########

/etc/fstab

/dev/hda2 / ext3 defaults 1 2
/dev/hda5 swap swap defaults 0 0
/dev/hda6 /scratch ext3 defaults 1 2
/dev/hda1 /boot ext3 defaults 1 2
/dev/hda3 /opt ext3 defaults 1 2
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
none /dev/pts devpts defaults 0 0
none /proc proc defaults 0 0
box_2:/home /home nfs rw 0 0
box_2:/share2 /share nfs rw 0 0


The home directory maps just fine. Why would I be getting a permission denied?

Last edited by mijohnst; 05-24-2005 at 12:09 PM.
 
Old 05-25-2005, 09:13 AM   #5
mijohnst
Member
 
Registered: Nov 2003
Location: Huntsville, AL
Distribution: RHEL, Solaris, OSX, SuSE
Posts: 401

Original Poster
Rep: Reputation: 31
Bump

Can anyone see what I'm doing wrong? I still keep getting "mount: box_2:/share2 failed, reason given by server: Permission denied" even when I disable iptables. Would else could be blocking it?
 
Old 05-25-2005, 11:56 AM   #6
mijohnst
Member
 
Registered: Nov 2003
Location: Huntsville, AL
Distribution: RHEL, Solaris, OSX, SuSE
Posts: 401

Original Poster
Rep: Reputation: 31
More info:

From /var/log/messages

May 25 09:41:06 Box_2 rpc.mountd: authenticated mount request from Box_3:699 for /share2 (/share)

exportfs from server

/home 10.10.10.1/255.255.252.0
/share2 10.10.10.1/255.255.252.0
 
Old 05-25-2005, 12:42 PM   #7
mijohnst
Member
 
Registered: Nov 2003
Location: Huntsville, AL
Distribution: RHEL, Solaris, OSX, SuSE
Posts: 401

Original Poster
Rep: Reputation: 31
Update:

From what I can tell, you cannot nfs share out a directory that is being used as a mount point for another nfs system. When I umount the nfs share from box_1 to box_2 I am then able to nfs connect from box_3 to box_2.

I hope this is helpful to someone.
 
Old 06-24-2005, 03:35 AM   #8
swergar
LQ Newbie
 
Registered: Jun 2005
Posts: 1

Rep: Reputation: 0
Thanks, I get the same problem too.
 
Old 06-24-2005, 11:30 AM   #9
mijohnst
Member
 
Registered: Nov 2003
Location: Huntsville, AL
Distribution: RHEL, Solaris, OSX, SuSE
Posts: 401

Original Poster
Rep: Reputation: 31
I found out that the reason that it won't work is because of file locking and other services that are looking out to make sure that no one file is being used in two different spots. I ended up using software from ADIC called Stornext to mount a SAN partition and then I exported that. It's very expensive but since we have a license for it I got lucky.

Please let us know what you find for a solution.
 
  


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
Can't start X on a machine where users home are on an NFS share slacroix Linux - Networking 2 06-10-2005 01:37 PM
Mounting an nfs share - Permission Denied doctorwebbox Linux - Networking 5 05-30-2005 02:45 AM
Multiple users mounting NFS share Vincent_Vega Linux - Networking 4 08-01-2004 11:04 AM
mounting a NFS share using samba phatboyz Linux - Software 2 03-30-2004 01:26 PM
nfs share is not mounting automatically pawlub Linux - General 1 01-03-2004 07:21 PM


All times are GMT -5. The time now is 12:00 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration