newspaint

Documenting Problems That Were Difficult To Find The Answer To

Ubuntu 14.04 and a USB Drive Found But Inaccessible

I have a Lexar 8GB USB stick that, when plugged into a Linux USB3 or USB2 port, flashes slowly every 2.5 seconds. The LED fades in slowly then quickly fades out and the cycle repeats.

This drive actually appears in my list of devices (in my case /dev/sde). So, what does dmesg say?

[623742.964273] usb 3-1.1.3: new high-speed USB device number 28 using xhci_hcd
[623743.337447] usb 3-1.1.3: New USB device found, idVendor=05dc, idProduct=a81d
[623743.337456] usb 3-1.1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[623743.337462] usb 3-1.1.3: Product: USB Flash Drive
[623743.337466] usb 3-1.1.3: Manufacturer: Lexar
[623743.337470] usb 3-1.1.3: SerialNumber: AA5AS3XX6JEO3333
[623743.337771] usb 3-1.1.3: ep 0x81 - rounding interval to 128 microframes, ep desc says 255 microframes
[623743.337783] usb 3-1.1.3: ep 0x2 - rounding interval to 128 microframes, ep desc says 255 microframes
[623743.338436] usb-storage 3-1.1.3:1.0: USB Mass Storage device detected
[623743.338751] scsi248 : usb-storage 3-1.1.3:1.0
[623744.337112] scsi 248:0:0:0: Direct-Access     Lexar    USB Flash Drive  1100 PQ: 0 ANSI: 4
[623744.337664] sd 248:0:0:0: Attached scsi generic sg5 type 0
[623744.342377] sd 248:0:0:0: [sde] Attached SCSI removable disk

Looks pretty normal. Except that it is not. If I attach an identical but working Lexar 8GB USB drive into my machine I get some additional but important lines giving the logical block count of the device in dmesg:

[623541.046652] scsi 246:0:0:0: Direct-Access     Lexar    USB Flash Drive  1100 PQ: 0 ANSI: 4
[623541.046886] sd 246:0:0:0: Attached scsi generic sg5 type 0
[623541.047068] sd 246:0:0:0: [sde] 15656960 512-byte logical blocks: (8.01 GB/7.46 GiB)
[623541.047634] sd 246:0:0:0: [sde] Write Protect is off
[623541.047636] sd 246:0:0:0: [sde] Mode Sense: 43 00 00 00
[623541.048121] sd 246:0:0:0: [sde] No Caching mode page found
[623541.048124] sd 246:0:0:0: [sde] Assuming drive cache: write through
[623541.050183] sd 246:0:0:0: [sde] No Caching mode page found
[623541.050186] sd 246:0:0:0: [sde] Assuming drive cache: write through
[623541.050913]  sde: sde1
[623541.052443] sd 246:0:0:0: [sde] No Caching mode page found
[623541.052445] sd 246:0:0:0: [sde] Assuming drive cache: write through
[623541.052447] sd 246:0:0:0: [sde] Attached SCSI removable disk

This is made clear by running lsblk which does not list /dev/sde as a block device. In addition trying to run blockdev gives an error:

# blockdev --getsize /dev/sde
blockdev: cannot open /dev/sde: No medium found

This exactly problem has been described in forums here on 2013-11-05 and here on 2015-03-12.

My conclusion? USB drive is toast. Nothing is going to save it. Not “blanking it” using the “dd if=/dev/zero of=/dev/sde” command (because there are no logical blocks to write to). But I could be wrong. After all – the device is clearly communicating important information to the host such as model name and number – but just not giving access to the storage area behind it.

Other Interesting Links

See the kernel /sys/block/ filesystem documentation.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s