Subject: Re: SCSI panic
To: None <oster@cs.usask.ca>
From: Phil Nelson <phil@cs.wwu.edu>
List: current-users
Date: 09/04/1997 21:31:36
>> sd2 at scsibus0 targ 2 lun 0: <MICROP, 4345WS, x43h> SCSI2 0/direct fixed
>> sd2: 4340MB, 4811 cyl, 11 head, 167 sec, 512 bytes/sect x 8890029 sectors
>
>That 8890029 seems wrong (see below).
>...
>The math in the disklabel doesn't seem to work:
> 1837 * 4811 = 8837807
This is true, but that disk does indeed have 8890029 sectors. That
is the number that comes from the read capacity command. Every SCSI
disk that I have used, the reported geometry gives fewer sectors than
can actually be addressed.
For example, one of my SCSI disks reports:
sd0 at scsibus0 targ 0 lun 0: <CDC, 94181-15, 7966> SCSI1 0/direct fixed
sd0: 573MB, 1546 cyl, 15 head, 50 sec, 512 bytes/sect x 1173930 sectors
1546 * 15 * 50 = 1159500
Using the same heads and sectors, the closest are:
1565 * 15 * 50 = 1173750
1566 * 15 * 50 = 1174500
But I used completely different numbers on my disklabel so I can
actually use all of my sectors on my disk. The following is from my
disklabel.
sectors/track: 109
tracks/cylinder: 10
sectors/cylinder: 1090
cylinders: 1077
total sectors: 1173930
Since the drivers are just asked to fetch a logical block number,
there is no problem. The FFS calculations for optimizations on
the disk are messed up a bit, but with SCSI, remapping of sectors
and such mess up the optimizations anyway.
--
Phil Nelson NetBSD: http://www.netbsd.org
e-mail: phil@cs.wwu.edu LPF: http://www.lpf.org
http://www.cs.wwu.edu/~phil !gifs: http://www.lpf.org/Patents/Gif/Gif.html