Comment 7 for bug 400652

Revision history for this message
Stefan Bader (smb) wrote :

Working through the debug data it looks quite odd: while the bigger device acts normal (as far as there is a normal with the bug) up to the point of trying to read the very last sector, the other is returning the no sense errors much sooner.

The capacity returned is 120093 sectors with 512 bytes (so 120092 would be the number of the last sector). As this devices returns the wrong thing, the last sector would actually be 120091). From the trace I can see, that there is one operation repeated over and over again. And this is to read 8 sectors, starting from 120072. That would be 120072 to 120079, which is way before the returned end of the device.

In theory, editing /lib/udev/rules.d/60-persistent-storage.rules as root (while the phone is unplugged) from

KERNEL!="sr*", IMPORT{program}="vol_id --export $tempnode"
to
KERNEL!="sr*", IMPORT{program}="vol_id --export --skip-raid $tempnode"

should temporarily prevent reading the last sectors (don't forget to remove the --skip-raid after the test!). Then you could plug in the phone and obtain the partition table ("sudo fdisk -l"). It would be interesting how much of the smaller device (I guess that is the internal one) is used by the partition. But the underlying problem is that the device seems to fail much sooner than a off-by one sector.