identifying logical sectors from disk sectors

Matt Price matt.price-H217xnMUJC0sA/PxXw9srA at public.gmane.org
Wed Feb 4 15:49:32 UTC 2009


hi,

so i have this failing disk drive i've mentioned in a couple of other
posts.  i've largely worked around that now by labelling the offending
sectors as bad blocks, using fsck -L.  There's at least one sector left,
though, but for some reason dmesg is no longer showing the name of the
offending logical sector, just the hardware sector:

[211665.104970] ata1.00: configured for UDMA/133
[211665.105002] ata1: EH complete
[211669.291778] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
[211669.291792] ata1.00: BMDMA stat 0x25
[211669.291805] ata1.00: cmd 25/00:08:aa:d9:79/00:00:11:00:00/e0 tag 0 dma 4096 in
[211669.291808]          res 51/40:08:aa:d9:79/40:00:11:00:00/e1 Emask 0x9 (media error)
[211669.291815] ata1.00: status: { DRDY ERR }
[211669.291820] ata1.00: error: { UNC }
[211669.312792] ata1.00: configured for UDMA/133
[211669.312827] sd 0:0:0:0: [sda] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE,SUGGEST_OK
[211669.312837] sd 0:0:0:0: [sda] Sense Key : Medium Error [current] [descriptor]
[211669.312848] Descriptor sense data with sense descriptors (in hex):
[211669.312854]         72 03 11 04 00 00 00 0c 00 0a 80 00 00 00 00 00 
[211669.312877]         11 79 d9 aa 
[211669.312886] sd 0:0:0:0: [sda] Add. Sense: Unrecovered read error - auto reallocate failed
[211669.312900] end_request: I/O error, dev sda, sector 293198250
[211669.312947] ata1: EH complete

so i have this sector number, 293198250.  i want to tell the drive never
to try to read there.  the only way i know how to do that is to use fsck
to identify bad blocks; but i'm pretty sure this sector number is not on
the scale that fsck requires for this particular file system (my other
bad blocks are 8-digit numbers, this is  a 9-digit number).  is there a
straightforward way to convert from one to the other?  i have this info
from dumpe2fs;
Filesystem OS type:       Linux
Block count:              43839369
Block size:               4096
Fragment size:            4096
Reserved GDT blocks:      1013
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         8192
Inode blocks per group:   256

and this from fdisk:
   Device Boot      Start         End      Blocks   Id  System
/dev/sda5            8316       30146   175357476   83  Linux

do i need to just divide the block number by 4 (175357476/43839369=4)?

thanks as always,
matt




-- 
Matt Price
matt.price-H217xnMUJC0sA/PxXw9srA at public.gmane.org

--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list