[dm-devel] some perhaps obvious musings on alternatives...

Peter Grandi pg_devm at devm.for.sabi.co.UK
Tue Mar 16 14:30:47 UTC 2004


Hi, I have listened with interest to a talk by AGK on DM and LVM2, and I
have been thinking in particular about the DM, and been reading a bit
about it.

What it seems to me is that the DM is in effect a combination of three
mechanisms:

* A loop device.
* A RAID library.
* A sort of «filesystem» with a single directory and whose files are
  allocated in large (e.g. 4MB) extents.

The latter point interests me. I suspect that in effect a ``mapping'' is
in effect just a ``file'' in a rather simple filesystem (or rather, what
we call ``file'' is almost only a a mapping).

Now, it would be interesting to just have this ``filesystem'' as
actually a filesystem, e.g. 'lv2fs'; in part because it would avoid the
need for many of the special purpose commands that manipulate LVs
currently, and probably some of the PV commands too; in part because a
highly simplified, low overhead filesystem could be used for many other
purposes.

  Reading in 'INTRO' and in some old posting that "Earlier versions of
  the driver also had a custom file system interface (dmfs)", it seems
  that this was for configuration.

I can see that such a filesystem would have three main differences from
filesystems like say 'ext3':

* Very large extents (4MB and probably much bigger).
* Limited/fixed size file name length (say 128 characters).
* A single fixed size directory per filesystem (say with 128 entries).
* Ability to grow dynamically (when new physical volumes added).
* Save-on-write files for defining snapshots.

The latter ability (and copy-on-write) would I guess be rather useful in
general for files in any filesystem, and I suppose it could be added
without too much trouble to the VFS and some other filesystems too.

Perhaps one would add ``files that don't grow automatically'' to the
properties of 'lv2fs', but I think that is not necessary.

If such a filesystem existed, logical volume management would become:

* Use the existing 'md' drivers to create RAID (concat, stripe, mirror,
  ...) devices that span multiple partitions (if desired).
* Format those virtual or real partitions as 'lv2fs' filesystems.
* Create, move/copy/link, delete files on those filesystems would be
  almost all that is needed to do logical volume management.
* Use 'loop' or its variants to wrap those files into block devices.

with some little details omitted.





More information about the dm-devel mailing list