Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
strange usb flash drive behavior
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
curmudgeon
Veteran
Veteran


Joined: 08 Aug 2003
Posts: 1340

PostPosted: Sun Jan 19, 2014 2:34 am    Post subject: strange usb flash drive behavior Reply with quote

I have one usb flash drive (none of my other flash drives do this) that "disappears" after an user (udisks) unmounts it.

From /var/log/messages (inserting the flash drive):

Code:

Jan 19 00:00:00 system kernel: usb 1-1.5: new high-speed USB device number 80 using ehci-pci
Jan 19 00:00:00 system kernel: usb-storage 1-1.5:1.0: USB Mass Storage device detected
Jan 19 00:00:00 system kernel: scsi106 : usb-storage 1-1.5:1.0
Jan 19 00:00:00 system kernel: scsi 106:0:0:0: Direct-Access     Ut165    USB2FlashStorage 0.00 PQ: 0 ANSI: 2
Jan 19 00:00:00 system kernel: sd 106:0:0:0: Attached scsi generic sg6 type 0
Jan 19 00:00:00 system kernel: sd 106:0:0:0: [sdg] 15794176 512-byte logical blocks: (8.08 GB/7.53 GiB)
Jan 19 00:00:00 system kernel: sd 106:0:0:0: [sdg] Write Protect is off
Jan 19 00:00:00 system kernel: sd 106:0:0:0: [sdg] Mode Sense: 00 00 00 00
Jan 19 00:00:00 system kernel: sd 106:0:0:0: [sdg] Asking for cache data failed
Jan 19 00:00:00 system kernel: sd 106:0:0:0: [sdg] Assuming drive cache: write through
Jan 19 00:00:00 system kernel: sd 106:0:0:0: [sdg] Asking for cache data failed
Jan 19 00:00:00 system kernel: sd 106:0:0:0: [sdg] Assuming drive cache: write through
Jan 19 00:00:00 system kernel: sdg:
Jan 19 00:00:00 system kernel: sd 106:0:0:0: [sdg] Asking for cache data failed
Jan 19 00:00:00 system kernel: sd 106:0:0:0: [sdg] Assuming drive cache: write through
Jan 19 00:00:00 system kernel: sd 106:0:0:0: [sdg] Attached SCSI removable disk


Mount and unmount as root? No problem (and nothing noted in the log file).

Mount as a regular user (using the kde device notifier):

Code:

Jan 19 00:01:00 system udisksd[1465]: Mounted /dev/sdg at /run/media/user/usb_disk on behalf of uid 1000


But now, when the device is unmounted:

Code:

Jan 19 00:02:00 system udisksd[1465]: Cleaning up mount point /run/media/user/usb_disk (device 8:96 is not mounted)
Jan 19 00:02:00 system udisksd[1465]: Unmounted /dev/sdg on behalf of uid 1000
Jan 19 00:02:00 system dbus[973]: [system] Rejected send message, 0 matched rules; type="method_return", sender=":1.7" (uid=0 pid=1465 comm="/usr/lib/udisks2/udisksd --no-debug ") interface="(unset)" member="(unset)" error name="(unset)" requested_reply="0" destination=":1.14" (uid=1000 pid=1591 comm="kdeinit4: plasma-desktop [kdeinit] ")
Jan 19 00:02:00 system kernel: sdg: detected capacity change from 8086618112 to 0


The device STILL APPEARS in the device notifier, but attempting to mount it again does nothing (and basically, it is no longer there - as the capacity change to 0 would indicate). Trying to access it as root gives:

Code:

command failed to open ‘/dev/sdg’: No medium found


Again, I am not having this problem with any other usb flash drive. I am just wondering (mostly out of curiosity, since I can overcome this by removing and reinserting the flash drive) what is going on with this one.
Back to top
View user's profile Send private message
Hu
Watchman
Watchman


Joined: 06 Mar 2007
Posts: 8596

PostPosted: Sun Jan 19, 2014 5:10 am    Post subject: Reply with quote

For some devices, you can get the same result by running eject on the block device representing the USB stick. Perhaps your GUI is doing the equivalent operation for you.
Back to top
View user's profile Send private message
curmudgeon
Veteran
Veteran


Joined: 08 Aug 2003
Posts: 1340

PostPosted: Sun Jan 19, 2014 5:26 pm    Post subject: Reply with quote

Hu wrote:
For some devices, you can get the same result by running eject on the block device representing the USB stick. Perhaps your GUI is doing the equivalent operation for you.


But why would it do it on only this flash drive (and no other flash drive)?
Back to top
View user's profile Send private message
Hu
Watchman
Watchman


Joined: 06 Mar 2007
Posts: 8596

PostPosted: Sun Jan 19, 2014 5:57 pm    Post subject: Reply with quote

Your other flash drives might not respond the same way to being ejected. Your GUI might have rules that specify different actions depending on some property of the drive. Without even knowing whether I am right that your GUI is issuing an eject, it is hard to enumerate all the ways in which you could get different results.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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