Results 1 to 2 of 2

Thread: NFS4 mount problem

  1. #1
    Join Date
    Feb 2010

    NFS4 mount problem

    I have been experimenting with nfs4.I am facing a dilemma with nfs4.I want the nfs-client to only see a particular sub-directory not the whole directory structure when mounting the export.For example I would like the client to see only the home directory instead of whole subdirectory structure inside netboot which is acting as the root export.Using the hide option does not work.Here's the /etc/exports sample.

    I would appreciate if someone could help me out.
    I really hope that this question does not go unnoticed unlike the the question posted by a humble fellow on this forum
    I really hope some one would answer this question and put a stop to this kind of question being asked again and again.
    Last edited by devaj; June 8th, 2013 at 05:09 PM.

  2. #2
    Join Date
    Oct 2008
    Ottawa, Canada
    Xubuntu 16.04 Xenial Xerus

    Re: NFS4 mount problem

    Hi there!

    First off, this page is a good place to start when setting up NFSv4

    Basically, NFSv4 lets your setup the server directory structure the way you want it. Its full potential is unleashed with bind mounts.

    So first create an NFS home, e.g. /nfs, and empty subdirectories e.g. /nfs/home
    Then set the machine to mount a instance of /netboot/home inside /nfs. In /etc/fstab, add the entry
    /netboot/home /nfs/home none bind 0 0
    Your /etc/exports should look like this:
    root_squash is implicit.
    Reboot. Your clients should be able to mount with an fstab entry along those line:
    <serverIP>:/home <localdir> nfs <mountparameters> 0 0
    Last edited by LewisTM; June 10th, 2013 at 08:45 PM. Reason: Corrected exports content
    husband@wife$ make sandwich
    Permission denied
    husband@wife$ sudo make sandwich


Posting Permissions

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