Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I know a tool kpartx can be used to configure multipath on system. But what does the CONFIG_DM_MULTIPATH kernel module do? My system does not have this module compiled, and it seems the kpartx tools works very well. It seems they are not related, am I right?

share|improve this question
up vote 2 down vote accepted

CONFIG_DM_MULTIPATH is not the name of a kernel module; it's the name of a kernel configuration option that enables the dm_multipath driver, which in turn enables multipath i/o for block devices. "Multipath I/O" means that a single device (think "disk") can be accessed via multiple communication channels -- for example, a storage array connected via a pair of fibre channel links. Without the multipath driver, each link looks like a separate device, which can lead to confusion. The multipath driver can present these two links as a single device, and take care of selecting an alternative path if one path fails.

This document from RedHat has a good discussion of multipath support under Linux.

You are correct that this has very little to do with kpartx.

share|improve this answer
Thanks. If kpartx has little to do with dm_multipath, then what kind of multipath it is talking about? – davidshen84 Apr 26 '12 at 1:54
I'm not sure where you're seeing the reference, so it's hard to say. The kpartx man page does briefly mention the multipath driver, but they're "related" in the sense that they're written by the same author and kpartx can operate on block devices, including those presented by the multipath driver. – larsks Apr 26 '12 at 11:12

kpartx is just the component to create "multipathed" device entries for the partitions on a multipathed storage unit.

Imagine you insert a dual-pathed fibre channel disk with one single partition: udev discovers the disk, the "basic" kernel assigns two different devices to each of the disk's pathes (eg. /dev/sdx and /dev/sdy) , and subsequently, the one partition is visible as /dev/sdx1 and /dev/sdy1.

Now, kpartx comes into play and creates a /dev/mapper/<ID of the new disk>p1 device (sometimes also shown as -part1).

This special partition entry is what you should use for your application (instead of the dev/sd[xy]1entries). That makes sure you access the underlying partition via the multipath module's *combined* device/dev/mapper/and not via just one path's/dev/sdx1` entry.

The kpartx utility is so to say just a "parser" for partition tables on multipathed devices, creating multipathed device nodes just for their partitions.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.