Updated: 22 October 2026 · Applies to: Device-Mapper Multipath (DM-Multipath) on Linux

DM-Multipath combines multiple physical I/O paths between a server and a storage array (separate cables, switches and controllers) into one aggregated device, for redundancy and throughput. These devices appear as /dev/mapper/mpathN, where N is the multipath group number.

Create a partition on a DM-Multipath device

Use fdisk, with n for a new partition and p for primary:

fdisk /dev/mapper/mpath0
Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p

Give the partition number, the first cylinder (the default is usually fine) and the last cylinder or a size:

Partition number (1-4): 1
First cylinder (1-1017, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-1017, default 1017):
Using default value 1017

Write the partition table to disk with w:

Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.

Register the new partitions under /dev/mapper:

kpartx -a /dev/mapper/mpath0

List the partitions on the device to confirm:

kpartx -l /dev/mapper/mpath0
mpath0p1 : 0 2295308 /dev/mapper/mpath0 61

Create a filesystem on the new partition

mkfs.ext4 /dev/mapper/mpath0p1

Then create a mount point and mount it:

mkdir /data
mount /dev/mapper/mpath0p1 /data

Which device name to use

DM-Multipath exposes the same device under three different naming schemes:

  1. /dev/dm-N
  2. /dev/mpath/mpathN
  3. /dev/mapper/mpathN

Never use /dev/dm-N: it is reserved for DM-Multipath's own internal use. Never use /dev/mpath/mpathN either: at boot time, udev may not create these device nodes quickly enough, which can cause the mount to fail intermittently.

Always use /dev/mapper/mpathN: these names are persistent and created automatically by device-mapper early in boot, so they are the names you should actually reference. In a clustered configuration, /dev/mapper/mpathN names are persistent on one machine across reboots, but there is no guarantee every node in the cluster assigns the same name to the same disk; use udev's own persistent-naming facility if you need a name that matches across every node.

Related services

KVM VPS hosting

NVMe SSD and full root access, with Free Basic Managed Support.

Unmanaged dedicated servers

full root access and free IPMI KVM, with Free Basic Managed Support.

Linux server management

hardening, patching, monitoring and automation for Ubuntu, Debian, RHEL and AlmaLinux.

Was this answer helpful?

Still stuck? Open a ticket