Questo contenuto non è disponibile nella lingua selezionata.

Chapter 2. Multipath devices


DM Multipath creates a single multipath device over multiple I/O paths to the same storage, organizing them logically. Without it, each path is seen as a separate device, even if they connect the same server to the same storage controller.

2.1. Multipath device identifiers

Multipath devices use specific naming conventions that determine how they appear in the file system. They can be identified by their World Wide Identifier (WWID) or user-friendly names like mpathN, depending on your configuration preferences.

When new devices are under the control of Device Mapper (DM) Multipath, these devices are created in the /dev/mapper/ and /dev/ directory.

Note

Any devices of the form /dev/dm-X are for internal use only and should never be used by the administrator directly.

The following describes multipath device names:

  • When the user_friendly_names configuration option is set to no, the name of the multipath device is set to World Wide Identifier (WWID). By default, the name of a multipath device is set to its WWID. The device name would be /dev/mapper/WWID. It is also created in the /dev/ directory, named as /dev/dm-X.
  • Alternately, you can set the user_friendly_names option to yes in the /etc/multipath.conf file. This sets the alias in the multipath section to a node-unique name of the form mpathN. The device name would be /dev/mapper/mpathN and /dev/dm-X. But the device name is not guaranteed to be the same on all nodes using the multipath device. If you set the alias option in the /etc/multipath.conf file, the name is not automatically consistent across all nodes in the cluster.
Note

This should not cause any difficulties if you use LVM to create logical devices from the multipath device. To keep your multipath device names consistent in every node, disable the user_friendly_names option.

For example, a node has two Host Bus Adapters (HBAs). They connect through an unzoned Fibre Channel (FC) switch to a dual-port storage controller. As a result, the node sees four devices. These devices are, /dev/sda, /dev/sdb, /dev/sdc, and /dev/sdd. DM Multipath creates a single device with a unique WWID that reroutes I/O to those four underlying devices per the multipath configuration.

In addition to the user_friendly_names and alias options, a multipath device also has other attributes. You can modify these attributes for a specific multipath device. To do this, create an entry for that device in the multipaths section of the /etc/multipath.conf file.

You can modify attributes for a specific multipath device by adding an entry in the multipaths section of /etc/multipath.conf.

For more information, see:

  • multipath(8) and multipath.conf(8) man pages on your system
  • /etc/multipath.conf file

2.2. Multipath devices in logical volumes

Multipath devices integrate seamlessly with LVM. This allows you to create physical volumes, volume groups, and logical volumes by using multipath device names instead of individual disk paths.

After creating multipath devices, you can use the multipath device names as a physical device name. You can do this when creating an Logical volume manager (LVM) physical volume. For example, if /dev/mapper/mpatha is the name of a multipath device, the pvcreate /dev/mapper/mpatha command marks /dev/mapper/mpatha as a physical volume.

You can use the resulting LVM physical device when you create an LVM volume group like any other LVM physical device.

To filter all the sd devices in the /etc/lvm/lvm.conf file, add the filter = [ "r/block/", "r/disk/", "r/sd./", "a/./" ] filter in the devices section of the file. For more information see the lvm.conf man page on your system.

Note

If you attempt to create an LVM physical volume on a whole device with configured partitions, the pvcreate command fails. The Anaconda and Kickstart installation programs create empty partition tables if you do not specify otherwise for every block device. If you want to use the whole device instead of creating a partition, remove the existing partitions from the device. You can remove existing partitions with the kpartx -d device command and the fdisk utility. If your system has block devices that are greater than 2Tb, use the parted utility to remove partitions.

When you create an LVM logical volume that uses active/passive multipath arrays as underlying physical devices, you can include filters. Add these filters in the /etc/lvm/lvm.conf file to exclude the disks that underline the multipath devices. The kernel changes the active/passive state by automatically detecting the correct hardware handler to use. For active/passive paths that require intervention to change their state, multipath automatically uses this hardware handler to do so as necessary. If the kernel does not detect the correct hardware handler, configure it in the multipath.conf file with the "hardware_handler" option. For active/passive arrays that require a command to make the passive path active, LVM prints a warning message when this occurs.

Depending on your configuration, LVM may print any of the following messages:

  • LUN not ready:

    end_request: I/O error, dev sdc, sector 0
    sd 0:0:0:3: Device not ready: <6>: Current: sense key: Not Ready
        Add. Sense: Logical unit not ready, manual intervention required
  • Read failed:

    /dev/sde: read failed after 0 of 4096 at 0: Input/output error

The following are the reasons for the mentioned errors:

  • Multipath is not set up on storage devices that are providing active/passive paths to a machine.
  • Paths are accessed directly, instead of through the multipath device.
Red Hat logoGithubredditYoutubeTwitter

Formazione

Prova, acquista e vendi

Community

Informazioni sulla documentazione di Red Hat

Aiutiamo gli utenti Red Hat a innovarsi e raggiungere i propri obiettivi con i nostri prodotti e servizi grazie a contenuti di cui possono fidarsi. Esplora i nostri ultimi aggiornamenti.

Rendiamo l’open source più inclusivo

Red Hat si impegna a sostituire il linguaggio problematico nel codice, nella documentazione e nelle proprietà web. Per maggiori dettagli, visita il Blog di Red Hat.

Informazioni su Red Hat

Forniamo soluzioni consolidate che rendono più semplice per le aziende lavorare su piattaforme e ambienti diversi, dal datacenter centrale all'edge della rete.

Theme

© 2026 Red Hat
Torna in cima