Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Jan 1997 14:27:12 -0800 (PST)
From:      Simon Shapiro <Shimon@i-Connect.Net>
To:        (Joerg Wunsch) <joerg_wunsch@uriah.heep.sax.de>
Cc:        freebsd-hackers@freebsd.org, (Jean-Marc Zucconi) <jmz@cabri.obs-besancon.fr>, (J Wunsch) <j@uriah.heep.sax.de>
Subject:   Re: fdisk headache
Message-ID:  <XFMail.970127153008.Shimon@i-Connect.Net>
In-Reply-To: <Mutt.19970126003302.j@uriah.heep.sax.de>

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

Hi J Wunsch;  On 25-Jan-97 you wrote: 
> As Jean-Marc Zucconi wrote:
> 
> > I try to add another disk, but it seems that something has changed
> > since my last drive installation because fdisk doesnt want to write a
> > correct information.
> 
> Why are you using fdisk at all?  You are running Unix, you aren't
> running on a PC, you are not supposed to use fdisk (unless other
> systems on your disk force you to this step).

Slow down....  The gentleman has a valid point, methinks.  If not, 
please show me how to build 120 filesystems on a disk that is 750GB
large.  Impossible/stupid numbers?  not really when considering a large
disk array with a very large database.

>From what I have seen, FreeBSD gives me 6 partitions (slices) per device.
not quite enough.  I am running 22 filessystems on a 16GB ccd conglomerate
and porting/qriting a driver for the DPT controller that allows, easily,
4 wide controllers, 3 busses each, 15 targets per drive, 15 LUNS per
target.  Shall I go on?

> 
> :-)
> 
> > My new drive is probed as:
> >     (ncr1:6:0): "QUANTUM FIREBALL_TM3200S 300N" type 0 fixed SCSI 2
> >     sd4(ncr1:6:0): Direct-Access 
> >     sd4(ncr1:6:0): 10.0 MB/s (100 ns, offset 8)
> >     3067MB (6281856 512 byte sectors)
> >     sd4(ncr1:6:0): with 6810 cyls, 5 heads, and an average 184
> >     sectors/track
> > (why 6810*5*184 != 6281856 ???)
> 
> So, if you don't understand it -- why do you boot with -v at all?  We
> deliberately took this line out of the default messages:
> 
>       sd4(ncr1:6:0): with 6810 cyls, 5 heads, and an average 184
>                                                   ^^^^^^^^^^^^^^
> 
> ...and this should be taken as a good indication that nobody claims
> the equation C*H*S = <total number of sectors> should assumed to be
> true.  It's just the other way round: the SCSI drive can report about
> its number of heads, cylinders, and total number of blocks.  Since it
> can't report about the number of sectors per track (and this number
> would barely make sense at all), the boot message calculates that
> average from the other three figures.
> 
> > When I start fdisk it tells me that the drive has 19035cyl, 6heads,
> > 55sec/trk. Wanting to change the values to 6810/5/184, I get
> 
> You can't.  You are limited by the BIOS constraints in an fdisk table.
> The best you could do is changing it to 1024/x/y where x and y match
> the emulation your BIOS is using.
> 
> >     The data for partition 3 is:
> >     sysid 165,(FreeBSD/NetBSD/386BSD)
> >         start 1, size 6265199 (3059 Meg), flag 80
> >             beg: cyl 0/ sector 2/ head 0;
> >             end: cyl 666/ sector 55/ head 5
> > The last value is obviously wrong, but if try to change it to
> > something more realistic, eg. 6810/5/183, fdisk interpret my values as
> > 666/55/5 !!!!!
> 
> Because it will be (silently) masked by 0x3ff.
> 
> > The real problem is then when I want to label the disk: I get
> > 
> >     ioctl DIOCWLABEL: Operation not supported by device
> >     sd4s4: type 0xa5, start 1, end = 6265199, size 6265199 
> >     sd4s4: C/H/S end 666/5/55 (220109) != end 6265199: invalid
> 
> The slice code knows about various BIOS problems.  It assumes a few
> bogus geometry values (including the 1024 cylinders one).  However,
> the total number of sectors in the BSD slice must still match the `c'
> partition value -- 6265199.
> 
> > Is there a solution? I don't care if the geometry is incorrect as long
> > I can disklabel/newfs the drive and use the 3067 Mb!!!
> 
> The simplest solution (assuming you only want FreeBSD there) is:
> 
> . wipe out your junked fdisk table: dd if=/dev/zero of=/dev/rsd4 count=10
> . give the entire disk to FreeBSD:  disklabel -Brw sd4 auto
> . edit the partitions as you need:  disklabel -e sd4
> 
> -- 
> cheers, J"org
> 
> joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC:
JW11-RIPE
> Never trust an operating system you don't have sources for. ;-)



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