[dm-devel] device mapper target vs personality, how do you decide to pick one or the other?
Bryn M. Reeves
bmr at redhat.com
Mon Jul 14 11:25:26 UTC 2014
On Fri, Jul 11, 2014 at 09:28:51PM +0000, John Utz wrote:
> having said that, it seems that the personality code is ancestral and is used for the personalities that can be compiled into device mapper and the target code is for newer stuff that is not expected to be compiled into device mapper.
Not really; it's just a bit confusing as two different but closely
related subsystems live in drivers/md. One is 'md', the Linux
multi-devices subsystem. This is the traditional Linux software RAID
subsystem and offers 'personalities' for different RAID levels and other
mapping types (RAID1-6, JBOD/linear, multipath w/on-disk metadata).
The other is 'dm'; the device-mapper. Using dm offers more flexibility
in specifying virtual devices via the table abstraction (which lets you
glue several targets together a bit like the MD linear personality).
Today dm has targets for linear, zero, error, mirror, snapshot (old),
thin provisioning, caching etc. and also exposes the MD RAID
personalities as dm targets (dm-raid.c; not to be confused with the
userspace dmraid utility).
> so, based on this speculation, i *think* i should be using the target construct for the new device mapper module that i am currently coding.
For dm it's always a target: you'd only create a new personality if you
wanted to extend MD's available RAID levels or types.
More information about the dm-devel