device-mapper-service provides a systemd template unit for creating
device-mapper devices from table files stored in /etc/device-mapper.
The package is split into two RPMs:
device-mapper-serviceinstallsdevice-mapper@.serviceand owns/etc/device-mapper.device-mapper-service-generatorinstallsdm-create, a helper that writes table files and starts the matching service instance.
Each device is described by a table file named:
/etc/device-mapper/NAME.table
Start a configured device with:
systemctl enable --now device-mapper@NAME.serviceStop it with:
systemctl disable --now device-mapper@NAME.serviceIf the mapped device contains a partition table, the service asks partx to add
the partition devices. Devices without a partition table are valid too; in that
case partx reports that no partition table can be read and the service
continues.
Install the generator subpackage, then run:
dm-create NAME DEV1 DEV2...For example:
dm-create faststripe /dev/sdb /dev/sdcdm-create creates /etc/device-mapper/faststripe.table, reloads systemd, and
starts device-mapper@faststripe.service.
The stripe chunk size is controlled by CHUNK_SECTORS and defaults to 256
sectors:
CHUNK_SECTORS=512 dm-create faststripe /dev/sdb /dev/sdcThe project uses Meson only to configure and install template files:
meson setup build
meson compile -C build
meson install -C build