SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2013-02-22 15:28:14

Zill
#! CrunchBanger
From: Lincolnshire, UK
Registered: 2009-10-25
Posts: 201

Reboot (and sometimes shutdown) hangs if nfs mounted.

Last edited by Zill (2013-02-23 20:56:32)

Offline

Be excellent to each other!

#2 2013-02-22 19:43:38

RitterSport
#! Member
Registered: 2013-02-18
Posts: 58

Re: Reboot (and sometimes shutdown) hangs if nfs mounted.

I'm having the same exact problem with Waldorf on a Eeepc 701.  I accidentally posted my thread in the stable section of this forum (I thought Waldorf was the stable version).  Can you go into more detail on how you fixed this using autofs?  I can find my way around linux systems, but I'm no expert.

Offline

#3 2013-02-22 20:28:13

Zill
#! CrunchBanger
From: Lincolnshire, UK
Registered: 2009-10-25
Posts: 201

Re: Reboot (and sometimes shutdown) hangs if nfs mounted.

RitterSport:
Open (as root) the existing /etc/fstab file eg.

sudo nano /etc/fstab

"comment-out" your existing NFS mount(s) by adding a "#" at the start of the line(s) and then save the file with Ctrl-o and exit with Ctrl-x.

Unmount the existing NFS mounts:

sudo umount -a

Install autofs eg.

sudo apt-get install autofs

Open (as root) new file /etc/auto.master eg.

sudo nano /etc/auto.master

Assuming that you want the mounted directories under /mnt, add the following line at the end:

/mnt	/etc/auto.misc	--timeout  60	--ghost

Note that you can change the mount directory to one of your choice.  The "ghost" option ensures that even unmounted directories are always visible.  Remove this if you prefer to only see the directory when you enter the path to the mounted directory.
Save the file with Ctrl-o and exit with Ctrl-x.

Open (as root) new file /etc/auto.misc eg.

sudo nano /etc/auto.misc

Add line(s) at the end for your mount directories in a similar format to your /etc/fstab file eg:

client_mount_directory_1	-fstype=nfs,rsize=8192,wsize=8192,nosuid,soft	server_1:dir_to_be_shared_1
client_mount_directory_2	-fstype=nfs,rsize=8192,wsize=8192,nosuid,soft	server_2:dir_to_be_shared_2

Adjust the mount options to suit your requirements.
Save the file with Ctrl-o and exit with Ctrl-x.

Start the autofs service:

sudo service autofs restart

Autofs should now be running and if the PC is shutdown or restarted this service should start automatically.  Your NFS mounts should be visible and will show the contents when accessed either via a terminal or via the Thunar GUI file manager.  Hopefully, the PC will now shutdown and/or restart without hanging. wink

Last edited by Zill (2013-02-23 12:13:04)

Offline

#4 2013-02-23 00:04:03

RitterSport
#! Member
Registered: 2013-02-18
Posts: 58

Re: Reboot (and sometimes shutdown) hangs if nfs mounted.

That was very detailed.  Thanks!

The mount doesn't seem to be working.  The share is there in the /mnt directory, and it looks like a directory (the permissions are dr-xr-xr-x), but when I try to cd there, it tells me no such file or directory.

Here's what I put into auto.misc (the first line is the commented out line that I got from fstab, and the second is my attempt to format it for auto.misc):

#//192.168.1.13/share /mnt/Terasaur cifs auto,iocharset=utf8,nobr1,username=,password=,_netdev,uid=,gid= 0 0
Terasaur	-fstype=nfs,rsize=8192,wsize=8192,nosuid,soft	192.168.1.13:share

I'm sure I did something wrong.  Any ideas?

Offline

#5 2013-02-23 12:08:13

Zill
#! CrunchBanger
From: Lincolnshire, UK
Registered: 2009-10-25
Posts: 201

Re: Reboot (and sometimes shutdown) hangs if nfs mounted.

Offline

#6 2013-02-23 12:24:30

RitterSport
#! Member
Registered: 2013-02-18
Posts: 58

Re: Reboot (and sometimes shutdown) hangs if nfs mounted.

Will do.  Thanks!

ETA:  That worked! Thanks!

For anyone following along, here's the line I used in auto.misc to connect to a CIFS share (mine doesn't have a user ID or pwd, but I had to add those in with blanks anyway:

MountName	-fstype=cifs,rw,username=,password=	://location/directory

Last edited by RitterSport (2013-02-23 12:51:34)

Offline

#7 2013-02-23 20:59:08

