From owner-freebsd-current Thu Dec 21 00:08:12 1995 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id AAA20178 for current-outgoing; Thu, 21 Dec 1995 00:08:12 -0800 (PST) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id AAA20169 for ; Thu, 21 Dec 1995 00:08:06 -0800 (PST) Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id TAA09744; Thu, 21 Dec 1995 19:05:57 +1100 Date: Thu, 21 Dec 1995 19:05:57 +1100 From: Bruce Evans Message-Id: <199512210805.TAA09744@godzilla.zeta.org.au> To: freebsd-current@FreeBSD.org, j@uriah.heep.sax.de Subject: Re: disklabel -r -w rz2 rzxx Sender: owner-current@FreeBSD.org Precedence: bulk >Geeze. I've been installing a new SCSI disk at a customer lately who >is running digital unix. Interestingly enough, everything around the >file system (disklabel, newfs) looked very confident to me. >Well, they've got one (undocumented, of course) feature i found >interesting: in order to write the disklabel for the first time onto >an unlabelled disk, you could provide it with the argument "rzxx", and >the system figured out the basic parameters of the drive (and made an >initial suggestion for the file systems). >I thought of this being a neat idea, and actually all we need in order >to implement it would be that ioctl(DIOCGDINFO) would fill in as much >parameters for an unlabelled disk as the driver does already know. It already does. The known parameters are available for the whole drive and can easily be used for dangerously dedicated drives, e.g., disklabel /dev/rsd0 | sed -e 's/^rpm: 0$/rpm: 3600/' -e 's/^interleave: 0$/interleave: 1/' | disklabel -R -r /dev/rsd0 /dev/stdin Here the sed commands substitute some of the unknown values with possibly-bogus but working values. Of course, the fact that this works means that the label isn't necessary except for its partitioning function. Handling slices is more complicated. Apart from DIOCGDINFO only being implemented for slices that already have a BSD label, it is important for the slices to be allocated before the labels. How does digital handle the extra layer of complications? ;-) Bruce