Subject: Re: Which snapshot strategy to use? was: How to capture all
To: None <tech-kern@netbsd.org>
From: Christian Limpach <chris@pin.lu>
List: tech-kern
Date: 10/23/2003 19:10:14
On Thu, 23 Oct 2003 12:29:57 -0400 Thor Lancelot Simon <tls@rek.tjls.com> wrote:
> Obviously, if I want to migrate an existing filesystem into the block
> mapper, I can use 'dd'. If I don't want the overhead of the mapper
> itself (which, compared to all the CPU wasted by pointless calculations
> in FFS, is probably pretty darned small), I can play disklabel tricks,
> as Christian pointed out.
The overhead is about the same as with ccd and in the (for comparison
relevant) very simple case, there is almost no overhead since the disklabel
translation we do in the sd/wd/*d drivers is replaced by the lookup in the
block mapper driver.
> Christian: have you thought about how to arrange for the root FS to
> be on such a device? I assume it has an internal label of some sort
> so that it carries all its metadata around with it?
It depends on whether you want to parse disklabels (partitioning information
in whatever format actually) in the kernel or in userland:
- kernel: disklabel reading code reads disklabel on requested device and
passes mapping information to the block mapper.
- userland: boot program reads disklabel and passes mapping information to
the block mapper in the kernel. I think that the boot programs on most
ports have the necessary information already.
There's no internal label because metadata cannot always be stored within
the data area. You need partitioning information and that's where you
store metadata. Of course you can define your partitioning scheme such
that metadata is always stored next to the data, but I think that's
something the block mapper doesn't/shouldn't need to know about.
--
Christian Limpach <chris@pin.lu>