Novell is now a part of Micro Focus

My Favorites

Close

Please to see your favorites.

Using LVM on local and SAN attached devices

This document (3617600) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 12
SUSE Linux Enterprise Server 11
SUSE Linux Enterprise Server 10
SUSE Linux Enterprise Server 9
Logical Volume Management (LVM / LVM2)
Multipath I/O (MPIO)

Situation

A server is configured with system partitions carved out of logical LVM volumes stored on a local block device. After attaching a SAN and configuring the server for multipath (MPIO) using the SLES Storage Administration Guide, the local LVM volumes are no longer seen. The pvscan command does not show any local devices.

The default LVM filter, which activates LVM on all local storage devices, is as follows, and was originally in use on the machine:

filter = [ "r|/dev/.*/by-path/.*|", "r|/dev/.*/by-id/.*|", "r|/dev/.*/by-name/.*|", "a/.*/"]

During the process of implementing MPIO, the LVM filter was changed to the following recommended configuration, which assumes LVM will only be used on the SAN devices:
filter = [ "a|/dev/disk/by-id/dm-uuid-.*mpath-.*|", "r|.*|"]
types = [ "device-mapper", 1 ]

Resolution

To resolve this issue, modify the LVM filter to specifically scan both the local block device and the multipathing device nodes. Care should be taken to ensure the physical paths to the LUNs, typically represented as /dev/sd* devices, are excluded from the scan.

For example, if your local disk is /dev/sda and all SAN devices have the correct device nodes in /dev/disk/by-id/, the filter (in /etc/lvm/lvm.conf) should be similar to:

SLES11:  filter = [ "a|/dev/sda.*|", "a|/dev/disk/by-id/dm-uuid-.*mpath-.*|", "r|.*|"]
SLES10: filter = [ "a|/dev/sda.*|", "a|/dev/disk/by-name/.*|", "r|.*|"]

If the local devices are on an HP SmartArray controller with cciss devices, the filter should look like:

SLES11:  filter = [ "a|/dev/cciss/.*|", "a|/dev/disk/by-id/dm-uuid-.*mpath-.*|", "r|.*|"]
SLES10: filter = [ "a|/dev/cciss/.*|", "a|/dev/disk/by-name/.*|", "r|.*|"]

After implementing the above filter, execute `pvscan`, `vgscan` and `lvscan` to activate the new configuration.

When using the filter specifically references the acceptable block devices, the 'types' setting in /etc/lvm/lvm.conf may be commented out as follows:

#types = [ "device-mapper", 1 ]

Additional Information

The following filter is not correct for use with multipathing:

filter = [ "a|/dev/sd.*|", "a|/dev/disk/by-name/.*|", "r|.*|"]

This filter scans all /dev/sd* and activates them for use with LVM. Multipathed devices use device nodes created under /dev/disk/by-id, but also have /dev/sd* device nodes created for each physical path to the LUN. If these raw device nodes are scanned by LVM, there is a possibility that the LVM metadata will be read and activated on a raw path, rather than the multipath device node. This will result in a loss of fault tolerance and load balancing.

For additional information on using LVM on MPIO devices, see TID 7007498 - Using LVM on Multipath (DM MPIO) Devices.

Change Log

2011 Jan 7: Mike Latimer - Updated to reference new documentation and additional TID.
2009 Sep 18: Jason Record - Updated products, label and emphasis.

Disclaimer

This Support Knowledgebase provides a valuable tool for NetIQ/Novell/SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:3617600
  • Creation Date:27-JUL-06
  • Modified Date:14-MAR-16
    • NovellOpen Enterprise Server
    • SUSESUSE Linux Enterprise Server

Did this document solve your problem? Provide Feedback