Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Apr 2003 19:01:47 +0200
From:      "Simon L. Nielsen" <simon@nitro.dk>
To:        Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc:        freebsd-current@freebsd.org
Subject:   Re: Disklabel bug?
Message-ID:  <20030430170146.GE400@nitro.dk>
In-Reply-To: <11540.1051716964@critter.freebsd.dk>
References:  <20030430104448.GD400@nitro.dk> <11540.1051716964@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help

--HeFlAV5LIbMFYYuh
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On 2003.04.30 17:36:04 +0200, Poul-Henning Kamp wrote:
> In message <20030430104448.GD400@nitro.dk>, "Simon L. Nielsen" writes:
>=20
> >I have a disk with two slices since I need more partions than on slice
> >can hold.  I have one 20GB and one ~200GB but when I edit the disklabels
> >for the two slices it looks like disklabel(8) get the total size of the
> >slize wrong (sectors/unit).  It uses the size of the entire disk instead
> >of the slice causing disklabel to complain about the c partion being
> >wrong size.
>=20
> Hmm, I just tried this on my test box, and it came out right, so I=20
> wonder if you can remember the exact steps which brought you in
> this situation ?

I can reproduce it :
* Clear start of disk with dd
[root@ford:simon] dd if=3D/dev/zero of=3D/dev/da0 count=3D1k
1024+0 records in
1024+0 records out
524288 bytes transferred in 0.543731 secs (964242 bytes/sec)
* Add two slices with sysinstall (20GB+~203GB) to da0
* Write slices out choosing FreeBSD boot manager
* Run disklabel :
[root@ford] disklabel -e da0s1

In my editor :

# /dev/da0s1c:
type: SCSI   =20
disk: da0s1
label:    =20
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 29187      =20
sectors/unit: 468903936
rpm: 3600             =20
interleave: 1
trackskew: 0=20
cylinderskew: 0
headswitch: 0           # milliseconds
track-to-track seek: 0  # milliseconds
drivedata: 0                         =20
           =20
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  c: 41929587        0    unused        0     0         # (Cyl.    0 - 2609=
*)

After quitting it shows :

Warning, partition c doesn't cover the whole unit!
Warning, An incorrect partition c may cause problems for standard system ut=
ilities

GEOM shows the following on the console :

GEOM: Configure da0s1, start 32256 length 21467948544 end 21467980799
GEOM: Configure da0s2, start 21467980800 length 218603266560 end 2400712473=
59
GEOM: Configure da0s1c, start 0 length 21467948544 end 21467948543
GEOM: Configure da0s2c, start 0 length 218603266560 end 218603266559
GEOM: Reconfigure da0s1c, start 0 length 21467948544 end 21467948543

It's on a Adaptec ATA RAID 2400A (emulates SCSI for the IDE disks) :

asr0: <Adaptec Caching SCSI RAID> mem 0xe6000000-0xe7ffffff irq 5 at device=
 14.0 on pci0
asr0: major=3D154
asr0: ADAPTEC 2400A FW Rev. 3A0L, 4 channel, 256 CCBs, Protocol I2O
da0 at asr0 bus 0 target 0 lun 0
da0: <ADAPTEC RAID-5 3A0L> Fixed Direct Access SCSI-2 device=20
da0: Tagged Queueing Enabled
da0: 228957MB (468903936 512 byte sectors: 255H 63S/T 29187C)

Btw. I just checked the disklabel from 4.8 :

ford# disklabel -e da0s1
# /dev/da0s1c:
type: SCSI
disk: da0s1
label:=20
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 2609
sectors/unit: 41929587
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # milliseconds
track-to-track seek: 0  # milliseconds
drivedata: 0=20

8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  c: 41929587        0    unused        0     0         # (Cyl.    0 - 2609=
*)

So there is no problem there under 4.8.

--=20
Simon L. Nielsen

--HeFlAV5LIbMFYYuh
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (FreeBSD)

iD8DBQE+sAF68kocFXgPTRwRAn8FAKCiFp9aJWVWidBn1NrYaA7MPHAtbgCaAo9r
MGy9FqyuRth1HgEpFTD9+QQ=
=9C6C
-----END PGP SIGNATURE-----

--HeFlAV5LIbMFYYuh--



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