site  contact  subhomenews

Investigating device mapper

November 16, 2016 — BarryK
Device mapper is something that has been around for a very long time, from the 2.4 kernel days. I did briefly look at it many years ago, was interested in encryption support.

Decided today that device mapper needs a closer look, partly because it can be setup for CoW (Copy on Write), also the encryption.

I started with this page:
http://linuxgazette.net/114/kapil.html

...unfortunately, 'dmsetup' utility does not work. After scratching my head for a few hours, I downloaded the source of LVM2 and compiled it. Now it works. I think that the Ubuntu LVM2 DEB has a systemd dependency, causing dmsetup to hang, waiting on something that never happens I suppose, as systemd in Quirky has been castrated.

LVM2 is a Red Hat project, and those guys are the ones behind systemd. Anyway, I configured the source and it now works. I will probably make a PET, will also probably document how I configured it.

Note yet, as want to recompile it. Once again, I was stumped how to load device-mapped partitions at bootup without an initramfs, then I discovered this, some patches:
https://www.redhat.com/archives/dm-devel/2016-February/msg00112.html

...resistance from a LVM2 maintainer to accepting these patches.

Comments

Or rather, the patches are for the device-mapper support in the Linux kernel.

I tested the 3 v5 patches, yes, they do patch ok in the 4.8.7 source.

Tags: linux