Logical volume management

Consider these aspects when the virtual server utilizes logical volumes.

Path redundancy

As discussed in Virtual block devices, it is important to ensure that you provide path redundancy for all physical volumes. Especially, all LVM physical volumes on SCSI disks have to be assembled from device mapper-created device nodes.

Data integrity

There are two ways to manage logical volumes:
  • On the host:
    This example shows multipathed DASDs. The logical volumes that are managed on the host are configured as virtual block devices.
    Logical volume management on the host
  • On the virtual server:

    When you configure physical volumes as virtual block devices, the logical volumes are managed on the virtual server. In this case you need to prohibit a logical volume management of the configured physical volumes on the host. Else, the host might detect the physical volumes and try to manage them on the host, too. Storing host metadata on the physical volumes might cause a loss of virtual server data.

    Logical volume management on the virtual server

    To prohibit a logical volume management for physical volumes that are managed on the virtual server, provide an explicit allowlist in /etc/lvm/lvm.conf which explicitly contains all disk block devices to be managed on the host, or a blocklist that contains all physical volumes that are to be managed on the virtual server.

    The filter section in the device settings allows to specify an allowlist using the prefix a, and to specify a blocklist using the prefix r.

Example

This allowlist in /etc/lvm/lvm.conf filters the physical volumes which are to be managed on the host. The last line (r|.*|) denotes that all other physical volumes that are not listed here are not to be managed on the host.
devices 
        {filter = [ "a|/dev/mapper/36005076305ffc1ae00000000000021d5p1|", 
                    "a|/dev/mapper/36005076305ffc1ae00000000000021d7p1|",
                    "a|/dev/disk/by-path/ccw-0.0.1607-part1|",
                    "r|.*|" ]
        }
The following physical volumes are to be managed on the host:
  • /dev/mapper/36005076305ffc1ae00000000000021d5p1
  • /dev/mapper/36005076305ffc1ae00000000000021d7p1
  • /dev/disk/by-path/ccw-0.0.1607-part1
You can verify that SCSI disks are referenced correctly by issuing the following pvscan command:
# pvscan -vvv 2>&1 | fgrep '/dev/sd'
 ...
    /dev/sda: Added to device cache 
    /dev/block/8:0: Aliased to /dev/sda in device cache 
    /dev/disk/by-path/ccw-0.0.50c0-zfcp-0x1234123412341234:\ 
      0x0001000000000000: Aliased to /dev/sda in device cache 
    ... 
    /dev/sda: Skipping (regex)
The output must contain the string Skipping (regex) for each SCSI disk standard device name which is configured for the virtual server.