LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 07-01-2003, 03:33 AM   #1
Rooster
LQ Newbie
 
Registered: Jul 2003
Posts: 5

Rep: Reputation: 0
Chain-mounting of NFS Drives (Cool idea, is it possible?)


Howdy,

I was curious as to whether the possibility of "chain-mounting" drives under Linux machines is possible.

For example, I have two machines which have large disk space and have directories which are mountable using NFS by other Linux machines. Each computer that wants to access these drives has to edit their /etc/fstab file in order to allow the drive mounting to occur during boot. In a large company (or a company that is growing rapidly), physically editing every fstab on every machine in order to access an NFS share is a pain.
I was curious if it was possible to, what I call, "chain-mount" the drives. This means all Linux machines in the company would be installed, and set up to mount two "gateway" machines automatically via fstab. (There are 2 in case 1 of the machines fails, the connection to the other computers is maintained)
All users in the company can access these "gateway" machines mounted directories as usual. Now here's the trick:

Is it possible to mount a directory within the shared directory of the "gateway" machines? This way, I can add as many new computers to the network, and only have to mount and edit the /etc/fstab files on the two gateway machines, because in theory, any directory under a mounted directory should also be mounted... correct?

I have tried this theory already, and was unable to successfully mount a directory under another remote mount. I know it's difficult to explain, and I apologize because I'm not the best at describing something without drawing a picture of it. But I figure you guru's shouldn't have a problem understanding what I'm trying to say. Thanks in advance!

-Rooster
 
Old 07-01-2003, 01:20 PM   #2
mrmcgibby
LQ Newbie
 
Registered: Jul 2003
Posts: 7

Rep: Reputation: 0
I don't see why this wouldn't work. What exactly did you try and what didn't work?
 
Old 07-02-2003, 03:30 AM   #3
Rooster
LQ Newbie
 
Registered: Jul 2003
Posts: 5

Original Poster
Rep: Reputation: 0
Here's the current configuration:

Currently, all machines are configured to mount directories on 2 different NFS server computers. This involves editing the /etc/fstab file on each and every machine that wants to have these drives mapped when the computer is booted.

Each NFS server is sharing 1 directory, which are used for file space and holding calculations done by the engineering software the users work with.

I created a third NFS server, I'll call Jenny, which has 120 GB usable for keeping installations of other machines (basically more remote file space for other machines)

Now the problem comes here, that if I want all the users to be able to access Jenny's files, I have to go around and edit each machine's /etc/fstab file so the directory on Jenny will be mounted upon boot.

What I tried to do, (what my idea is) is to mount the directory on Jenny directly under the other 2 NFS Server's shared directory. In theory, this would allow me to bypass editing all of the other client machines. In theory, all they have to do is access the directory on the old NFS servers, and there would be a new directory. (maybe called /Jenny_files or so)

I have already configured Jenny, and all machines can manually mount the exported directory on her, but when I tried to mount her directory under an already-mounted directory on the OLD NFS servers, nothing happens. Only the local machine that I'm mounting from can see it. No one else can.

So for example:
Tina (an old NFS server which all users are configured to automatically mount during boot) has a directory called /work-tina. All users can see this directory directly under their /

I go to Tina, and manually try to mount the directory on Jenny UNDER the /work-tina directory. Dig?

I do this with the following command:
> mount -t nfs jenny:/Jenny_files /work-tina

In theory, that should mount the folder "Jenny_files" under the already shared folder called "work-tina"

But..

It doesn't work. So that's my question. Is there a way to make this work, because doing this will make it A LOT simpler to add new NFS servers in the future without having to go about and edit every machine in the place. All I'd have to do, is edit the first two (old) NFS servers /etc/fstab files, and viola! Everyone can see the new NFS servers directory(s) under the old NFS Server's directory(s).

Appreciate the response
 
Old 07-02-2003, 09:41 AM   #4
mrmcgibby
LQ Newbie
 
Registered: Jul 2003
Posts: 7

Rep: Reputation: 0
Hey look! You're right. It doesn't work. I'll keep looking.
 
Old 07-02-2003, 10:01 AM   #5
mrmcgibby
LQ Newbie
 
Registered: Jul 2003
Posts: 7

Rep: Reputation: 0
Try looking here:

http://www.tldp.org/HOWTO/mini/Automount.html

This will allow you to set up automatic mounting of the directories you need. While, this first time around, you'll need to modify all the client machines, once it's done, you can create a map file (see above link) located in a central place and modify that map file as needed.
 
Old 07-03-2003, 01:30 AM   #6
Rooster
LQ Newbie
 
Registered: Jul 2003
Posts: 5

Original Poster
Rep: Reputation: 0
Hmmm, thanks. Checking it out.

I mount a directory within the already-mounted NFS directory, the newly mounted folder will not allow permissions, even though the permissions on the local machines are all set correctly to the groups, and what not. Apparantly NFS doesn't give permissions through a "chain" link like that.

It's a shame too, because with a phat enough pipe, traffic on the NFS Server is no problem, and it would make life a helluva lot easier.

I KNOW SOMEONE out there has to have done it at some point or another. I can't be the only person to think of this idea. So I'm trying to hunt that someone down, so they can tell me how to get it working.
 
Old 07-03-2003, 03:48 AM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
I'm sure other people have thoght of that idea, including the NFS developers, who i'd guess have very deliberately made this not possible due to it being an inherent security risk.

try automount, you should always be striving to get the most comprehensive and best method. Alternatively, you might just prefer to create a automatic setup script on the shared server drive that you can run on each machine boot once you've mount the relevant partition
 
Old 07-03-2003, 10:35 AM   #8
mrmcgibby
LQ Newbie
 
Registered: Jul 2003
Posts: 7

Rep: Reputation: 0
Could you explain the problem with this method? After much searching, I was unable to find an explanation.
 
  


Reply



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
Problems mounting drives in NFS Veteq Linux - Software 1 11-19-2005 01:17 PM
nfs client on knoppix 3.9 - problem mounting nfs drive Rod Butcher Linux - Networking 1 09-21-2005 04:18 AM
Linux(the Idea is cool) is eating up my pc kirkjlewis Linux - Newbie 7 01-03-2005 10:02 AM
Mounting mounting extended partition and its Logical drives desbyleo Linux - Newbie 10 02-18-2002 03:13 PM
cool idea... Jeffrey LQ Suggestions & Feedback 31 06-13-2001 07:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:09 AM.

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
Open Source Consulting | Domain Registration