Subject: Re: sd3: not queued (using ccd) Do I have problems?
To: None <port-sparc@NetBSD.ORG>
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
List: port-sparc
Date: 02/28/1996 14:05:14
>> ccd AFAICT has no way to not begin at the beginning of its component
>> partition, and - at least for those of us stuck with vendor boot
>> ROMs on Suns (and this _is_ port-sparc) - partitions must begin on
>> cylinder boundaries.
> You are only stuck with that limitation on your boot disk.

And backup boot disk(s), true.

> And, I'm pretty sure I've partition disks with SunOS format(8) such
> that partitions don't fall on cylinder boundaries before ... I could
> be wrong, but...

I'm fairly sure that you are wrong, or else there are two different
label formats in use by SunOS.  The one NetBSD understands stores
partition base offsets in units of cylinders; there isn't even any way
to _represent_ a partition that doesn't begin on a cylinder boundary.

Unless of course the disk was relabeled such that the label lied about
how large a cylinder was, which is the sort of hack I was alluding to
in my remarks that started this off.

> In any case, you could certainly write a NetBSD disklabel to the
> component disk, if you wish.  While port-sparc (and port-sun3)
> doesn't currently have an easy method of doing so (which is a bug,
> BTW),

Incidentally, I think that disklabel, like fsck, should be willing to
operate on a disk image stored in a file.  It would make it really easy
to do disklabels "by hand" - just do it in a file and dd it to the
disk.  You don't even have to have the disk on a NetBSD machine at the
time, if you can copy the label image file over to another machine.

Or does the vnd driver now support the disklabel ioctls?  That would
amount to the same thing.  (Though I really disklike having to put a
label on a vnd or a ccd.  I still stand by the opinions in PR1367,
which incidentally seems like a good idea to me even if ccd and vnd
_do_ support the disklabel ioctls.)

>> I suppose I should stop grumbling and patch ccd to do what I want,
>> that is, to skip the first few sectors, either (a) if ccdconfig is
>> told to, (b) if the component partition offset is zero, or (c)
>> always....
> The problem is that you've now made that offset machine dependent.
> "Ick".

Sort of.

> I.e. you should really only skip LABELSECTOR + (sizeof(struct
> disklabel) rounded to sector size) sectors, but LABELSECTOR and
> (sizeof(struct disklabel)) are machine-dependent quantities.

So is sector size, theoretically. :-)

For option (a), I actually was thinking of having the offset itself
passed in via ccdconfig, not just a boolean saying whether to do it.
So if you want to make it nonzero, you put it on the ccdconfig command
line, or in ccd.conf, which IMO makes it acceptable for it to be
machine-dependent.

					der Mouse

			    mouse@collatz.mcrcim.mcgill.edu