Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
In a situation where there was a PV in a VG with zero PEs (physical extents) so the PV was used to store metadata only, the vgcfgrestore failed with a "Floating point exception" error that was caused by division by zero. A proper check for this condition has been added to prevent the error.
Description of problem:
If there is PV with zero PE count in the VG, vgcfgrestore on the VG fails saying "Floating point exception", which is caused by division by zero.
Background:
We are using LVM heavily for storage of block device backups. Because the PVs are usually very busy and metadata manipulation requires direct access to the metadata sector (may take considerable time to complete), we have created a metadata-only PV on a separate drive.
Version-Release number of selected component (if applicable):
LVM version: 2.02.87(2)-RHEL6 (2011-10-12)
Library version: 1.02.66-RHEL6 (2011-10-12)
Driver version: 4.22.6
How reproducible:
Always
Steps to Reproduce:
create /dev/<metadata_device> with size 200M
create /dev/<data_device> of any size
pvcreate --metadatasize 128m /dev/<metadata_device>
pvcreate --metadatasize 128m /dev/<data_device>
vgcreate -s 128m myVG /dev/<metadata_device> /dev/<data_device>
vgcfgbackup myVG
vgcfgrestore myVG
Actual results:
Last command fails with "Floating point exception" error.
Expected results:
vgcfgrestore should successfully write VG metadata
Additional info:
This issue may be worked around by omitting the zero-length PV from the backup file. See file contents below.
We have solved this for our case using the above workaround and making the metadata PV bigger and setting allocable to N afterwards.
Backup file contents:
# Generated by LVM2 version 2.02.87(2)-RHEL6 (2011-10-12): Wed May 9 10:13:28 2012
contents = "Text Format Volume Group"
version = 1
description = "vgcfgbackup -f myvg.vg myvg"
creation_host = "localhost.localdomain" # Linux localhost.localdomain 2.6.32-220.el6.x86_64 #1 SMP Tue Dec 6 19:48:22 GMT 2011 x86_64
creation_time = 1336551208 # Wed May 9 10:13:28 2012
myvg {
id = "ouGQeP-8bPl-udT8-lm8a-Nd3A-WprB-pOGXfj"
seqno = 1
status = ["RESIZEABLE", "READ", "WRITE"]
flags = []
extent_size = 262144 # 128 Megabytes
max_lv = 0
max_pv = 0
metadata_copies = 0
physical_volumes {
pv0 {
id = "hbMvQA-zTeD-CKPc-WE8o-umlm-Z6GJ-iyALRr"
device = "/dev/vg_test/pv1" # Hint only
status = ["ALLOCATABLE"]
flags = []
dev_size = 20971520 # 10 Gigabytes
pe_start = 264192
pe_count = 78 # 9.75 Gigabytes
}
pv1 {
id = "K1BwfU-2LuG-8aeW-IXHR-RLf7-d36V-DMERDr"
device = "/dev/vg_test/pv_metadata" # Hint only
status = ["ALLOCATABLE"]
flags = []
dev_size = 409600 # 200 Megabytes
pe_start = 264192
pe_count = 0 # 0 Kilobytes
}
}
}
Backup file for workaround:
# Generated by LVM2 version 2.02.87(2)-RHEL6 (2011-10-12): Wed May 9 10:13:28 2012
contents = "Text Format Volume Group"
version = 1
description = "vgcfgbackup -f myvg.vg myvg"
creation_host = "localhost.localdomain" # Linux localhost.localdomain 2.6.32-220.el6.x86_64 #1 SMP Tue Dec 6 19:48:22 GMT 2011 x86_64
creation_time = 1336551208 # Wed May 9 10:13:28 2012
myvg {
id = "ouGQeP-8bPl-udT8-lm8a-Nd3A-WprB-pOGXfj"
seqno = 1
status = ["RESIZEABLE", "READ", "WRITE"]
flags = []
extent_size = 262144 # 128 Megabytes
max_lv = 0
max_pv = 0
metadata_copies = 0
physical_volumes {
pv0 {
id = "hbMvQA-zTeD-CKPc-WE8o-umlm-Z6GJ-iyALRr"
device = "/dev/vg_test/pv1" # Hint only
status = ["ALLOCATABLE"]
flags = []
dev_size = 20971520 # 10 Gigabytes
pe_start = 264192
pe_count = 78 # 9.75 Gigabytes
}
}
}
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
http://rhn.redhat.com/errata/RHBA-2013-0501.html
Description of problem: If there is PV with zero PE count in the VG, vgcfgrestore on the VG fails saying "Floating point exception", which is caused by division by zero. Background: We are using LVM heavily for storage of block device backups. Because the PVs are usually very busy and metadata manipulation requires direct access to the metadata sector (may take considerable time to complete), we have created a metadata-only PV on a separate drive. Version-Release number of selected component (if applicable): LVM version: 2.02.87(2)-RHEL6 (2011-10-12) Library version: 1.02.66-RHEL6 (2011-10-12) Driver version: 4.22.6 How reproducible: Always Steps to Reproduce: create /dev/<metadata_device> with size 200M create /dev/<data_device> of any size pvcreate --metadatasize 128m /dev/<metadata_device> pvcreate --metadatasize 128m /dev/<data_device> vgcreate -s 128m myVG /dev/<metadata_device> /dev/<data_device> vgcfgbackup myVG vgcfgrestore myVG Actual results: Last command fails with "Floating point exception" error. Expected results: vgcfgrestore should successfully write VG metadata Additional info: This issue may be worked around by omitting the zero-length PV from the backup file. See file contents below. We have solved this for our case using the above workaround and making the metadata PV bigger and setting allocable to N afterwards. Backup file contents: # Generated by LVM2 version 2.02.87(2)-RHEL6 (2011-10-12): Wed May 9 10:13:28 2012 contents = "Text Format Volume Group" version = 1 description = "vgcfgbackup -f myvg.vg myvg" creation_host = "localhost.localdomain" # Linux localhost.localdomain 2.6.32-220.el6.x86_64 #1 SMP Tue Dec 6 19:48:22 GMT 2011 x86_64 creation_time = 1336551208 # Wed May 9 10:13:28 2012 myvg { id = "ouGQeP-8bPl-udT8-lm8a-Nd3A-WprB-pOGXfj" seqno = 1 status = ["RESIZEABLE", "READ", "WRITE"] flags = [] extent_size = 262144 # 128 Megabytes max_lv = 0 max_pv = 0 metadata_copies = 0 physical_volumes { pv0 { id = "hbMvQA-zTeD-CKPc-WE8o-umlm-Z6GJ-iyALRr" device = "/dev/vg_test/pv1" # Hint only status = ["ALLOCATABLE"] flags = [] dev_size = 20971520 # 10 Gigabytes pe_start = 264192 pe_count = 78 # 9.75 Gigabytes } pv1 { id = "K1BwfU-2LuG-8aeW-IXHR-RLf7-d36V-DMERDr" device = "/dev/vg_test/pv_metadata" # Hint only status = ["ALLOCATABLE"] flags = [] dev_size = 409600 # 200 Megabytes pe_start = 264192 pe_count = 0 # 0 Kilobytes } } } Backup file for workaround: # Generated by LVM2 version 2.02.87(2)-RHEL6 (2011-10-12): Wed May 9 10:13:28 2012 contents = "Text Format Volume Group" version = 1 description = "vgcfgbackup -f myvg.vg myvg" creation_host = "localhost.localdomain" # Linux localhost.localdomain 2.6.32-220.el6.x86_64 #1 SMP Tue Dec 6 19:48:22 GMT 2011 x86_64 creation_time = 1336551208 # Wed May 9 10:13:28 2012 myvg { id = "ouGQeP-8bPl-udT8-lm8a-Nd3A-WprB-pOGXfj" seqno = 1 status = ["RESIZEABLE", "READ", "WRITE"] flags = [] extent_size = 262144 # 128 Megabytes max_lv = 0 max_pv = 0 metadata_copies = 0 physical_volumes { pv0 { id = "hbMvQA-zTeD-CKPc-WE8o-umlm-Z6GJ-iyALRr" device = "/dev/vg_test/pv1" # Hint only status = ["ALLOCATABLE"] flags = [] dev_size = 20971520 # 10 Gigabytes pe_start = 264192 pe_count = 78 # 9.75 Gigabytes } } }