fdisk very confused on 3ware system

Michael R. Wayne wayne at staff.msen.com
Tue Aug 1 03:33:06 UTC 2006


I am unable to create a new partition on a machine running
6.1-RELEASE-p3 and am beginning to suspect something is wrong in
fdisk.  If I run sysinstall and go to the partition editor, I get
the following, which seems correct:

   Disk name:      twed0                                  FDISK Partition Editor
   DISK Geometry:  9729 cyls/255 heads/63 sectors = 156296385 sectors (76316MB)

   Offset       Size(ST)        End     Name  PType       Desc  Subtype    Flags

	    0         63         62        -     12     unused        0
	   63   31455207   31455269  twed0s1      8    freebsd      165
     31455270   58717575   90172844  twed0s2      8    freebsd      165
     90172845   66126595  156299439        -     12     unused        0          

But, I am unable to create a new partition.  Every time I do that, I get:
   ERROR: Unable to write data to disk twed0!
This machine is not running secure:
   kern.securelevel: -1


So, I decided to go in with fdisk and see what was up.  It looks
like something is very confused on partition two, which is likely
why I can not create a partition 3:

   > fdisk /dev/twed0      
   ******* Working on device /dev/twed0 *******
   parameters extracted from in-core disklabel are:
   cylinders=9729 heads=255 sectors/track=63 (16065 blks/cyl)

   Figures below won't work with BIOS for partitions not in cyl 1
   parameters to be used for BIOS calculations are:
   cylinders=9729 heads=255 sectors/track=63 (16065 blks/cyl)

   Media sector size is 512
   Warning: BIOS sector numbering starts with sector 1
   Information from DOS bootblock is:
   The data for partition 1 is:
   sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
       start 63, size 31455207 (15358 Meg), flag 80 (active)
	   beg: cyl 0/ head 1/ sector 1;
	   end: cyl 1023/ head 254/ sector 63
   The data for partition 2 is:
   sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
       start 31455270, size 58717575 (28670 Meg), flag 0
	   beg: cyl 1023/ head 255/ sector 63;
	   end: cyl 1023/ head 254/ sector 63		<---------------- !!
   The data for partition 3 is:
   <UNUSED>
   The data for partition 4 is:
   <UNUSED>

At this point, I'm suspecting that fdisk is computing something
incorrectly and am not sure how to proceeed as I'd prefer not to
corrupt my disk label.  Before I consider filing a PR, is this a
known problem?

/\/\ \/\/


More information about the freebsd-hackers mailing list