udisks2 prevents external hard drive from working
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
udisks2 (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
I can't remember when exactly has the problem started.. But all I remember, is that at some point in raring, the disk was working fine. Then a long period passed when I never tried it, and I upgraded to Saucy, and now I realize it isn't working.
The disk is a SATA laptop-size 320GB Hard Drive inside a Toshiba SATA-to-USB enclosure. It contains 3 partitions, a FAT32 partition, and EXT3 partition, and a swap partition.
What happens, is the following: I plug the device in my Sony Vaio's usb port, and I immediately notice the normal messages in dmesg, which end in this:
[70092.111876] sd 29:0:0:0: [sdb] Mode Sense: 03 00 00 00
[70092.117266] sd 29:0:0:0: [sdb] No Caching mode page found
[70092.117275] sd 29:0:0:0: [sdb] Assuming drive cache: write through
[70092.119305] sd 29:0:0:0: [sdb] No Caching mode page found
[70092.119314] sd 29:0:0:0: [sdb] Assuming drive cache: write through
[70092.217704] sdb: sdb1 sdb2 sdb3
[70092.221952] sd 29:0:0:0: [sdb] No Caching mode page found
[70092.221963] sd 29:0:0:0: [sdb] Assuming drive cache: write through
[70092.221970] sd 29:0:0:0: [sdb] Attached SCSI disk
All normal so far, but the Device Notifier widget doesn't jump up as expected, I wait ten seconds, and a new message appears in dmesg:
[70100.124102] usb 2-2: reset high-speed USB device number 20 using ehci-pci
This message appears 10 seconds after the above lines, and after it, it's all hell.. Basically, the disk is no longer accessible, and as expected, dmesg fills up with tons of error messages, such as:
[70111.838221] Read(10): 28 00 24 c4 59 bd 00 00 08 00
[70111.854311] sd 29:0:0:0: [sdb] Unhandled sense code
[70111.854318] sd 29:0:0:0: [sdb]
[70111.854322] Result: hostbyte=DID_OK driverbyte=
[70111.854326] sd 29:0:0:0: [sdb]
[70111.854329] Sense Key : Medium Error [current]
[70111.854335] sd 29:0:0:0: [sdb]
[70111.854339] Add. Sense: Unrecovered read error
[70111.854344] sd 29:0:0:0: [sdb] CDB:
[70111.854346] Read(10): 28 00 00 00 00 3f 00 00 08 00
My first idea, was a kernel regression.. So I booted a 3.8 kernel from Raring, and the problem remained.
After some digging around, and reading various online forums, some people suggested udisks2, and some suggested it happens specifically because of FAT filesystems, unfortunately, I have no disks to test non-FAT disks, but I might be able to in 2 days.
So I tested the udisks2 theory, by first stopping "udev" with "sudo stop udev". Upon plugging the device, no errors happen, and I can mount the device manually just fine. I started udev again, and did an "aptitude purge udisks2", and the same positive results came up.
So it seems udisks2 is resetting the usb device for some reason :(
affects: | linux (Ubuntu) → udisks2 (Ubuntu) |
Status changed to 'Confirmed' because the bug affects multiple users.