[dm-devel] device mapper target vs personality, how do you decide to pick one or the other?

John Utz John.Utz at wdc.com
Mon Jul 14 17:00:32 UTC 2014


Thankyou so very much for this answer!

I absolutely failed to understand that these where 2 different subsystems in the same directory, it makes vastly more sense now.

From: dm-devel-bounces at redhat.com [dm-devel-bounces at redhat.com] on behalf of Bryn M. Reeves [bmr at redhat.com]
Sent: Monday, July 14, 2014 4:25 AM
To: device-mapper development
Subject: Re: [dm-devel] device mapper target vs personality, how do you decide to pick one or the other?

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.


dm-devel mailing list
dm-devel at redhat.com

More information about the dm-devel mailing list