On Fri, Nov 25, 2005 at 04:02:03PM +0100, Robbert Haarman wrote:
> On Fri, Nov 25, 2005 at 03:03:22PM +0100, mickey wrote:
> > On Fri, Nov 25, 2005 at 02:57:22PM +0100, Robbert Haarman wrote:
> > >
> > > I'm not sure what you mean here. What I meant is that ccdconfig will
> > > automatically create a disklabel with partition c set to type 4.2BSD
> > > when you run it the first time. This has bugged many people who were
> > > trying to create their own partitions, as disklabel will not let you
> > > create any partitions when the type of partition c is set to anything
> > > other than unused.
> >
> > before you run ccdconfig you create (say) 'a' partition and then
> > ccdconfig ccd0 16 0 sd0a sd1a sd2a ...
>
> Before you run ccdconfig, the device doesn't exist. How do you create an
> a partition in that case?
default 'c' type is unused.
at least on default systems...
> > and your 'c' stays as 'unused' just fine.
> >
> > can you see now how much you shoot yourself in the foot by using 'c' ?
>
> No, frankly I really don't see it. If I look at my partition tables, I
> see the following:
>
> 1. On my physical disks, there is a DOS/BIOS partition table, which has
> to be in the first sector (MBR). This is why no partitions can start
> there, and partitions start after the first cylinder (typically, this
> means they start at sector 63).
>
> 2. The OpenBSD slices of my disks start at sector 24659775. This is also
> where the a partition of these disks start. It isn't that way because I
> made it that way, it was set up that way by the initial label editor
> when I did the installation.
some pplz use 'c' for their ccd components -- WRONG!
> 3. From 2, I conclude that wherever the BSD disklabel is stored, this
> does not affect where my partitions can be. The disklabel could be
> stored in my root partition, for all I know.
disklabel is the sector #1 of the fdisk partition
> 4. I have a ccd device starting at sector 41110398, with a size of
> 32901057 sectors. Inside the ccd device is a c partition of 32901056
> sectors, starting at sector 0, with type 4.2BSD. This isn't because I
> set it up this way, this is how the device was set up when I first ran
> disklabel. I never changed anything there.
oh uhm must be a bug in disklabel spoofing (:
> There are a number of possibilities now. One possibility is that the set
> up I got on my ccd device (a c partition with type 4.2BSD) is severely
> broken, but somehow works for me and for several other people on the
> net. This seems to be what you are suggesting.
>
> Another possibility is that the disklabel is indeed stored somewhere
> inside a partition, in which case the setup I have should be completely
> fine.
>
> Yet another possibility is that the disklabel is stored in the single
> missing sector on the ccd device (note that the size of the c partition
> is one smaller than the size of the ccd device). In this case, also, the
> setup should be completely fine.
>
> Perhaps there are other possibilities, too. Whichever the case is, the
> setup is either completely fine, or it is not. If it is, then there is
> little to worry about. If it isn't, then _some_ tool I used in setting
> up this configuration is wrong, because _I_ didn't set up the c
> partition on the ccd device that way. I didn't even know it was possible
> to set a c partition to anything besides unused.
>
> > > I assumed, as others did, that the fact that ccdconfig sets things up
> > > this way means that you can use the c partition for storing files on.
> > > You just told me this is not true, and it can in fact thrash the
> > > disklabel on your real disk. Therefore, it seems to me that
> > > ccdconfig setting the type of partition c to 4.2BSD is wrong. So I was
> > > wondering aloud if that is indeed a bug and if it will be fixed.
> >
> > ccdconfig does not choose partitions to use. people do.
>
> As I've said time and time before, I wasn't the one who set up the c
> partition this way. From what I've been able to find on the web,
> ccdconfig sets up the partition this way for everybody. So it's not just
> me. I'll say it again: if this setup is wrong, the software (either
> ccdconfig or some other tool involved in the process) is wrong, because
> that's what creates the setup. Just search the web if you don't believe
> me, there are posts of people who tried to create an a partition, but
> couldn't because the c partition had been set to 4.2BSD.
it's not about how the 'c' is setup.
you can screw it on normal drive as well.
just run a newfs on it!
the point is that the ccd part must be started w/ an offset as well!
> > unfortunately people are wrong. that why it's important
> > you make it proper and into real docs...
>
> Yes, I fully agree. Unfortunately, nobody who has commented on this, and
> that includes you and me, seems to know exactly how things work and
> what's happening. Before we figure out exactly how the facts are, we
> can't write proper and correct documentation.
>
> > > You mean like an entry in the FAQ on the OpenBSD website? How do I go
> > > about doing that?
> >
> > you write it and you send it to appropriate pplz (:
>
> Makes sense.
>
> Thanks for your input so far.
>
> Bob
>
> ---
> Configuration? Hah! Use the source, Luke!
>
--
paranoic mickey (my employers have changed but, the name has remained)