Bug 20295

Summary: fdisk -s give incorrect disk size
Product: Base System Reporter: hvb <hvb>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description hvb 2000-07-30 01:40:01 UTC
The output of fdisk -s does not agree with /stand/sysinstall or disklable for one of my IBM SCSI disk and maybe other.
root@ks-1:bin[131] disklabel -r /dev/rda0
# /dev/rda0:
type: SCSI
disk: IBM
label:
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 263
sectors/unit: 4226725
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:  4226725        0    unused        0     0         # (Cyl.    0 - 263*)
root@ks-1:bin[132] fdsik -s
zsh: correct 'fdsik' to 'fdisk' [nyae]? y
/dev/rda0: 263 cyl 255 hd 63 sec
Part        Start        Size Type Flags
root@ks-1:bin[133] fdisk -I da0
******* Working on device /dev/da0 *******
root@ks-1:bin[134] fdisk -s
/dev/rda0: 263 cyl 255 hd 63 sec
Part        Start        Size Type Flags
   1:          63     4225032 0xa5 0x80


Sorry no time to chase this any more right now.  Will check 4.1-R  in a day or so

How-To-Repeat: /bin/dd if=/dev/zero of=$dev count=128 
/sbin/fdisk -I $disk
/sbin/disklabel -r -w da0 auto  <--- will fail with can not change size of open
Comment 1 Sheldon Hearn freebsd_committer freebsd_triage 2000-07-31 13:38:01 UTC
State Changed
From-To: open->feedback

Originator to follow up with results on a 4.1-RELEASE box.
Comment 2 Dag-Erling Smørgrav freebsd_committer freebsd_triage 2001-03-13 00:48:25 UTC
State Changed
From-To: feedback->closed

Feedback timeout.