[Linux-usb-users] 4 GB USB flash disk with FAT ok, with ext3 corrupted files

Alan Stern stern at rowland.harvard.edu
Sat Jun 16 21:47:02 UTC 2007


On Sat, 16 Jun 2007, Miernik wrote:

> Ah, that was after the dd zeroing. I created the partition table and partition,
> and here it is again:
> 
> debian105:~# fdisk -l /dev/sda
> 
> Disk /dev/sda: 4288 MB, 4288676352 bytes
> 132 heads, 62 sectors/track, 1023 cylinders
> Units = cylinders of 8184 * 512 = 4190208 bytes
> 
>    Device Boot      Start         End      Blocks   Id  System
> /dev/sda1               1        1023     4186085   83  Linux
> debian105:~#

Ah, good.  Note that 4186085 / 4 = 1046521, which agrees with the value 
below and explains those ext3 error messages.

> And created the filesystem:
> 
> debian105:~# mkfs.ext3 /dev/sda1
> mke2fs 1.40-WIP (14-Nov-2006)
> Filesystem label=
> OS type: Linux
> Block size=4096 (log=2)
> Fragment size=4096 (log=2)
> 523264 inodes, 1046521 blocks
> 52326 blocks (5.00%) reserved for the super user
> First data block=0
> Maximum filesystem blocks=1073741824
> 32 block groups
> 32768 blocks per group, 32768 fragments per group
> 16352 inodes per group
> Superblock backups stored on blocks:
>         32768, 98304, 163840, 229376, 294912, 819200, 884736
> 
> Writing inode tables: done
> Creating journal (16384 blocks): done
> Writing superblocks and filesystem accounting information: done
> 
> This filesystem will be automatically checked every 29 mounts or
> 180 days, whichever comes first.  Use tune2fs -c or -i to override.
> debian105:~# fdisk -l /dev/sda

> Did it help?
> 
> Is this a bug in ext3 code?

I don't know; maybe.  Or maybe the code is okay but it's getting bad
data from somewhere.  For example, even though the USB reads succeed, 
they might not return the same data that was originally written to the 
device.

> My USB sticks are broken?

Maybe.

> Bug in kernel USB subsystem?

No.

> My USB ports suck?

No.  A problem in the port would cause a USB error, not bad data.

What you should do is fill up the drive with known data (not just 0's 
like in your dd test), and then read it back to see if the data has
changed.

Alan Stern




More information about the Ext3-users mailing list