Subject: Bad block on disk (hardware failure)
To: None <port-i386@netbsd.org>
From: Eric Delcamp <e.delcamp@wanadoo.fr>
List: port-i386
Date: 01/07/2003 12:43:52
Hello,

I have a disk with some bad blocks on it, but it's a hardware failure (not
something that could be repaired by a format). I want to exclude the area of
bad block but I have a problem to decode the error message. My goal is make
the partition begin after bad blocks (or finish before if they are at the
end). I'm asking also if I need to modify the partition table (only NetBSD
on this disk, and it's just a data drive, not system). Here is the error
message and info on the disk :

gedeon# newfs wd1
wd1: (uncorrectable data error)
wd1a: error reading fsbn 60018832 of 60018832-60018839 (wd1 bn 60034897; cn
5955
8 tn 6 sn 55)wd1: (uncorrectable data error)
[repeated a number of time, then newfs failed after downgrading to PIO]

gedeon# fdisk wd1
Disk: /dev/rwd1d
NetBSD disklabel disk geometry:
cylinders: 16383 heads: 16 sectors/track: 63 (1008 sectors/cylinder)

BIOS disk geometry:
cylinders: 1023 heads: 255 sectors/track: 63 (16065 sectors/cylinder)

Partition table:
0: sysid 169 (NetBSD)
    start 16065, size 60018840 (29306 MB), flag 0x0
        beg: cylinder    1, head   0, sector  1
        end: cylinder 1022, head 254, sector 63
1: <UNUSED>
2: <UNUSED>
3: <UNUSED>

gedeon# disklabel wd1
# /dev/rwd1d:
type: ESDI
disk: IBM-DTLA-307030
label: fictitious
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 16383
total sectors: 60036480
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0

8 partitions:
#        size    offset     fstype  [fsize bsize cpg/sgs]
 a:  60018840     16065     4.2BSD   1024  8192    16   # (Cyl.   15*-
59558*)
 c:  60018840     16065     unused      0     0         # (Cyl.   15*-
59558*)
 d:  60036480         0     unused      0     0         # (Cyl.    0 -
59559)