# Re: disk geometry change

Guest section DW (dwguest@win.tue.nl)
Mon, 26 Apr 1999 01:37:53 +0200 (MET DST)

Ok, seing this, I have a question. I have a pair of Cheetah 9Gb wide
drives, both running of of a Symbios scsi/ethernet card (875 IIRC). One
drive shows up with 1106 cylinders and the other shows the 8K+ number of
cylinders. At first I thought it must have been a side effect of a
failed NT install attempts. After low-level formatting, nothing changed.
What would cause this, and is it something I should be concerned about?

Low-level formatting <rude remarks deleted>.

Concerned? No, not at all.

What would cause this?

No doubt the two geometries involved have H=255, S=63 and H=64, S=32,
respectively.
Maybe the geometry for your disk is returned by scsicam_bios_param()
in scsicam.c. Let me describe this routine.

It will (i) try to find the geometry used by the BIOS from the partition table
(horrors!) and if that fails (ii) it invents a suitable translation itself,
and if also that fails (iii) H=64, S=32, or, if this would lead to more than
65534 cylinders, H=255, S=63.

Let me quote the Large-Disk HOWTO:
==========================================================================
If there is a nonempty partition, pick the partition with the largest beginC.
For that partition, look at end+1, computed both by adding start and length
and by assuming that this partition ends on a cylinder boundary.
If both values agree, or if endC = 1023 and start+length is an integral
multiple of (endH+1)*endS, then assume that this partition really was
aligned on a cylinder boundary, and put H = endH+1 and S = endS.
If this fails, either because there are no partitions, or because
they have strange sizes, then look only at the disk capacity M.
Algorithm: put H = M/(62*1024) (rounded up), S = M/(1024*H) (rounded up),
C = M/(H*S) (rounded down). This has the effect of producing a (C,H,S)
with C at most 1024 and S at most 62.
==========================================================================

Part (ii) follows the norms, but will fail for every disk larger than
8.3 GiB, and in particular for your 9.1 GiB Cheetahs.
So, if indeed you use a scsi driver that uses scsicam_bios_param(),
then the geometry you get will be determined by (i) or (iii).
Part (iii) would give you 8667 cylinders or so, that is one
of the values you report. Part (i) depends on the partition table,
but 1106 cylinders sounds about right for H=255, S=63.
(I would have expected C=1104, assuming a capacity of
6526*16*170*512=9088368640 bytes. Perhaps you have a different model.)

Andries

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu