You are not logged in.
Can anyone tell me how to reliably unmount a filesystem from a remote server, when the server has lost its network connection (i.e. been closed down)?
For example: Mount a filesystem to /mnt/laptop, shutdown the laptop, then unmount the filesystem.
sudo umount -f /mnt/laptop does not seem to work, although I would have thought that it should have.
Thanks
Andrew
Offline
Does the command you mentioned give an error message, or does it just not unmount the filesystem? I'm not sure I completely understand the question either. Are you looking for a way to unmount a given filesystem automatically when a computer is being turned off? Like what happens to filesystems specified in /etc/fstab?
Offline
OK, let me explain.
I use a main computer in the study and a laptop elsewhere. I keep a backup of the main computers files on the laptop.
So I start the laptop and leave it running. Then from the main computer I mount the laptop disk on /mnt and backup my files.
Then, sometimes, the laptop is switched off, but the disk is still mounted. This causes all sorts of problems on the main computer, so I need to un-mount the laptop disk.
# umount -f should have done exactly this, but it just sits there blinking at me.
Is there another way of forcing the umount?
Thanks
Andrew
Offline
Have you tried a lazy umount?
umount -l /mnt/fooor fuser?
fuser -km /mnt/fooOffline
Thanks - I will try them and let you know
Andrew
Offline
How is the laptop disk shared with your main computer? Samba? NFS?
I've run into this problem before with Samba, but just simply using `umount` unmounts the filesystem fine.
Offline
NFS
Andrew
Offline
None of these work, they all just time out ![]()
Cheers
Andrew
Offline
If you're using networkmanager to make the connection, you should look into the dispatcher scripts. They make it possible to only try to connect to a certain network drive if a specific connection is established and subsequently umount it if the connection is closed down.
I use this setup to connect to my office NFS-share when I'm at the office and to connect to my personal server when I'm at home. No connection attempts fail because a certain server is not present.
Now I'm writing this, I 'm not sure it will solve your problem, but it is relevant either way ![]()
Offline