Subject: Re: ccd and vnd together?
To: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
From: Jason Thorpe <firstname.lastname@example.org>
Date: 07/04/1996 11:21:11
On Thu, 4 Jul 1996 06:48:50 -0400
der Mouse <mouse@Collatz.McRCIM.McGill.EDU> wrote:
> I suppose then my question becomes, why does ccd care? I certainly
> can't see any excuse for it to be poking around with disk labels; it
> seems to me it should do what it's told with a minimum of fuss. Why
> would anyone want a ccd or vnd to have anything to do with disklabels
> anyway? Again, I must be missing something; someone must have
> deliberately made ccd care about disklabels, and I must confess I am
> completely unable to understand why.
Originally, Mike Hibler (when he wrote the first N versions) made it care.
This is what it does; it uses the DIOCGPART ioctl, which is used only
inside the kernel for various things. This returns a pointer to the
partition requested and a pointer to the disklabel. This information is
used to obtain:
- component partition size
- component partition fstype
The former is more important than the latter, though the ccd disallows
use of partitions != FS_BSDFFS (we've had this discussion on
current-users before, regarding ccd and fstypes.
It should be pretty obvious why component partition size is important :-)
I later added support for disklables in the ccd itself, but this is
different from inquiring the components' partition layouts.
The ccd _does_ do what it's told to with a minimum amount of fuss... It's
_very_ simple to use with components that support all of the necessary
features. Now, when I check in some changes to the vnd "soon", it will
do the same ... an image of a filesystem will have no disklabel, so a
"fake" in-core label will be created (which is exactly what happens with
the ccd, sd, cd, etc.) You don't have to explicitly put a label on a vnd
(that would be rediculous :-)
One could argue that the ccd could be hacked to just use "all" of a vnd.
My response to that is:
- should make the "disk" drivers somewhat consistent
- There are many benefits to supporting real disklabels in
The latter was used to save the data on sun-lamp (remember that box? :-)
when one of its disks started to fail. Chris was able to get a disk
image to me, I was able to read the actual disklabel and access the
individual filesystems as if it were a real disk. I imagine this could
be useful in other applications (like making disk images, etc).
Anyhow, hope that answers your question.
-- save the ancient forests - http://www.bayarea.net/~thorpej/forest/ --
Jason R. Thorpe email@example.com
NASA Ames Research Center Home: 408.866.1912
NAS: M/S 258-6 Work: 415.604.0935
Moffett Field, CA 94035 Pager: 415.428.6939