Subject: Re: swap on cgd(4)
To: David Brownlee <firstname.lastname@example.org>
From: Thor Lancelot Simon <email@example.com>
Date: 04/17/2003 13:58:33
On Thu, Apr 17, 2003 at 07:40:48PM +0100, David Brownlee wrote:
> On Thu, 17 Apr 2003, Roland Dowdeswell wrote:
> > I've an interesting issue with cgd(4) which has been brought to my
> > attention by Lubomir Sedlacik. That is: if cgdconfig(8) configures
> > up a cgd with a randomkey then the device does not have a disklabel.
> > This is all good for ffs because the default disklabel has a default
> > type for the RAW_PART partition which is of type 4.2BSD but it
> > poses a problem for swapping. I've thought of a few ways to solve
> > this issue and wanted to propose some of them for feedback.
> How about an option to disklabel to create a single partition
> spanning the given device with the specified type.
> Eg: disklabel -g cgd0 a swap
> could be useful for autogenerated vnd devices and similar.
> (though it may make sense to fail if there are any other non
> raw partitions in existance on the device :)
Actually, it will cause random lossage with, at least, ccd, because the
partition in question will include the protected label area. FFS knows
how to never write to that area (and thus never generate I/O errors);
maybe the swap code does, too, I don't know. Does cgd? More importantly,
should it have to? I think the label generated as you suggest should skip
over the protected piece at the front of the disk, and include everything
Thor Lancelot Simon firstname.lastname@example.org
But as he knew no bad language, he had called him all the names of common
objects that he could think of, and had screamed: "You lamp! You towel! You
plate!" and so on. --Sigmund Freud