Find the answer to your Linux question:
Results 1 to 8 of 8
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Chain-mounting of NFS Drives (Cool idea, is it possible?)


    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!


  2. #2
    Linux Guru sarumont's Avatar
    Join Date
    Apr 2003
    Can you try to explain some of the setups as far as directrory structure that you've tried so far?
    "Time is an illusion. Lunchtime, doubly so."
    ~Douglas Adams, The Hitchhiker's Guide to the Galaxy

  3. #3
    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"


    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

  4. $spacer_open
  5. #4
    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.

  6. #5
    Linux Guru sarumont's Avatar
    Join Date
    Apr 2003
    If I'm digging ( ) this correctly, then you haven't tried this:

    Have your shared shite for the NFS server be in /shared/local and have /shared/Jenny mount Jenny's shared folder. Then just share /shared.

    It didn't seem to me like you tried this, but it IS late and I AM tired, so excuse me if I'm wrong.
    "Time is an illusion. Lunchtime, doubly so."
    ~Douglas Adams, The Hitchhiker's Guide to the Galaxy

  7. #6
    Just Joined! xgrep's Avatar
    Join Date
    Jan 2007

    Exclamation Need more lights...

    I don't seem to understand everything you wrote, but I supposed it's about the problem de to "mount a nfs directory which is already a shared directory mounted from another nfs server" ...

    Well it's the point here, I would like to know if anyone succeeds in doing that?!

    My situation is rather simple:

    1/ The network synopsis
    Machine A(eth1) <===> Machine B(eth1)
    Machine B(eth0) <===> Machine C(eth0)
    Machine C cannot reach Machine A

    2/ Sharing synopsis
    Machine A exports "localdiskA" to Machine B
    Machine B mounts by nfs a Machine A's directory "localdiskA" and mapped on Machine B's directory "nfsdiskA".
    Machine B exports "nfsdiskA" to Machine C
    Machine C would like to mount by nfs Machine B's directory "nfsdiskA".

    3/ Problem
    Machine C doesn't see by nfs Machine B's exported directory "nfsdiskA" a mapped of a Machine A's nfs shared directory "localdiskA"

    Am i clear enough ?


  8. #7

    NFS mounts of 'stacked' mounts

    In a sense, what you are asking is, 'Can you export a mountpoint from one system (NFS Server) so that ALL discrete mountpoints underneath that mountpoint also get mounted on the clients.' - right?

    I would have to say this is not supported in any flavor of Unix or Linux that I am aware of. If so, you could (erroneously) export your root directory ('/') and have absolutely everything underneath it available on the client system with one mount.

  9. #8
    Just Joined! xgrep's Avatar
    Join Date
    Jan 2007

    mount from a mounted nfs mounted nfs...

    In a sense you have understood.
    I would like to "mount a directory from a nfs server (B) which is already itself a nfs-mounted directory from another nfs server (A)."

    The error occurs a "privelege problem, permission denied"...

    If you said you haven't heard about this, well thanks in advance.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts