Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
What is removing a removable device in GNOME?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Kobboi
l33t
l33t


Joined: 29 Jul 2005
Posts: 656
Location: Belgium

PostPosted: Sun Dec 16, 2012 12:38 pm    Post subject: What is removing a removable device in GNOME? Reply with quote

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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 33031
Location: 56N 3W

PostPosted: Sun Dec 16, 2012 2:44 pm    Post subject: Reply with quote

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
View user's profile Send private message
Kobboi
l33t
l33t


Joined: 29 Jul 2005
Posts: 656
Location: Belgium

PostPosted: Sun Dec 16, 2012 6:14 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum