Bug 820116
Summary: | vgcfgrestore fails with division by zero if PV with zero length present in VG | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Jiri Lunacek <jiri.lunacek> | |
Component: | lvm2 | Assignee: | Peter Rajnoha <prajnoha> | |
Status: | CLOSED ERRATA | QA Contact: | Cluster QE <mspqa-list> | |
Severity: | high | Docs Contact: | ||
Priority: | high | |||
Version: | 6.2 | CC: | agk, coughlan, dwysocha, glux, heinzm, jbrassow, mbroz, msnitzer, nperic, prajnoha, prockai, thornber, zkabelac | |
Target Milestone: | rc | |||
Target Release: | --- | |||
Hardware: | All | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | lvm2-2.02.97-2.el6 | Doc Type: | Bug Fix | |
Doc Text: |
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.
|
Story Points: | --- | |
Clone Of: | ||||
: | 820237 (view as bug list) | Environment: | ||
Last Closed: | 2013-02-21 08:09:46 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 820237 |
Description
Jiri Lunacek
2012-05-09 08:24:57 UTC
Thanks for reporting this! Peter has committed a fix for the next upstream release (2.02.96) and this will be picked up by RHEL6.4: http://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=501a2c04a4cb009a4c6497cd601801b2fe32fb4e Tested with old and new versioni of lvm2. With older version the core dumps as expected (reported by BZ): Syncing disks. (09:15:44) [root@r6-node02:~]$ pvcreate --metadatasize 128m /dev/sde1 Writing physical volume data to disk "/dev/sde1" Physical volume "/dev/sde1" successfully created (09:15:55) [root@r6-node02:~]$ pvcreate --metadatasize 128m /dev/sdf1 Writing physical volume data to disk "/dev/sdf1" Physical volume "/dev/sdf1" successfully created (09:15:58) [root@r6-node02:~]$ vgcreate -s 128m myvg2 /dev/sde1 /dev/sdf1 Volume group "myvg2" successfully created (09:16:12) [root@r6-node02:~]$ pvs PV VG Fmt Attr PSize PFree /dev/sdb1 myvg lvm2 a-- 9.75g 9.75g /dev/sdc1 myvg lvm2 a-- 200.98m 200.98m /dev/sde1 myvg2 lvm2 a-- 199.98m 199.98m /dev/sdf1 myvg2 lvm2 a-- 9.75g 9.75g /dev/vda2 VolGroup lvm2 a-- 8.51g 0 (09:16:14) [root@r6-node02:~]$ vgcfgbackup myvg2 Volume group "myvg2" successfully backed up. (09:16:48) [root@r6-node02:~]$ vgcfgrestore myvg2 Floating point exception (core dumped) ---------------------------------------------------------------------------- With the new version of lvm it works normally: (09:12:13) [root@r6-node01:/etc/yum.repos.d]$ pvcreate --metadatasize 128m /dev/sdb sdb sdb1 (09:12:13) [root@r6-node01:/etc/yum.repos.d]$ pvcreate --metadatasize 128m /dev/sdb sdb sdb1 (09:12:13) [root@r6-node01:/etc/yum.repos.d]$ pvcreate --metadatasize 128m /dev/sdb1 Physical volume "/dev/sdb1" successfully created (09:12:48) [root@r6-node01:/etc/yum.repos.d]$ vgcreate -s 128m myvg /dev/sda1 /dev/sdb1 Volume group "myvg" (09:13:17) [root@r6-node01:/etc/yum.repos.d]$ vgcfgbackup myvg Volume group "myvg" successfully backed up. successfully created (09:13:59) [root@r6-node01:/etc/lvm/backup]$ vgcfgrestore myvg Restored volume group myvg (09:14:09) [root@r6-node01:/etc/lvm/backup]$ Packages installed: lvm2-2.02.95-10.el6.x86_64 device-mapper-1.02.74-10.el6.x86_64 kernel-2.6.32-279.el6.x86_64 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 |