jis
June 26th, 2008, 11:24 AM
If I eject an external USB hard disk partition in Thunar / Xubuntu 8.04 I get error box: 'Failed to eject "320G Volume". An unknown error occured.' (I have only one partition in the disk.) The partition is umounted anyway. But I am not satisfied with that, if I want to detach the drive. I want (1) the drive's internal cache to be committed and (2) the disk also stopped. Maybe it would be good to (3) detach the usb disk from linux system even so that its item disappears in from Thunar – like what happens with regular USB pen flash drives when ejected in Thunar – so that you don't accidentally use the drive before unplugging the USB cable. You can do that.
Suppose the partitions in the disk are umounted already e.g. by command "umount /media/mountpoint". Then you could do this in root shell (to which you can get by command "sudo -s" end exit from by "exit"):
– run "fdisk -l" to figure out the name of the drive; I use sdb in this example.
– 1) "sdparm --command=sync /dev/sdb" to sync the cache
– 2) "sdparm --command=stop /dev/sdb" to stop the disk
– 3) "echo 1 >/sys/block/sdb/device/delete" to make drivers to forget the disk
Exit the root shell by "exit" and finally you can unplug the USB cord. I hope there'll be some practical implementation for this in Xubuntu.
Suppose the partitions in the disk are umounted already e.g. by command "umount /media/mountpoint". Then you could do this in root shell (to which you can get by command "sudo -s" end exit from by "exit"):
– run "fdisk -l" to figure out the name of the drive; I use sdb in this example.
– 1) "sdparm --command=sync /dev/sdb" to sync the cache
– 2) "sdparm --command=stop /dev/sdb" to stop the disk
– 3) "echo 1 >/sys/block/sdb/device/delete" to make drivers to forget the disk
Exit the root shell by "exit" and finally you can unplug the USB cord. I hope there'll be some practical implementation for this in Xubuntu.