[NTLUG:Discuss] Is KDE's "Safely Remove" safe?
Ben Weatherall
BWeatherall at pdxinc.com
Sat Feb 27 20:31:43 CST 2010
Don't forget the 'sudo sync' command before you do.the umount.
Sent from my HTC on the Now Network from Sprint!
----- Reply message -----
From: "Hank Ivy" <hankivy at hot.rr.com>
Date: Sat, Feb 27, 2010 20:16
Subject: [NTLUG:Discuss] Is KDE's "Safely Remove" safe?
To: "discuss at ntlug.org" <discuss at ntlug.org>
On Saturday 27 February 2010 03:17 am Leroy Tennison wrote:
> I'm noticing unusual behavior with this feature in relation to USB
> drives. If I insert a USB stick KDE pops up a dialog asking what to
> do. If I select "Open in a new window" it does and the drive is
> accessible (and mounted). If I later select "Safely Remove" and nothing
> is open on the drive then the drive is unmounted, the icon disappears
> and it no longer appears in the Storage Media list. All of that is OK
> (except the fact that I have to remove the drive and re-insert it for
> KDE to recognize it after that). However, if I su to root at a bash
> prompt, I can't manually mount the drive (it is still inserted). "ls
> /dev/s*" shows an "sda" but mount can't mount /dev/sda1 and fdisk as
> well as parted can't open /dev/sda.
>
> In contrast, if I select "Do nothing" at KDE's dialog, then I can mount
> and umount /dev/sda1 at will (as well as use fdisk and parted with it).
>
> Any ideas, insight or experience with this?
Yes. I have a similar experience. Following is the solution.
When KDE mounts my USB flash drive, it creates a directory /media/TRAVELDRIVE
to use as a mount point. TRAVELDRIVE is the volume name on the flash drive.
Then it mounts the device /dev/sdc1 on the mount point.
When KDE removes the drive, it unmounts it, and removes the directory.
If you want to mount the drive manually, do what KDE does. For example:
[hank at hilinux ~]$ sudo mkdir /media/TRAVELDRIVE
[hank at hilinux ~]$ ls -l /media
total 0
drwxr-xr-x 2 root root 48 2008-10-15 01:42 cdrom/
drwxr-xr-x 2 root root 48 2008-11-01 00:59 dvd/
drwxr-xr-x 2 root root 48 2008-10-15 01:42 floppy/
drwxr-xr-x 2 root root 48 2010-02-27 20:01 TRAVELDRIVE/
[hank at hilinux ~]$ sudo mount /dev/sdc1 /media/TRAVELDRIVE
mount: block device /dev/sdc1 is write-protected, mounting read-only
[hank at hilinux ~]$ df
Filesystem Size Used Avail Use% Mounted on
/dev/md1 4.9G 712M 4.2G 15% /
/dev/md0 2.0G 236M 1.8G 12% /boot
/dev/md6 36G 10G 26G 28% /home
/dev/md4 4.9G 33M 4.9G 1% /tmp
/dev/md2 15G 8.1G 6.7G 55% /usr
/dev/md3 4.9G 1.2G 3.8G 24% /var
/dev/sdc1 245M 5.1M 240M 3% /media/TRAVELDRIVE
Safely removing the drive is the converse.
[hank at hilinux ~]$ sudo umount /media/TRAVELDRIVE
[hank at hilinux ~]$ sudo rmdir /media/TRAVELDRIVE
--
Hank Ivy
GPG Fingerprint:
1A0F E1CB 0160 0069 7C19 4B00 911C 92E8 F8B0 4C7C
_______________________________________________
http://www.ntlug.org/mailman/listinfo/discuss
More information about the Discuss
mailing list