Re: USB stick destroyed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Alan,

Thanks for your answer.

On Sat, 18 Apr 2009 10:48:28 -0400 (EDT), Alan Stern wrote:
> On Sat, 18 Apr 2009, Jean Delvare wrote:
> > While I was testing kernel 2.6.30-rc2, I lost one of my USB sticks. The
> > stick is no longer usable in any machine, all I get is "sdb: unknown
> > partition table". So apparently the partition table was corrupted by
> > the problem I hit.
> > 
> > Here is what the logs have to say about what happened:
> > 
> > Apr 17 10:48:16 hyperion kernel: usb 2-2.2: new full speed USB device using uhci_hcd and address 3
> > Apr 17 10:48:16 hyperion kernel: usb 2-2.2: not running at top speed; connect to a high speed hub
> > Apr 17 10:48:16 hyperion kernel: usb 2-2.2: configuration #1 chosen from 1 choice
> > Apr 17 10:48:16 hyperion kernel: Initializing USB Mass Storage driver...
> > Apr 17 10:48:16 hyperion kernel: scsi4 : SCSI emulation for USB Mass Storage devices
> > Apr 17 10:48:16 hyperion kernel: usbcore: registered new interface driver usb-storage
> > Apr 17 10:48:16 hyperion kernel: USB Mass Storage support registered.
> > Apr 17 10:48:16 hyperion kernel: usb-storage: device found at 3
> > Apr 17 10:48:16 hyperion kernel: usb-storage: waiting for device to settle before scanning
> > Apr 17 10:48:21 hyperion kernel: scsi 4:0:0:0: Direct-Access     USB007   mini-USB2BU      0.00 PQ: 0 ANSI: 2
> > Apr 17 10:48:21 hyperion kernel: sd 4:0:0:0: Attached scsi generic sg2 type 0
> > Apr 17 10:48:21 hyperion kernel: usb-storage: device scan complete
> > Apr 17 10:48:21 hyperion kernel: sd 4:0:0:0: [sdb] 2015231 512-byte hardware sectors: (1.03 GB/983 MiB)
> > Apr 17 10:48:21 hyperion kernel: sd 4:0:0:0: [sdb] Write Protect is off
> > Apr 17 10:48:21 hyperion kernel: sd 4:0:0:0: [sdb] Mode Sense: 00 00 00 00
> > Apr 17 10:48:21 hyperion kernel: sd 4:0:0:0: [sdb] Assuming drive cache: write through
> > Apr 17 10:48:21 hyperion kernel: sd 4:0:0:0: [sdb] Assuming drive cache: write through
> > Apr 17 10:48:21 hyperion kernel:  sdb: sdb1
> 
> So at the time of this log, the stick was working correctly (valid 
> partition table and valid size).

Yes, I managed to mount it once.

> > Apr 17 10:48:21 hyperion kernel: sd 4:0:0:0: [sdb] Attached SCSI removable disk
> > Apr 17 10:48:25 hyperion hald: mounted /dev/sdb1 on behalf of uid 501
> > Apr 17 10:50:41 hyperion kernel: FAT: Filesystem panic (dev sdb1)
> > Apr 17 10:50:41 hyperion kernel:     fat_get_cluster: invalid cluster chain (i_pos 0)
> > Apr 17 10:50:41 hyperion kernel:     File system has been set read-only
> 
> Sounds like a bad FAT or directory entry.  Could be the stored data was 
> corrupted or a read didn't return the right information.

Could this be caused by bad mount options, for example incorrect
charset? As I wrote the stick isn't mine, it has probably been written
to under Windows not Linux.

I'm also curious if FAT has a limit to the number of files it can
store? 8500 files seem a lot for a 1 GB stick.

> ... lots of errors ...
> > Apr 17 10:51:55 hyperion kernel: usb 2-2.2: reset full speed USB device using uhci_hcd and address 3
> > Apr 17 10:51:58 hyperion kernel: sd 4:0:0:0: [sdb] Assuming drive cache: write through
> > Apr 17 10:51:58 hyperion kernel:  sdb: unknown partition table
> 
> And presumably you now see something like this every time you plug in 
> the stick?

Yes.

> > This happened as I was asking Thunar (Xfce's file manager) the
> > properties of the USB stick. So it was counting all the files and there
> > were a lot of them (about 8500 if memory serves). As the stick isn't
> > mine, I have no idea if the file count was correct or not. I remember
> > that the cumulative size looked plain wrong to me, something like 400
> > GB while the stick is supposed to be 1 GB total.
> > 
> > I would also like to mention that my system had been hit by bug #13135
> > one hour before that. I have no idea if this may be related or not:
> > http://bugzilla.kernel.org/show_bug.cgi?id=13135
> > Andrew Morton seems to think that one is a false positive, so probably
> > it isn't related, but I thought I'd mention it just in case.
> > 
> > I presume that the USB stick might just have been defective, either
> > physically or at the filesystem level... It isn't mine, so I can't tell
> > much about this. But in any case I find it weird that I ended up losing
> > the partition table due to these errors.
> 
> The thing is, the log doesn't really show any USB errors, although no 
> doubt something strange was going on.  No way to tell what it was, now.

I agree I don't really know who to blame. Looking at the logs again, it
may be a filesystem problem rather than USB problem. That being said...

> It's hard to imagine how Linux could have destroyed the stick merely by 
> reading a bunch of files from it.  Most likely this was some sort of 
> hardware failure.

... this is indeed hard to imagine. I can't see how a filesystem bug
could have overwritten data outside the partition.

> If you still have the stick, and if it still is in working condition, 
> you should be able to get it going again by repartitioning and 
> reformatting it.

Yes I still have it and it is still seen as an USB device. I will try
repartitioning it and reformatting it, let's see where it gets me. I'm
not sure exactly how I can restore the boot sector though. Maybe I'll
copy it from another USB stick.

And then I could try to reproduce the bug... who knows.

Thanks,
-- 
Jean Delvare
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux