Subject: Disk size/read errors
To: None <port-i386@netbsd.org>
From: Rob Quinn <rquinn+11121@sec.sprint.net>
List: port-i386
Date: 04/16/2001 15:42:49
  It seems to me that the kernel isn't stopping read attempts past the end of
the disk. Each failure downgrades the transfer mode. Here's the command I'm
using, with a large skip value to speed things up:
 
#dd progress=1 if=/dev/rwd0d of=/dev/null bs=63k skip=187130
......dd: /dev/rwd0d: Input/output error
6+0 records in
6+0 records out
387072 bytes transferred in 10 secs (38707 bytes/sec)

  Below is the disk label, and below that is the syslog errors, showing a read
failure for a Cyl and block one greater than the disk has (according to the
label). This seems to happen for only wd0d, and not wd0b, which ends at the
same location. I've tested this on 4 drives on three different i386 machines,
with similar results. I would test it on my sparc, but (mysteriously) it's down
with a corrupted root.

  Bug, or feature?  



%disklabel wd0
# /dev/rwd0d:
type: ESDI
disk: TOSHIBA MK1214GA
label: fictitious
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 16383
total sectors: 23579136
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: 18319392  4201344     4.2BSD     1024  8192    16   # (Cyl. 4168 - 22341)
  b:  1058400 22520736       swap                        # (Cyl. 22342 - 23391)
  c: 19377792  4201344     unused        0     0         # (Cyl. 4168 - 23391)
  d: 23579136        0     unused        0     0         # (Cyl.    0 - 23391)
  e:  4201281       63       NTFS                        # (Cyl.    0*- 4167)


wd0 at pciide0 channel 0 drive 0: <TOSHIBA MK1214GAP>
wd0: drive supports 16-sector PIO transfers, LBA addressing
wd0: 11513 MB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 23579136 sectors
wd0: 32-bit data port
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 4 (Ultra/66)
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2 (Ultra/33) (using DMA data transfers)


Apr 16 13:41:56 strike /netbsd: wd0d: id not found reading fsbn 23579136 of 23579136-23579261 (wd0 bn 23579136; cn 23392 tn 0 sn 0), retrying
Apr 16 13:42:05 strike last message repeated 2 times
Apr 16 13:42:05 strike /netbsd: wd0: transfer error, downgrading to Ultra-DMA mode 1
Apr 16 13:42:05 strike /netbsd: wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 1 (using DMA data transfers)
Apr 16 13:42:06 strike /netbsd: wd0d: id not found reading fsbn 23579136 of 23579136-23579261 (wd0 bn 23579136; cn 23392 tn 0 sn 0), retrying
Apr 16 13:42:06 strike /netbsd: wd0d: id not found reading fsbn 23579136 of 23579136-23579261 (wd0 bn 23579136; cn 23392 tn 0 sn 0), retrying
Apr 16 13:42:06 strike /netbsd: wd0d: id not found reading fsbn 23579136 of 23579136-23579261 (wd0 bn 23579136; cn 23392 tn 0 sn 0)
Apr 16 14:01:35 strike /netbsd: wd0: transfer error, downgrading to DMA mode 2
Apr 16 14:01:45 strike /netbsd: wd0(pciide0:0:0): using PIO mode 4, DMA mode 2 (using DMA data transfers)
Apr 16 14:01:45 strike /netbsd: wd0d: id not found reading fsbn 23579136 of 23579136-23579261 (wd0 bn 23579136; cn 23392 tn 0 sn 0), retrying
Apr 16 14:01:45 strike /netbsd: wd0: transfer error, downgrading to PIO mode 4
Apr 16 14:01:45 strike /netbsd: wd0(pciide0:0:0): using PIO mode 4
Apr 16 14:01:45 strike /netbsd: wd0d: id not found reading fsbn 23579136 of 23579136-23579261 (wd0 bn 23579136; cn 23392 tn 0 sn 0), retrying
Apr 16 14:01:45 strike last message repeated 3 times
Apr 16 14:01:45 strike /netbsd: wd0d: id not found reading fsbn 23579136 of 23579136-23579261 (wd0 bn 23579136; cn 23392 tn 0 sn 0)
Apr 16 14:03:11 strike /netbsd: wd0d: id not found reading fsbn 23579136 of 23579136-23579261 (wd0 bn 23579136; cn 23392 tn 0 sn 0), retrying
Apr 16 14:03:21 strike last message repeated 4 times
Apr 16 14:03:21 strike /netbsd: wd0d: id not found reading fsbn 23579136 of 23579136-23579261 (wd0 bn 23579136; cn 23392 tn 0 sn 0)
Apr 16 14:03:37 strike /netbsd: wd0d: id not found reading fsbn 23579136 of 23579136-23579261 (wd0 bn 23579136; cn 23392 tn 0 sn 0), retrying
Apr 16 14:03:47 strike last message repeated 4 times
Apr 16 14:03:47 strike /netbsd: wd0d: id not found reading fsbn 23579136 of 23579136-23579261 (wd0 bn 23579136; cn 23392 tn 0 sn 0)
Apr 16 14:03:52 strike /netbsd: wd0d: id not found reading fsbn 23579136 of 23579136-23579261 (wd0 bn 23579136; cn 23392 tn 0 sn 0), retrying
Apr 16 14:04:02 strike last message repeated 4 times
Apr 16 14:04:02 strike /netbsd: wd0d: id not found reading fsbn 23579136 of 23579136-23579261 (wd0 bn 23579136; cn 23392 tn 0 sn 0)
Apr 16 14:04:05 strike /netbsd: wd0d: id not found reading fsbn 23579136 of 23579136-23579261 (wd0 bn 23579136; cn 23392 tn 0 sn 0), retrying
Apr 16 14:04:15 strike last message repeated 4 times
Apr 16 14:04:15 strike /netbsd: wd0d: id not found reading fsbn 23579136 of 23579136-23579261 (wd0 bn 23579136; cn 23392 tn 0 sn 0)