From owner-freebsd-hackers Mon Jan 27 17:24:29 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id RAA03402 for hackers-outgoing; Mon, 27 Jan 1997 17:24:29 -0800 (PST) Received: from who.cdrom.com (who.cdrom.com [204.216.27.3]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id RAA03377 for ; Mon, 27 Jan 1997 17:24:25 -0800 (PST) Received: from sendero.i-connect.net ([206.190.144.100]) by who.cdrom.com (8.7.5/8.6.11) with SMTP id OAA27390 for ; Mon, 27 Jan 1997 14:32:04 -0800 (PST) Received: (qmail 3725 invoked by uid 1000); 27 Jan 1997 23:30:08 -0000 Message-ID: X-Mailer: XFMail 1.1-alpha [p0] on FreeBSD Content-Type: text/plain; charset=iso-8859-8 Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Mon, 27 Jan 1997 14:27:12 -0800 (PST) Organization: iConnect Corp. From: Simon Shapiro To: (Joerg Wunsch) Subject: Re: fdisk headache Cc: freebsd-hackers@freebsd.org, (Jean-Marc Zucconi) , (J Wunsch) Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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 = 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. ;-)