2

So, I am trying to mount folders from server1 and server2 on server0. I can't seem to get the second folder mounted. Here is what I did:

  1. Created a folders /nfs/home and /nfs/programs on server0 . I want all the user directories of server1 mounted at /nfs/home. I want all the programs on server2 mounted at /nfs/programs (on server2 they are at /home/programs).

  2. Edited auto.master to have these entries:

    /nfs/home                                   /etc/auto.home --ghost
    /nfs/programs                               /etc/auto.programs --ghost
    
  3. The corresponding auto.* files are:

    * 10.0.0.34:/home/&
    

    and

    * 10.0.7.10:/home/programs/&
    

I have enabled the nfs service and added:

    / server*.domain(rw)

to my /etc/exports file.

I disabled firewalld ( this is an internal network ).

The home folders mount fine to /nfs/home/* but there is nothing for /nfs/programs when I try to cd into them. I'm I making some simple mistake that I can't see?

--Update!--

It looks like my exports file on server2 has a problem. I changed it from:

    / server*.domain(rw)

to:

    /home server*.domain(rw)

since I'm (for now) only interested in mounting from /home/programs. It seems to be working now. It seems you cannot share the root directory with nfs? Here is my df:

[root@server programs]# df
Filesystem                     1K-blocks       Used Available Use%         Mounted on
/dev/mapper/centos-root         52403200    5145132  47258068  10% /
devtmpfs                         8055632          0   8055632   0% /dev
tmpfs                            8071364        256   8071108   1% /dev/shm
tmpfs                            8071364       9444   8061920   1% /run
tmpfs                            8071364          0   8071364   0% /sys/fs/cgroup
/dev/nvme0n1p1                    508588     161660    346928  32% /boot
/dev/mapper/centos-home        188766152      81816 188684336   1% /home
tmpfs                            1614276         20   1614256   1% /run/user/1000
tmpfs                            1614276         24   1614252   1% /run/user/42
tmpfs                            1614276          8   1614268   1% /run/user/0
tmpfs                            1614276          0   1614276   0% /run/user/1015
10.0.0.34:/home/me            1170949120 1135836160  35112960  98% /nfs/home/zdhughes
10.0.7.10:/home/programs/root6.06  182973440   11874304 171099136   7% /nfs/programs/root6.06

Can anyone provide some nuance about what is going on here? How would one make the whole disk mountable?

Thanks!

  • Two quick questions: 1) what variant is this (*bsd, Linux of some stripe)? and 2) you noted starting nfs services, did you also start autofs services? – Thomas N Aug 18 '16 at 20:11
  • can you mount that /nfs/programs manually ? – Matija Nalis Aug 18 '16 at 20:17
  • are you able to mount the programs share from server2 onto server0 with a hard nfs mount command ? Like mount -t nfs 10.0.7.10:/home/programs /nfs/programs ?? – MelBurslan Aug 18 '16 at 20:18
  • @ThomasN I am using CentOS 7, yes autofs is running. – zdhughes Aug 18 '16 at 21:23
  • @MelBurslan When I use mount -t nfs 10.0.7.10:/home/programs /nfs/programs I get: mount.nfs: access denied by server while mounting 10.0.7.10:/home/programs – zdhughes Aug 18 '16 at 21:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.