View previous topic :: View next topic |
Author |
Message |
Kobboi l33t
Joined: 29 Jul 2005 Posts: 672 Location: Belgium
|
Posted: Sun Dec 16, 2012 12:38 pm Post subject: What is removing a removable device in GNOME? |
|
|
My USB key has a partition table, with a single vfat partition.
When I use the GNOME desktop environment to "remove" my USB key:
- I get the following kernel trace: [22558.012173] sdb: detected capacity change from 15504900096 to 0
- The device file for the partition (/dev/sdb1) is removed
Why is this?
Note that a regular command line umount, does not have this effect. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54098 Location: 56N 3W
|
Posted: Sun Dec 16, 2012 2:44 pm Post subject: |
|
|
Kobboi,
The former tells the system to remove the dev special file at /dev/sdb1, so the device is no longer attached to the system
umount, unmounts the filesystem present at /dev/sdb1 from the filesystem tree, so its no longer available for acces, but its still attached to the system at /dev/sdb1.
Remove should do a umount first - or there is a major risk your filesystem would be left in a mess.
umount is suffcient to be able to remove the device safely from the system. Remove is a step further.
The dmesg entry is purely for information. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Kobboi l33t
Joined: 29 Jul 2005 Posts: 672 Location: Belgium
|
Posted: Sun Dec 16, 2012 6:14 pm Post subject: |
|
|
Thanks Neddy. When first reading your comment, I thought my only option other than physically removing the USB key and plugging it back in again was to manually add the device node myself. But it seems the GNOME disk managing utility can simply to that for me.
Suppose, though, that I am in the situation after using the graphical method for removal and that the sdb1 device file is removed from the device filesystem. Is there a preferred method of getting the device file back, e.g. from a remote shell login? Do I create the device node myself or do I run some binary in the udev suite or something? |
|
Back to top |
|
|
|