Red Hat Training

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

4.168. lvm2

Updated lvm2 packages that fix several bugs and add three enhancements are now available for Red Hat Enterprise Linux 6.
The lvm2 packages contain support for Logical Volume Management (LVM).

Bug Fixes

BZ#743112
Due to locking errors, multiple failed cmirror devices were unable to be replaced. With this update, the underlying source code has been modified to address this issue, and the aforementioned devices are correctly replaced should a failure occur.
BZ#696251
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#684083
While performing extensive I/O operations in the background, the pvmove command could become unresponsive. With this update, the underlying source code has been modified to address this issue, and the pvmove command no longer hangs.
BZ#733320
When a striped logical volume was resized with the lvresize command, the size was rounded down to the stripe boundary. This could pose a problem when shrinking the volume with a file system on it. Even if a user determined the new size so that the file system did fit entirely onto the volume, and resized the volume, the alignment done by the lvresize command might have cut off a part of the file system, causing it to become corrupted. This update fixes the rounding for striped volumes so that a volume is never reduced more than requested.
BZ#594525
Prior to this update, placing mirror legs 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 on a separate device first before placing it on a device that is already used.
BZ#737087
If the lvcreate command was used with large physical volumes while using %FREE, %VG, %PVS or %ORIGIN for size definition, the resulting LV size was incorrectly calculated. This was caused by an integer overflow while calculating the percentages. This update provides a better way of calculating the sizes, by using proper typecasting, so that the overflow no longer occurs.
BZ#715190
Several LVM locking error and warning messages were returned during the system start-up which were caused by cluster locking (configured globally in /etc/lvm/lvm.conf). At the early stage of the system start-up, when the early init script tries to activate any existing VGs, the cluster infrastructure is still not initialized (as well as the network interface) and therefore cluster locking cannot be used and the system falls back to file-based locking instead, causing several misleading error and warning messages to be returned. With this update, these error and warning messages are suppressed during the system start-up, and the system falls back to usable locking mechanism silently.
BZ#712147
The vgimportclone script triggered a code path in LVM that caused it to access already-released memory when a duplicated PV was found. Consequently, the VG that contained such PV was found to be inconsistent and the process ended up with a failure to read the VG. This update fixes this failure by saving such problematic strings to a temporary buffer, and thus avoiding improper memory access.
BZ#697945
The cluster LVM daemon (clvmd) was crashing when attempting to create a high number of volume groups at once. This was caused by the limit set by the number of available file descriptors per process. While clvmd was creating pipes and the limit was reached under the pressure of high number of requests, clvmd did not return an error but continued to use uninitialized pipes instead, eventually causing it to crash. With this update, clvmd now returns an error message immediately if the pipe creation fails.
BZ#734193
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 correct and possible. The condition that was checked counted in the mirror count and the stripe count, though, only the stripe count alone was satisfactory. This update fixes this, and creating a striped mirror no longer fails.
BZ#732142
Before, an improper activation sequence was used while performing an image split operation. That caused a device-mapper table to be loaded while some of processed devices were known to be suspended. This has been fixed and the activation sequence has been reordered so that the table is always loaded at proper time.
BZ#570359
Issuing an lvremove command could cause a failure to remove a logical volume. This failure was caused by processing an asynchronous udev event that kept the volume opened while the lvremove command tried to remove it. These asynchronous events are triggered when the watch udev rule is applied (it is set for device-mapper/LVM2 devices when using the udisks package that installs /lib/udev/rules.d/80-udisks.rules).
To fix this issue, the number of device open calls in read-write mode has been minimized and read-only mode is used internally if possible (the event is generated when closing a device that has the watch rule set and is closed after a read-write open).
Although this fixes a problem when opening a device internally within the command execution, the failure could still occur when using several commands quickly in a sequence where each one opens a device for read-write and then closes it immediately (for example in a script). In such a case, it is advisable to use the udevadm settle command in between.
BZ#695526
With this update, when using the lvconvert command, the Unable to create a snapshot of a locked|pvmove|mirrored LV error message has been changed to Unable to convert an LV into a snapshot of a locked|pvmove|mirrored LV. for clarity reasons.
BZ#711445
A hostname containing the slash character (/) caused LVM commands to fail while generating an archive of current metadata. Because a hostname is a part of the temporary archive file name, a file path that was ambiguous was created, which caused the whole archive operation to fail. This update fixes this by replacing any slash character (/) with a question mark character (?) in the hostname string and then is used to compose the temporary archive file name.
BZ#712829
An issue was discovered when running several commands in parallel that activated or deactivated an LV or a VG. The symbolic links for LVs in /dev were created and removed incorrectly, causing them to exist when the device had already been removed or vice versa.
This problem was caused by the fact that during the activation there was no write lock held that would protect individual activation commands as a whole (there was no metadata change). Together with non-atomicity of checking udev operations, an improper decision was made in the code based on the already stale information. This triggered a part of the code that attempted to repair the symbolic links as a fallback action.
To fix this, these checks are no longer run by default, thus fully relying on udev. However, the old functionality can still be used for diagnosing other udev related problems by setting a new verify_udev_operations option found in the activation section of the /etc/lvm/lvm.conf file.
BZ#728157
This update removes the unsupported --force option from the lvrename manpage.
BZ#743932
With this update, the vgsplit command is now able to split a volume group containing a mirror with mirrored logs.

Enhancements

BZ#623808
Prior to this update, it was not possible to create a PV object with all properties calculated (for example, the PE start value) without a need to write the PV label on the disk while using an LVM2 library (lvm2app). This has been changed so that the PV label is written out later in the process as a part of the lvm_vg_write call, making it possible to calculate all PV properties and query them without actually writing the PV label on the disk.
BZ#651493
This update adds support for issuing discards (TRIM) as part of lvm2 operations.
BZ#729712
In Red Hat Enterprise Linux 6.2, support for MD's RAID personalities has been added to LVM as a Technology Preview. For more information about this feature, refer to the Red Hat Enterprise Linux 6.2 Release Notes.
Users are advised to upgrade to these updated lvm2 packages, which resolve these issues and add these enhancements.