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
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
For example, if the internal disk /dev/sda ( SCSI ID = 35002538d00000000) was partitioned and second partition used as physical volume 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/12/15: filter = [ "a|/dev/disk/by-id/scsi-35002538d00000000-part2|", "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:
SLES12/15: filter = [ "a|/dev/disk/by-id/scsi-<LOCAL_SCSI_ID>|", "a|/dev/disk/by-id/dm-uuid-.*mpath-.*|", "r|.*|"] 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|.*|"]
SLES11/12/15: filter = [ "a|/dev/dasd.*|", "a|/dev/disk/by-id/dm-uuid-.*mpath-.*|", "r|.*|"] SLES10 : filter = [ "a|/dev/dasd.*|", "a|/dev/disk/by-name/.*|", "r|.*|"]
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
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 HP SmartArray, since SLES 12 the cciss driver has been replaced with the hpsa driver. hpsa is scsi based driver while cciss is a block-driver. So, the LVM Filter in SLES 12 should point to the local SCSI ID. For more info search for HPE Technical White Paper c02677069.
Note: After LVM filter modification run "mkinitrd" to rebuild the initrd file with new configuration.
For additional information on using LVM on MPIO devices, see TID 7007498 - Using LVM on Multipath (DM MPIO) Devices .
Disclaimer
This Support Knowledgebase provides a valuable tool for 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-2006
- Modified Date:07-Apr-2022
-
- SUSE Linux Enterprise Server
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com