Setting Up Standard Linux File Systems and Configuring NFSv4 Server – Part 2

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Use our Linode referral link if you plan to buy VPS (it starts at only $10/month).
  4. Support us via PayPal donate - Make a Donation
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Gabriel Cánepa

Gabriel Cánepa is a GNU/Linux sysadmin and web developer from Villa Mercedes, San Luis, Argentina. He works for a worldwide leading consumer product company and takes great pleasure in using FOSS tools to increase productivity in all areas of his daily work.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

17 Responses

  1. Panos says:

    Can you please go to your server and do:

    ls -ld /NFS-SHARE /NFS-SHARE/mydir

    I need to see your permissions, the owner and the group of these folders, in order to troubleshoot some of my permission problems.

  2. Christopher Adigun says:

    Hi Gabriel,

    Many thanks for this guide….

    But I was not able to find /etc/default/nfs-common under my CENTOS 7, i have installed the nfs-utils package.

    What I could find is /etc/idmapd.conf that pertains to IDMAPD..

    Any idea about this

    • Christopher Adigun says:

      I have been trying to setup this up under Centos 7.1 but RPCBIND service is always giving an error when I check the status:

      root@LFCE ~]# service rpcbind status
      Redirecting to /bin/systemctl status rpcbind.service
      rpcbind.service – RPC bind service
      Loaded: loaded (/usr/lib/systemd/system/rpcbind.service; static)
      Active: failed (Result: exit-code) since Wed 2015-08-19 13:47:23 WAT; 15min ago
      Main PID: 2412 (code=exited, status=2)
      CGroup: /system.slice/rpcbind.service

      Aug 19 13:46:03 LFCE.local systemd[1]: rpcbind.service: main process exited, code=exited, status=2/INVALIDARGUMENT
      Aug 19 13:46:03 LFCE.local systemd[1]: Unit rpcbind.service entered failed state.
      Aug 19 13:46:03 LFCE.local systemd[1]: Starting RPC bind service…
      Aug 19 13:46:04 LFCE.local systemd[1]: Started RPC bind service.
      Aug 19 13:47:23 LFCE.local systemd[1]: Stopping RPC bind service…
      Aug 19 13:47:23 LFCE.local systemd[1]: rpcbind.service: main process exited, code=exited, status=2/INVALIDARGUMENT
      Aug 19 13:47:23 LFCE.local systemd[1]: Stopped RPC bind service.
      Aug 19 13:47:23 LFCE.local systemd[1]: Unit rpcbind.service entered failed state.

      The LFCE exam is now using Centos 7! We need to fix this soon..

  3. Eduardo CR says:

    Hello, I have a problem when I do the mount | grep nfs-share step, nfs-share is not mounted I tried over and over and is not mounted,
    Thanks

    • @Eduardo,
      What distribution are you using? Should not make a significant difference but I just wanted to know.
      Please write an outline of all the steps (both on the server and on the client) that you took and send it to me via email at gacanepa gmail dot com. I will take a look when I have a few minutes and then get back to you.

  4. JNat says:

    Hey,

    I had this set of tutorials bookmarked for a while now, and was just getting in to it, but I seem to be finding some problems following this one in particular.
    In the first tutorial you pointed that we should install portmap, and I cannot find it anywhere, but when I try to install it yum (I’m using a minimal install of CENTOS 6.6) tells me that there’s no need to install it because I have rpcbind installed (so I think that’s settled, and that it is not a problem, but I thought I might as well bring it up too).
    And on this one, I can’t seem to install nfs-common, and there’s no /etc/nfs-common file to edit either (consequently, I’d say). I don’t know if this is a problem, but the idmapd service seems to be run by a package called rpc.idmapd. So basically I was wondering if this is a problem, and if so if it is solved by creating the /etc/nfs-common instead of editing it and then starting the rpcidmapd service instead of nfs-common, or if I’m missing some package, or if the solution is elsewhere I’m not seeing.

    As a side note, the rest of the article is perfectly well written and clear. Also, I’m relatively new to Linux, only having completed the Intro to Linux course on EDx and not much else, so my doubts may be due to this.

    Thanks for all the help and keep up the good work!

    • @JNat,
      I am sorry it’s taken me so long to post a reply to your question. I used a Debian box as NFS server for this article, so it’s likely that some of the package name may differ a little. You may want to refer to this link for details on installing the server using a CentOS box: https://www.howtoforge.com/setting-up-an-nfs-server-and-client-on-centos-6.3. Hope it helps! Don’t hesitate to drop another comment if for some reason it doesn’t work for you – I promise to reply faster than this time.
      On a side note, if you’re relatively new to Linux, I’d highly recommend you download The Linux Command Line from linuxcommand.org. It is by far the best introductory book to Linux.
      Finally, thanks for your kind words about my work.

  5. Vlad says:

    Hi,

    I think this tutorial is missing the firewall configuration part that needs to be done in order to manage to mount and also access the share from another system.
    Probably the firewall configuration will be covered in part 8 but I think you will have to mention the ports that need to be opened.
    I have found a good guide here: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guide/s2-nfs-nfs-firewall-config.html

    Thanks.

    • @Vlad,
      Thank you for taking the time to read and to comment on this article. Yes, you’re right, I will be covering firewall configuration later on the series but in Part 10 actually, where I will discuss firewall applications. That is why I did not cover the setup of a transparent proxy with Squid in Part 5 either (which will be covered in Part 10).
      Just FYI, Part 8 will be more of setting up and configuring iptables, than specific applications as mentioned before.
      Thanks also for the link that you shared. Both I and the rest of the readers thank you for that!
      Best,
      Gabriel

      • vlad says:

        @Gabriel
        Thanks for your feedback I am looking forward to see the next tutorials.
        I noticed the selinux blocks the nfs connection if I disable it it works ok, for the moment I don’t know how to setup selinux for this job.
        So in the LFCE context the configuration of the nfs should be done with selinux enabled?

        Thanks,
        Vlad

  6. Gabriel A. Cánepa says:

    @Devil,
    This article was prepared using a real system, as you can see in the images above.
    If something does not work ok in your setup, please make sure you are using one of the distributions listed in the LFCE options.
    Then feel free to get back to us if you run into any issues.
    Thanls.

  7. CertDepot says:

    Hi,

    Your article is very interesting as usual.
    However, I saw a confusing thing: you are writing the term imapd instead of idmapd (I suppose) at least twice in the article.
    Could you fix this mistake to avoid any confusion for all the beginners who are reading your series of articles?

    Regards.

    • @CertDepot,
      I just checked and can’t find the typo you’re referring to. Maybe it was fixed by the editor when you submitted your comment. Either way, you’re right, when we’re talking about NFS it should be idmapd and not imapd.
      On a side note, I checked your web site the other day and liked it very much! Congrats for your work!

      • Devil says:

        thats not sufficent for nfs server like to deep the solutions for nfs4 version
        this typewritten i wii check but some kind of error is there like mount.nfs4 like that………………..please nfs4 berifly understand me ………..

  8. Deepanjan says:

    Hi, Gabriel

    how can we share the data directory so that it can be accessed from windows machine too

    • @Deepanjan,
      Mounting network shares in Windows clients is out of the scope of this series. However, I like your question because you’ve brought up an interesting topic anyway. I do not have access to a Windows box right now but I promise to look into it later when I get home.
      Thanks for taking the time to comment on this post.

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

Join Over 300K+ Linux Users
  1. 177,942
  2. 8,310
  3. 37,548

Are you subscribed?