LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   NFS hangs on mount (https://www.linuxquestions.org/questions/linux-server-73/nfs-hangs-on-mount-4175470653/)

azurianarcher 07-23-2013 02:28 PM

NFS hangs on mount
 
I am trying to mount a directory using NFS. The directory is on a separate partition and I am sharing its mount point.

When I try to mount the shared directory on a client (even if that client is the same machine as the server), the mount command hangs (seemingly) forever (I have let it run for 6 hours before stopping it).

The disk containing the shared data does have a lot of data (about 4TB) on it, but I don't think the server should have to examine all that data to mount it remotely.

Is there anything I can do to make this work?

I am on Fedora 17 x64

My /etc/exports:

Code:

/media/Data/Media      127.0.0.1(ro,nohide)
Note that I am using 127.0.0.1 temporarily for testing.
Also note that the drive is mounted at /media/Data and Media is a subdirectory on that drive.

Let me know what extra information I can provide (I don't know much about NFS).

linosaurusroot 07-24-2013 05:54 AM

What do you get from these commands on the server?
Code:

showmount -e
showmount -a
rpcinfo -p


azurianarcher 07-24-2013 08:37 AM

This is what I get (note that this is before any mount commands have been issued after starting the server fresh, selinux is in permissive mode and the firewall is turned off)

EDIT: I also tried with selinux disabled and nothing changed

Code:

% showmount -e                                                                                             
Export list for sarah25.home:
/media/Data/Media 127.0.0.1
 % showmount -a   
All mount points on sarah25.home:
 % rpcinfo -p
  program vers proto  port  service
    100000    4  tcp    111  portmapper
    100000    3  tcp    111  portmapper
    100000    2  tcp    111  portmapper
    100000    4  udp    111  portmapper
    100000    3  udp    111  portmapper
    100000    2  udp    111  portmapper
    100024    1  udp  59650  status
    100024    1  tcp  50026  status
    100003    2  tcp  2049  nfs
    100003    3  tcp  2049  nfs
    100003    4  tcp  2049  nfs
    100227    2  tcp  2049  nfs_acl
    100227    3  tcp  2049  nfs_acl
    100003    2  udp  2049  nfs
    100003    3  udp  2049  nfs
    100003    4  udp  2049  nfs
    100227    2  udp  2049  nfs_acl
    100227    3  udp  2049  nfs_acl
    100021    1  udp  4002  nlockmgr
    100021    3  udp  4002  nlockmgr
    100021    4  udp  4002  nlockmgr
    100021    1  tcp  4002  nlockmgr
    100021    3  tcp  4002  nlockmgr
    100021    4  tcp  4002  nlockmgr
    100005    1  udp  20048  mountd
    100005    1  tcp  20048  mountd
    100005    2  udp  20048  mountd
    100005    2  tcp  20048  mountd
    100005    3  udp  20048  mountd
    100005    3  tcp  20048  mountd
    100011    1  udp    875  rquotad
    100011    2  udp    875  rquotad
    100011    1  tcp    875  rquotad
    100011    2  tcp    875  rquotad


gdizzle 07-30-2013 01:27 AM

Change:

Code:

/media/Data/Media      127.0.0.1(ro,nohide)
To this:

Code:

/media/Data/Media      *(ro,nohide)
As a test your mounting your local loopback there are known problems:

http://h10025.www1.hp.com/ewfrf/wc/d...name=c02073470

azurianarcher 08-04-2013 07:20 PM

Ok I tried what you said (changing /etc/exports and using a different machine) and I get the same problem. The client is Linux Mint 15 x64 and the mount hangs indefinitely.

I also tried exporting my home directory, so my /etc/exports now reads

Code:

/media/Data/Media      *(ro,nohide)
/home/mehrlich                *(ro,nohide)

When I try to mount /home/mehrlich from the client machine, it mounts immediately (note that /home/mehrlich is on my system partition while /media/Data/Media is on the raid array). Now, some of the directories under /home/mehrlich are bound directories to folders under /media/Data. When I try to browse to those folders over nfs (after mounting /home/mehrlich on the client), the folders appear empty. However when I browse to those same folders on the server they are populated as they should be.

Just to be clear I am mounting on the client using
Code:

# Hangs forever
sudo mount -t nfs 192.168.1.54:/media/Data/Media /mnt

# Mounts immediately but bound directories are empty
sudo mount -t nfs 192.168.1.54:/home/mehrlich /mnt

Thanks for the help and sorry about the late reply

nico34 09-15-2013 05:45 AM

/media/Data/Media *(rw,sync,no_root_squash) #you can change rw to ro if you want
/home/mehrlich *(rw,sync,no_root_squash)

try this on your exports mate, then restart nfs server and retry mounting again on your client

bkcreddy17 09-17-2013 06:54 AM

Why can't you use automounts? This will mount on demand and will stop that hang issue.


All times are GMT -5. The time now is 10:07 AM.