MPIO 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-name/xxx
names directly for mkfs, fstab,
your application, etc.
To make LVM2 recognize the MPIO 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 IO storage through the multipath IO layer. To
do so, change the filter
and
types
entry in /etc/lvm/lvm.conf
as
follows:
filter = [ "a|/dev/disk/by-name/.*|", "r|.*|" ] types = [ "device-mapper", 253 ]
This allows LVM2 to scan only the by-name paths and reject everything else. If you are also using LVM2 on non-multipath IO devices, make the necessary adjustments to suit your setup.
The same as for LVM2 applies to mdadm as well—the devices must be
accessed by name rather than by physical path. Therefore the
DEVICE
entry in
/etc/mdadm.conf
must be modified:
DEVICE /dev/disk/by-name/*
Currently it is not possible to partition multipath IO devices themselves.
If the underlying physical device is already partitioned, the
multipath IO device reflects those partitions and the layer
provides /dev/disk/by-name/>name<p1 ... pN
devices so you can access the partitions through the multipath IO layer.
As a consequence, the devices need to be partitioned prior to enabling multipath IO. If you change the partitioning in the running system, Multipath IO does not automatically detect and reflect these changes. It must be reinitialized, which usually requires a reboot.