Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Dec 1995 19:05:57 +1100
From:      Bruce Evans <bde@zeta.org.au>
To:        freebsd-current@FreeBSD.org, j@uriah.heep.sax.de
Subject:   Re: disklabel -r -w rz2 rzxx
Message-ID:  <199512210805.TAA09744@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>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



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