You are not logged in.
Hi,
I often have a drive at my school mounted via sshfs on my own laptop. This works fine, and I can easily unmount the drive again via fusermount -u.
But a problem shows up when I forget to unmount the drive before I go to hibernate (by pm-hibernate from pm-utils). When I boot up the laptop again (usually on some other geographic location, and hence on another network), there is no connection to the drive (if I try to cd to the mount-point the terminal simply hangs), and I cannot unmount with fusermount -u, which simply gives me the error message
umount: /mnt/datf: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
and hence I cannot re-mount the drive with sshfs either. I have to reboot to be able to remount the drive...
Does anyone know how to do any of the following?:
* force-unmount the drive after a hibernate
* automatically unmount the drive when I go to hibernate
Last edited by bozack (2009-10-09 12:59:51)
Offline
Hi,
I often have a drive at my school mounted via sshfs on my own laptop. This works fine, and I can easily unmount the drive again via fusermount -u.
But a problem shows up when I forget to unmount the drive before I go to hibernate (by pm-hibernate from pm-utils). When I boot up the laptop again (usually on some other geographic location, and hence on another network), there is no connection to the drive (if I try to cd to the mount-point the terminal simply hangs), and I cannot unmount with fusermount -u, which simply gives me the error message
umount: /mnt/datf: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))and hence I cannot re-mount the drive with sshfs either. I have to reboot to be able to remount the drive...
Does anyone know how to do any of the following?:
* force-unmount the drive after a hibernate
* automatically unmount the drive when I go to hibernate
Well, I hibernate using suspend2 (tuxonice) and the hibernate-script, in the configuration file for that you can list down the drives or filesystems you want unmounted before hibernating. Not sure about the pm-utils way though, never managed to get that working.
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline
Well, I hibernate using suspend2 (tuxonice) and the hibernate-script, in the configuration file for that you can list down the drives or filesystems you want unmounted before hibernating. Not sure about the pm-utils way though, never managed to get that working.
Hmm maybe I'll take a look at that. Did you just use the Arch wiki article on suspend to disk to install and configure it?
Actually I have some problems with pm-utils, and it is only the hibernate (suspending to disk) that works. I would like suspend to ram to work as well. Have you got this working with tuxonice?
Offline
Read /usr/share/doc/pm-utils/HOWTO.hooks about the hooks mechanism of pm-utils.
You want something like this in /etc/pm/sleep.d/64unmount_sshfs:
#!/bin/bash
case $1 in
hibernate | suspend)
fusermount -u /dev/...
;;
thaw | resume)
exit 0
;;
*)
echo "somebody is calling me totally wrong."
;;
esac
exit 0
The scripts are handled in lexicographic order, yours should start with a number between 50 and 74 (service-handling hooks), 64 is just a possibility.
Edit: you can also try to remount the partition in the thaw | resume part.
Last edited by Ramses de Norre (2009-10-09 15:00:26)
Offline