2 NFS mount points, pointing to the same NFS export? - Linux

This is a discussion on 2 NFS mount points, pointing to the same NFS export? - Linux ; I know it's possible to have 2 NFS mounts, on the same host, to point to the same NFS export. Like this: mount 192.168.0.1:/storagearray /directory1 mount 192.168.0.1:/storagearray /directory2 However, is this the proper way to do it? Does this use ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: 2 NFS mount points, pointing to the same NFS export?

  1. 2 NFS mount points, pointing to the same NFS export?

    I know it's possible to have 2 NFS mounts, on the same host, to point to the
    same NFS export. Like this:

    mount 192.168.0.1:/storagearray /directory1
    mount 192.168.0.1:/storagearray /directory2


    However, is this the proper way to do it? Does this use up a lot of
    resources? Would a better approach be to just NFS mount once, say, to
    /Directory1, and then use a symbolic link for /Directory2 (pointing to
    /Directory1)? If anyone can shed some light on the pros and cons of this
    topic, I would gretly appreciate it.

    Thanks,
    Brian



  2. Re: 2 NFS mount points, pointing to the same NFS export?

    BT wrote:
    > I know it's possible to have 2 NFS mounts, on the same host, to point to the
    > same NFS export. Like this:
    >
    > mount 192.168.0.1:/storagearray /directory1
    > mount 192.168.0.1:/storagearray /directory2


    > However, is this the proper way to do it?

    Yes.

    > Does this use up a lot of resources?

    No.


    > Would a better approach be to just NFS mount once, say, to
    > /Directory1, and then use a symbolic link for /Directory2
    > (pointing to /Directory1)?

    This way is the most time-consuming, and may conflict with chroot.
    There are also the third way: mount --bind

    IMHO all 3 ways leads to virtually the same result.



    --
    qq~~~~\ [ IP ]
    / /\ \ [ FAQ you ]
    \ /_/ /
    \____/

  3. Re: 2 NFS mount points, pointing to the same NFS export?

    Innocenti Maresin wrote:

    > BT wrote:
    >> I know it's possible to have 2 NFS mounts, on the same host, to point to
    >> the same NFS export. Like this:
    >>
    >> mount 192.168.0.1:/storagearray /directory1
    >> mount 192.168.0.1:/storagearray /directory2

    >
    >> However, is this the proper way to do it?

    > Yes.
    >
    >> Does this use up a lot of resources?

    > No.
    >
    >
    >> Would a better approach be to just NFS mount once, say, to
    >> /Directory1, and then use a symbolic link for /Directory2
    >> (pointing to /Directory1)?

    > This way is the most time-consuming, and may conflict with chroot.
    > There are also the third way: mount --bind
    >
    > IMHO all 3 ways leads to virtually the same result.
    >
    >
    >


    Using two different mounts you may get subtle problems with file
    consistency. Changes on one mount point won't be immediately visible on
    another.

    The only application for two mount points I can think of is direct vs.
    cached IO. Databases require direct IO which is slow for "normal" file
    access. So you may add another mount without direct IO to get "fast file
    copy". OTOH mixing database and normal files on one mount point is bad idea
    anyway


    =arvi=

+ Reply to Thread