Zill
#! CrunchBanger
From: Lincolnshire, UK
Registered: 2009-10-25
Posts: 201

Re: Reboot (and sometimes shutdown) hangs if nfs mounted.

RitterSport:  I'm pleased you got it working. smile

Offline

#8 2013-02-24 15:24:56

Zill
#! CrunchBanger
From: Lincolnshire, UK
Registered: 2009-10-25
Posts: 201

Re: Reboot (and sometimes shutdown) hangs if nfs mounted.

Offline

#9 2013-02-25 11:03:19

wizard10000
#! Member
Registered: 2013-02-24
Posts: 81

Re: Reboot (and sometimes shutdown) hangs if nfs mounted.

Last edited by wizard10000 (2013-03-02 22:35:44)

Offline

#10 2013-03-02 22:28:51

wizard10000
#! Member
Registered: 2013-02-24
Posts: 81

Re: Reboot (and sometimes shutdown) hangs if nfs mounted.

Last edited by wizard10000 (2013-03-02 22:30:14)

Offline

#11 2013-03-03 03:27:40

Philippe1
Member
Registered: 2012-12-19
Posts: 37

Re: Reboot (and sometimes shutdown) hangs if nfs mounted.

I might be completely in error, but maybe this could help you:

I have a home network Linux/Windows and in my fstab, I mount the Windows drives (CIFS) with the option _netdev.
I don't have any problem with Reboot even if the drives are mounted.

It might be worth a try...

Offline

#12 2013-03-04 16:07:52

Zill
#! CrunchBanger
From: Lincolnshire, UK
Registered: 2009-10-25
Posts: 201

Re: Reboot (and sometimes shutdown) hangs if nfs mounted.

Offline

#13 2013-03-04 17:05:59

Philippe1
Member
Registered: 2012-12-19
Posts: 37

Re: Reboot (and sometimes shutdown) hangs if nfs mounted.

Glad I could help!

Offline

#14 2013-03-04 18:19:00

wizard10000
#! Member
Registered: 2013-02-24
Posts: 81

Re: Reboot (and sometimes shutdown) hangs if nfs mounted.

Last edited by wizard10000 (2013-03-04 18:30:59)

Offline

#15 2013-03-04 20:22:54

Zill
#! CrunchBanger
From: Lincolnshire, UK
Registered: 2009-10-25
Posts: 201

Re: Reboot (and sometimes shutdown) hangs if nfs mounted.

Offline

#16 2013-03-17 18:27:54

DrakarNoir
#! CrunchBanger
From: just beyond the sign post
Registered: 2011-09-02
Posts: 132
Website

Re: Reboot (and sometimes shutdown) hangs if nfs mounted.

I had the same issue across three different machines (Waldorf 32bit and 64bit). After several other attempted work-arounds, including the autofs solution which did work but left my auto-mount not working(???), this is what I have done and it seems to be working (My network share is mounted as cifs in fstab), though I have no idea if this is the/a proper way to solve the problem. As a matter of fact, I have no idea what the command does as I discovered this work-around after spending weeks googling!

As root, create file unmount_nfs.sh in /etc/init.d/ with the following contents and make it executable.

    #!/bin/bash
    #script for automatic un-mounting of network shares on reboot and shutdown
    umount /mount/point
    exit

(/mount/point should be replaced by your mount point)

Then in terminal (also as root) run:

update-rc.d unmount_nfs.sh start 20 0 6 .

(including the period)

Last edited by DrakarNoir (2013-03-17 18:28:43)

Offline

#17 2014-03-13 15:31:36

akustyk
New Member
Registered: 2014-03-13
Posts: 3

Re: Reboot (and sometimes shutdown) hangs if nfs mounted.

I ran into the same problem with my current installation and used the info in this thread to solve the hang-on-shutdown problem. Thanks!!!

One thing I had to do for my CIFS share was to add uid and gid, such that the share mounted with correct ownership. Otherwise, it used a default 1001 user and group and prevented me from rw in those mounted directories. So here's the code you need  in the auto.misc file:

MountName	-fstype=cifs,rw,username=,password=, uid=, gid=	://location/directory

And then just comment out the share in your fstab, and start using autofs from now on. It's a neat solution. However, I wish the bug had not been there in the first place. It doesn't happen on Ubuntu 13.10, for instance.

Offline

#18 2014-03-13 20:30:14

Zill
#! CrunchBanger
From: Lincolnshire, UK
Registered: 2009-10-25
Posts: 201

Re: Reboot (and sometimes shutdown) hangs if nfs mounted.

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: bleh

Debian Logo