Multipathed devices can be used directly, with LVM, and with mdadm.
If you want to use the entire LUNs directly (for example, if you are using the SAN features to partition your storage), you can simply use the
/dev/disk/by-id/xxx names directly for
mkfs,
fstab, your application, etc.
To make LVM2 recognize the multipathed devices as possible physical volumes, you must modify
/etc/lvm/lvm.conf. It is important to modify it in a way that it does not scan and use the physical paths, but only accesses the multipath I/O storage through the multipath I/O layer. To do so, change the
filter and
types entry in
/etc/lvm/lvm.conf as follows:
filter = [ "a|/dev/disk/by-id/.*|", "r|.*|" ] types = [ "device-mapper", 253 ]
This allows LVM2 to scan only the by-id paths and reject everything else. If you are also using LVM2 on non-multipathed devices, make the necessary adjustments to suit your setup.
Just as for LVM2,
mdadm requires that the devices be accessed by the UUID rather than by the device node path. Therefore the
DEVICE entry in
/etc/mdadm.conf must be modified:
DEVICE /dev/disk/by-id/*
Currently, it is not possible to partition multipath I/O devices themselves. If the underlying physical device is already partitioned, the multipath I/O device reflects those partitions and the layer provides
/dev/disk/by-id/<name>p1 ... pN devices so you can access the partitions through the multipath I/O layer.
As a consequence, the devices need to be partitioned prior to enabling multipath I/O. If you change the partitioning in the running system, DM-MPIO does not automatically detect and reflect these changes. The device must be reinitialized, which usually requires a reboot.