Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Apr 1998 02:20:32 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        freebsd-stable@FreeBSD.ORG, rich@chumbly.math.missouri.edu
Subject:   Re: Fdisk problems with 9GB scsi disk
Message-ID:  <199804241620.CAA29475@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>I'm running 2.2.5 stable with an adaptec 2940 UW and a seagate
>ST39173W, which is not for booting.
>The disk has 7520 cyls and 10 heads, according to the manual.
>dmesg says it has 17783240 sectors.
>Fdisk says:
>"A geometry of 7503/10/237 for sd2 is incorrect.  Using a more likely geometry"
>It uses 1106cyl/255trk/63sec which gives 17767890 sectors.  Close enough.
>I assigned the whole disk to fbsd.

Apparently not the first "track" of 63 cylinders.

>When I attempted to run disklabel from /stand/sysinstall, it bombed
>with no error messages I could catch.

I don't know what caused this.

>So I ran "disklabel -r /dev/rsd2 >proto" and edited the file.
>----------
>type: SCSI
>disk: sd2s1
>label: 
>flags:
>bytes/sector: 512
>sectors/track: 63
>tracks/cylinder: 255
>sectors/cylinder: 16065
>cylinders: 1106
>sectors/unit: 17783240
>rpm: 7200
>interleave: 1
>trackskew: 0
>cylinderskew: 0
>headswitch: 0           # milliseconds
>track-to-track seek: 0  # milliseconds
>drivedata: 0 
>
>8 partitions:
>#        size   offset    fstype   [fsize bsize bps/cpg]
>  a: 17767827       64    unused        0     0         # (Cyl.    0*- 1106*)
>  c: 17783240        0    unused        0     0         # (Cyl.    0 - 1106*)
>---------
>I just added the A partition and fixed the rpm.
>It updated the label fine, but when when I do a newfs, I get
>Warning: 622 sector(s) in last cylinder unallocated
>/dev/rsd2a:     17767826 sectors in 4338 cylinders of 1 tracks, 4096 sectors
>        8675.7MB in 272 cyl groups (16 c/g, 32.00MB/g, 7680 i/g)
>
>Newfs thinks it has 1 track/cyl.  Is there any rhyme or reason to the above?
>Should I just ignore the geometry numbers and let it think what it wants?
>Will I run into problems down the road?
>It would be nice if newfs agreed with disklabel ...
>By the way, what do the asterisks mean in the partition cyl lines?
>I assumed it meant the partition boundary is not on a cyl boundary...

This is all correct.

The label is weird but should work if it is applied to the whole disk
(not the whole disk less 63 sectors, possibly rounded to a cylinder
boundary)  (it has size 1106*255*63 - 63, which is correct if it is to
go on a slice of this size, and sysinstall probably wants to create such
a slice.  It has offset 64, which is weird.  0 is normal and 63 makes some
sense.  Since it is nonzero, the partition won't fit on a slice of size
1106*255*63 - 63; the slice size needs to be at least 1106*255*63 + 1).
A similar but more natural label for the whole disk would make the A
partition have the same base and offset as the C partition.

The warning is due to rounding of block bitmaps to an 8K block boundary.

By default, newfs ignores everything in the disk label except the size.
It invents a geometry with 1 big track/cyl.  This geometry often
disagrees with the geometry invented by fdisk, so rounding to an fdisk
"cylinder" boundary often gives a partial last "cylinder" in newfs
if you use one partition for the whole disk.  Yes, the asterisks mean
that the partition boundaries are not "cylinder" boundaries, where yet
another geometry (the one in the label) determines what a cylinder is.
By default, this geometry is only used to move the asterisks around.
It is used by newfs if newfs is invoked with options '-t 0 -u 0'.

Bruce

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199804241620.CAA29475>