Re: Disklabel bug?

From: Simon L. Nielsen <simon_at_nitro.dk>
Date: Wed, 30 Apr 2003 19:01:47 +0200
On 2003.04.30 17:36:04 +0200, Poul-Henning Kamp wrote:
> In message <20030430104448.GD400_at_nitro.dk>, "Simon L. Nielsen" writes:
> 
> >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.
> 
> Hmm, I just tried this on my test box, and it came out right, so I 
> 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_at_ford:simon] dd if=/dev/zero of=/dev/da0 count=1k
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_at_ford] disklabel -e da0s1

In my editor :

# /dev/da0s1c:
type: SCSI    
disk: da0s1
label:     
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 29187       
sectors/unit: 468903936
rpm: 3600              
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]
  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 utilities

GEOM shows the following on the console :

GEOM: Configure da0s1, start 32256 length 21467948544 end 21467980799
GEOM: Configure da0s2, start 21467980800 length 218603266560 end 240071247359
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=154
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 
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: 
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 

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.

-- 
Simon L. Nielsen

Received on Wed Apr 30 2003 - 08:01:51 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:05 UTC