Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

4.101. lvm2

An updated lvm2 package that fixes one bug is now available for Red Hat Enterprise Linux 5.
The lvm2 package provides support for Logical Volume Management (LVM).

Bug Fix

BZ#773587
Due to an incorrect test condition in the underlying code, lvm operations could enter an infinite loop if the system contained 4 or more volume groups with duplicate names. With this update, the erroneous test condition has been corrected and lvm commands now complete as expected in this scenario.
All users of lvm2 are advised to upgrade to this updated package, which fixes this bug.
An updated lvm2 package that fixes a bug is now available for Red Hat Enterprise Linux 5.
The lvm2 package provides support for Logical Volume Management (LVM).

Bug Fix

BZ#732006
When running the "lvconvert" command to convert a linear device to a mirror with stripes, the "lvconvert" command entered an infinite loop.The problem occurred if the number of needed extents was not divisible by the number of areas. This has been fixed: the allocation is now properly rejected if the number of extents is not divisible by the number of areas.
All users of lvm2 are advised to upgrade to this updated package, which fixes this bug.
An updated lvm2 package that fixes several bugs and adds various enhancements is now available for Red Hat Enterprise Linux 5.
The lvm2 package contains support for Logical Volume Management (LVM).

Note

The lvm2 package has been upgraded to upstream version 2.02.88, which provides a number of bug fixes and enhancements over the previous version. (BZ#746302)

Bug Fixes

BZ#597010
LVM no longer scans multipath member devices (underlying paths for active multipath devices) and prefers top-level devices. This new default behavior can be switched off using the multipath_component_detection option in the /etc/lvm/lvm.conf file.
BZ#636991
Prior to this update, placing mirror images on different physical devices with the lvcreate --alloc anywhere command did not guarantee placement of data on different physical devices. With this update, the above command tries to allocate each mirror image to a separate device first before placing it on a device that is already used.
BZ#702065
LVM mirrors can be operated in single-machine or cluster-aware mode. The cluster-aware mode requires a service daemon and an additional kernel module. HA-LVM makes use of the single-machine mode and should not require the extra daemon or module as long as the LVM mirrors are active exclusively. When a volume was being repaired or converted using the lvconvert command, the exclusive nature of the activation was lost and the cluster-aware mode was attempted. This failed due to the lack of the necessary daemon or kernel module. The following error message was logged:
Unable to send cluster log request [DM_CLOG_CTR] to server: -3
Consequently, mirrors managed by HA-LVM were unable to handle device failures. The commands that are used to repair or convert LVM mirrors have been fixed in order to preserve exclusive activation. This ensures that only the single-machine kernel representation is used and the extra daemon and kernel module necessary for cluster-aware operation, which may not be present, are not invoked. As a result the lvconvert command now works correctly in the scenario described.
BZ#706036
Any I/O operations sent to an underlying device while it is suspended are queued and will not complete until the device is resumed. When running the pvmove utility on a Logical Volume (LV), pvmove sometimes became unresponsive trying to suspend a device when the underlying device was already suspended and had I/O operations pending. The code for pvmove has been improved and pvmove now temporally resumes all the underlying LVs before trying to suspend an LV in order to allow any I/O operations to complete.
BZ#707056
The automatic snapshot resize process was reported to have finished twice by dmeventd, the event monitoring daemon for device-mapper devices. The code has been improved and the redundant information after a resize operation is no longer logged to system log.
BZ#707779
When running the lvconvert command to convert a linear device to a mirror with stripes, the lvconvert command entered an infinite loop. The problem occurred if the number of needed extents was not divisible by the number of areas. This has been fixed: the allocation is now properly rejected if the number of extents is not divisible by the number of areas.
BZ#708444
The automatic extension of volumes was reported by dmeventd when they were being written to and filling up even when the threshold was turned off by setting snapshot_autoextend_threshold = 100. This update removes this message as it is now considered redundant because the LVM command lvextend reports all relevant information.
BZ#711185
Prior to this update, extending a mirror volume beyond available extents while using the cling-by-tags allocation policy did not work properly. Normally, such an action returns an error message informing the user that there are insufficient allocatable extents for use. However, this check failed and caused a volume to be corrupted. Because the allocation code has been revised, restructured, and made more robust, the problematic scenario with extending mirror volumes while using the cling-by-tags policy no longer occurs.
BZ#719760
If an MD linear device had set rounding using the overloaded chunk size attribute, the pvcreate command logged the following erroneous error:
/dev/md0 sysfs attr level not in expected format: linear
This update removes the unnecessary warning in pvcreate for MD linear devices.
BZ#745522
In some circumstances, when running lvm reporting commands and a physical volume was not specified, the following error message appeared:
dm_report: left-aligned snprintf() failed
The memory allocation code has been improved and this error no longer appears.
BZ#749650
When using striped mirrors, improper and overly-restrictive divisibility requirements for the extent count could cause a failure to create a striped mirror, even though it was possible. The condition that was checked took account of the mirror count and the stripe count, when the stripe count alone was satisfactory. This update corrects the code, and creating a striped mirror no longer fails in the scenario described.
BZ#755762
Splitting an LV between two volume groups failed when the mirrored volumes had logs which were also mirrored. With this update, the vgsplit command is now able to split a volume group containing a mirror with mirrored logs.
BZ#769053
If preallocated memory was too low, lvm2 issued the following error message:
Internal error: Maps lock < unlock
The message has been changed to a message in the following format:
Reserved memory (%ld) not enough: used %ld. Increase activation/reserved_memory?
where %ld is replaced with the value of memory used. This provides better information about the source of the problem to the administrator. Preallocated memory can be changed in the lvm.conf file using the reserved_memory option.
BZ#773432
Due to an incorrect test condition in the underlying code, lvm operations could enter an infinite loop if the system contained 4 or more volume groups with duplicate names. With this update, the erroneous test condition has been corrected and lvm commands now complete as expected in this scenario.

Enhancements

BZ#575967
Some of the lvm2 operations were optimized to speed up activation and deactivation time if running over a large group of logical volumes.
BZ#523324
The updated allocation policy now better handles allocation of new segments for mirrors with multiple segments (for example, mirrors which were repeatedly extended).
BZ#720971
The ext4 file system will now be automatically resized after executing the lvextend command with the -r option.
Users of lvm2 should upgrade to this updated package, which fixes these bugs and adds these enhancements.