Linux Disk Management – Multipath Management

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Cofiguring Multipathing

Install Multipath Package.

Enable The Multipathing Service.

List Multipath Disks

Example output:

Zoning FC On Linux

Find the WWN for the Ports

Issuing a LIP on the HBA

Fibre Channel Commands

A great tool for linux is systool, it does not come installed by default.
It can be installed by installing these 2 packages.

Disk Configuration.

About Device Names And Paths In A Multipath Configuration

There are several term for devices that are mentioned in this article. physical devices and multipath devices.

Physical Device Paths

Physical devices names and paths are what the OS sees from the array itself, and it uses those device names to group them as a single multipath device.

These names are typically named /dev/sd{X}, to determine the physical device names that are used for a multipath device, you can run the following command:

You should get an output similar to this:

In this example, the physical device names are sdb, sdc, sdd, and sde.

Multipath Device Paths

Multipath device paths are an aggregate block device that device-mapper creates from the physical devices. The devices names typically start with mpath followed by a letter. they are located in /dev/mapper/. These names are used to create file-systems etc. on the device.

You can determine the name by running the following command:

In this case, the Multipath Device name is mpathb, and it would be located at /dev/mapper/mpathb

LVM and Multipathing software

By default LVM scans all block devices under /dev, including /dev/sdb etc, in which the case may be that they are part of a multipath device, therefore causing error to be thrown when running LVM commands like lvs or lvchange.

The workaround to this, is to filter out all devices that start with /dev/sd*, except the device on which the OS is running. To accomplish this, add a filter to /etc/lvm/lvm.conf as follows.

To test if the syntax does what you want it to do, you can run:

Managing Volumes

Creating A Volume Group

Creating a Logical Volume

This will create a logical volume on the entire disk.

Creating a Filesystem On The Logical Volume

Resizing Volumes

Find The physical device name for every path.

Rescan each individual device path.

Write a 1 to the rescan file for the device

Resize your device by running the multipathd resize command for the multipath device.

Confirm the new device size

Find the physical device path.

Resize the Physical volume.

Check the Physical Volume if it has changed.

You can see the size has increased to 8 TB

Resize the Logical volume.

Check if the size of the Logical Volume has indeed increased.

Check Filesystem for erroros.

Before you do fsck, you need to unmount the drive.

Resize the Partition.

Remove Multipath Device

For {devid} use the device name from the output on multipath -l. e.g.

Vendor Specific Parameters.

For 3PAR

Add these lines to the end of /etc/multipath.conf in the devices section.

For Violin

For Hitachi VSP

For Kaminario

For Pure Flash Array

Create the udev file fop pure-storage and add the following content to it.

Add the following line to the devices section in /etc/multipath.conf.

Leave a Reply

avatar
  Subscribe  
Notify of