Last edited by Zill (2013-02-23 20:56:32)
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.
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.
Last edited by Zill (2013-02-23 12:13:04)
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?
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)
RitterSport: I'm pleased you got it working.
Last edited by wizard10000 (2013-03-02 22:35:44)
Last edited by wizard10000 (2013-03-02 22:30:14)
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...
Glad I could help!
Last edited by wizard10000 (2013-03-04 18:30:59)
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)
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.