You are not logged in.
Pages: 1
Hi,
after i umount my external drive, there is still data read/written (?) to the drive for a few seconds, even though the drive doesn't show up as mounted anymore. I guess it has to do with the drive caches.
Is there any command to check if it's safe to remove the drive? I would need it for an undocking scripts ...
ccc1
Last edited by ccc1 (2012-06-13 10:05:35)
Offline
Offline
I think that's a different problem. In my case the umount command exited, "mount" doesn't show the partition as mounted anymore, but it looks like there is still disk activity (led flashes).
ccc1
Offline
sync, then unmount, then it's safe.
Last edited by 2ManyDogs (2012-06-12 16:15:36)
Offline
Could try this utility, or check the links in the thread: https://bbs.archlinux.org/viewtopic.php?id=130697
"...one cannot be angry when one looks at a penguin." - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle
Offline
Most file explorers on Linux have some kind of option to safely "eject" a USB drive. Which desktop are you using?
Offline
Maybe you'd want to use fuser:
Offline
sync, then unmount, then it's safe.
That's the best solution. No idea, why i haven't thought of that ...
ccc1
Offline
There's a good discussion and script available at: http://elliotli.blogspot.co.uk/2009/01/ … linux.html
For an up to date Arch though, you've got to tweak the script towards the bottom a bit (name change or something); am not on my Linux system at the moment so can't remember the minor changes exactly. Let me know if you want the tweaked script and I can post it somewhere later.
Last edited by ninian (2012-06-13 10:25:21)
Offline
There's a good discussion and script available at: http://elliotli.blogspot.co.uk/2009/01/ … linux.html
For an up to date Arch though, you've got to tweak the script towards the bottom a bit (name change or something); am not on my Linux system at the moment so can't remember the minor changes exactly. Let me know if you want the tweaked script and I can post it somewhere later.
That's linked from the blogpost linked at the OP of the thread I posted to. I only mention it as the forked pmount that is the point of that thread is based on the script.
"...one cannot be angry when one looks at a penguin." - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle
Offline
That's linked from the blogpost linked at the OP of the thread I posted to. I only mention it as the forked pmount that is the point of that thread is based on the script.
Ah, yes. I tried the safe-removal pmount a while back and had some problems with it IIRC. So that's why I went back to the original script, and I'm now using it (modified as I mentioned) in conjunction with a script calling udevil to unmount.
Offline
skanky wrote:That's linked from the blogpost linked at the OP of the thread I posted to. I only mention it as the forked pmount that is the point of that thread is based on the script.
Ah, yes. I tried the safe-removal pmount a while back and had some problems with it IIRC. So that's why I went back to the original script, and I'm now using it (modified as I mentioned) in conjunction with a script calling udevil to unmount.
Okay, let us know the script change.
"...one cannot be angry when one looks at a penguin." - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle
Offline
Okay, let us know the script change.
Here's the patch for you (not a lot to do):
--- suspend-usb-device 2012-06-13 20:21:08.311449540 +0100
+++ suspend-usb-device.patched 2012-06-13 20:24:53.702254506 +0100
@@ -160,7 +160,7 @@
# check if CONFIG_USB_SUSPEND is enabled
[[ $VERBOSE == 1 ]] && echo "Checking whether $DEVICE can be suspended"
- POWER_LEVEL_FILE=/sys${DEVICE}/power/level
+ POWER_LEVEL_FILE=/sys${DEVICE}/power/control
if [ ! -f "$POWER_LEVEL_FILE" ]; then
1>&2 cat<<EOF
It's safe to remove the USB device now but better can be done. The
@@ -177,5 +177,5 @@
fi
[[ $VERBOSE == 1 ]] && echo "Suspending $DEVICE by writing to $POWER_LEVEL_FILE"
- echo 'suspend' > "$POWER_LEVEL_FILE"
+ echo 'auto' > "$POWER_LEVEL_FILE"
fi
Offline
skanky wrote:Okay, let us know the script change.
Here's the patch for you (not a lot to do):
--- suspend-usb-device 2012-06-13 20:21:08.311449540 +0100 +++ suspend-usb-device.patched 2012-06-13 20:24:53.702254506 +0100 @@ -160,7 +160,7 @@ # check if CONFIG_USB_SUSPEND is enabled [[ $VERBOSE == 1 ]] && echo "Checking whether $DEVICE can be suspended" - POWER_LEVEL_FILE=/sys${DEVICE}/power/level + POWER_LEVEL_FILE=/sys${DEVICE}/power/control if [ ! -f "$POWER_LEVEL_FILE" ]; then 1>&2 cat<<EOF It's safe to remove the USB device now but better can be done. The @@ -177,5 +177,5 @@ fi [[ $VERBOSE == 1 ]] && echo "Suspending $DEVICE by writing to $POWER_LEVEL_FILE" - echo 'suspend' > "$POWER_LEVEL_FILE" + echo 'auto' > "$POWER_LEVEL_FILE" fi
Thanks
"...one cannot be angry when one looks at a penguin." - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle
Offline
Pages: 1