0

I have mounted two network drives in the past and everything did work like it should but now I have some problems.

I know I had this problem in the past but I really can't remember how to solve it but it had something to do with those two drives.

I can't access my var directory anymore (The two drives are mounted there). It will just load and do nothing.

Same happens when running commands like df -h to see my storage. It will just load and load and do nothing. (df -l does work)

Any ideas what I can try to solve this problem?

Edit:

Informations from mount:

XXX.XXX.XXX.XXX:/voln1 on /var/storage type nfs (rw,relatime,vers=3,rsize=65536,wsize=65536,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=XXX.XXX.XXX.XXX,mountvers=3,mountport=635,mountproto=udp,local_lock=none,addr=XXX.XXX.XXX.XXX)

XXX.XXX.XXX.XXX:/voln2 on /var/storage2 type nfs (rw,relatime,vers=3,rsize=65536,wsize=65536,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=XXX.XXX.XXX.XXX,mountvers=3,mountport=635,mountproto=udp,local_lock=none,addr=XXX.XXX.XXX.XXX)
7
  • Please tell us what protocol you use to connect to your network drives, and which reports you get with you try to do it manually
    – sina bala
    Feb 16 at 11:16
  • @sinabala I am not sure how to answere this. Maybe 'network drive' was not the right word for it. I just mounted a storage server to var/storage to access and store files
    – sirzento
    Feb 16 at 11:19
  • How. Which protocol.
    – sina bala
    Feb 16 at 11:21
  • @sinabala If looking at mount it says proto=tcp
    – sirzento
    Feb 16 at 11:24
  • I'd guess that means NFS. How did you mount it? What was the thing you have done to mount it?
    – sina bala
    Feb 16 at 11:34

1 Answer 1

1

In ps fuxa for those processes you ran that are hanging, the state is likely "D" or "uninterruptible sleep". This means you most likely lost connection at some point and it never re-established it, from another console/terminal run umount -l /path/to/network/mounted/volume then remount them and it should work.

umount -l is lazy unmount (so if you have things like databases on this NFS volume you should avoid doing this).

From another console window you can run something like cat /proc/$(pgrep df)/{status,stack} and it should show you what the processes are waiting on which should confirm my suspicion about the share not being reachable even if it is displayed as being mounted. Once these shares have been unmounted with umount -l the two processes will exit and complete. If umount -l fails you, then it's time to go to umount -f which can be used to kill nfs connections that just won't hang up.

4
  • What are "those"? (From your first sentence?)
    – sina bala
    Feb 16 at 11:35
  • @sinabala I was referring to the processes that the OP mentioned that are hanging, i edited to clarify the answer.
    – linuxgeek
    Feb 16 at 11:40
  • ps fuxa doesn't show me anything with just D but two sftp-server processes with Ds. Btw when I umount those, the autocomplete while writing the path just kills my console. Needed to write the path myself. But umount both will allow me again to run df -h for example. After mounting them again, everything works now thanks! Any Idea on how to prevent something like this from happening again?
    – sirzento
    Feb 16 at 12:04
  • That's because your console is getting stuck in an uninterruptible sleep too trying to complete it because bash completion is trying to enumerate possibilities within that directory as well next. Something like autofs might work for re-establishing the connection, your /proc/mounts or mount command looks like you're telling NFS to use proto=tcp which is good, you may also wish to adjust the mountproto to tcp as well as udp is for compatibility with older nfs versions. Just ensure whatever server is hosting the nfs volumes doesn't go down and it shouldn't happen.
    – linuxgeek
    Feb 16 at 13:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .