Linux Logical Volume Manager (LVM) is a common general-purpose storage manager included in all popular Linux distributions. When working with LVM and ME4 Series storage, LVM mirroring is not necessary because storage protection is already provided by the different RAID levels within the ME4 Series system. A LVM volume group is a collection of one or more LUNs created on the ME4 volumes. Logical volumes are created that span across the LUNs within the volume group.
LVM guidelines
Dell Technologies recommends the following LVM guidelines:
- Use whole LUNs for logical volume groups.
- Create separate volume groups for different applications data. For example, if there are two databases, separate the databases into logical volume groups. This simplifies management and allows greater flexibility on array-based snapshots on individual applications.
- It is common to use two or more LUNs in a volume group to increase capacity and improve performance. All LUNs in a logical volume group should be of the same size. To realize the full performance benefit, evenly distribute the LUNs in different ME4 Series disk groups across the two controllers.
- When using ME4 Series volume snapshots to protect the data in a logical volume group, the snapshots must be taken on all LUNs in the same volume group at the same time to guarantee the consistency of the data. It is a best practice to pause or stop the applications that are accessing the LUNs before taking any snapshots.
- Snapshot schedules can be created on individual volumes in ME Storage Manager. Currently, it is not possible to create a schedule against a group of volumes. Therefore, it becomes a challenge to coordinate taking consistent snapshots for multiple volumes. One option is to write a script that incorporates the necessary steps to take a consistent snapshot. The following shows an example of the high-level tasks to be included in the script.
- Connect to the host.
- Pause/stop the applications.
- Connect to the ME4 Series system.
- Identify the volumes to create snapshots.
- Create snapshots on the volumes.
- Connect to the host.
- Resume/start the applications.
- Schedule the script to run periodically using an external scheduler such as Linux cron or other third-party commercial schedulers.
Physical volume data alignment
It might be necessary to specify data alignment on LVM physical volumes (PV) to avoid data misalignment. Because ME4 Series storage uses an internal chunk size ranging from 64k to 512k, it is recommended to initialize LVM PV with a 1 MB alignment. Use pvcreate --dataalignment 1m to indicate that the alignment starts at 1 MB.
# pvcreate –-dataalignment 1m /dev/mapper/mpathb
Expand storage for LVM
Adding capacity to an existing LVM volume group can be performed in one of the two ways:
- Create new ME4 Series volumes and initialize them into the LVM volume group. It is recommended that the new volumes are of equal capacity and have the same back-end storage type as the existing volumes in the volume group. After the volume group is expanded, the logical volume can be resized to take up the new capacity. The advantage of this method is that existing volumes are not changed. Only new volumes are introduced in the environment and can be backed out easily.
- Dynamically increase the size of existing ME4 Series volumes in ME Storage Manager. ME4 Series storage can resize the virtual volumes without causing any application interruptions. On the Linux host, resize the physical and multipath devices on the OS, then resize the logical volume and file system. Depending on the file system type, the resize tasks can be done online without disrupting the applications. The section Expand storage for the file system provides an example of this procedure. This method involves fewer administrative tasks because there are no new volumes, new mappings, new snapshot schedules, or new LVM physical devices to manage and set up.