Bug 214885

Summary: LVM size computations go crazy at the high end.
Product: Red Hat Enterprise Linux 4 Reporter: Jonathan Earl Brassow <jbrassow>
Component: lvm2Assignee: Alasdair Kergon <agk>
Status: CLOSED CURRENTRELEASE QA Contact: Corey Marthaler <cmarthal>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: agk, dwysocha, mbroz, prockai
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-05-04 16:29:48 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jonathan Earl Brassow 2006-11-09 21:09:57 UTC
Using 4MB extent sizes and a VG that contains 3 x ~2PB PV's:

Creating 1PB mirrored LV:
  Using minimum mirror region size of 524288 sectors
  Logical volume "lv" created
  LV   VG   Attr   LSize Origin Snap%  Move Log     Copy%
  lv   vg   mwi-a- 1.00P                    lv_mlog   0.48
Creating 2PB mirrored LV:
  Insufficient free space: 536870912 extents needed, but only 536870910 available
Creating 3PB mirrored LV:
  Insufficient free space: 805306368 extents needed, but only 536870910 available
Creating 4PB mirrored LV:
  Insufficient free space: 1073741824 extents needed, but only 536870910 available
Creating 5PB mirrored LV:
  Insufficient free space: 1342177280 extents needed, but only 536870910 available
Creating 8PB mirrored LV:
  Insufficient free extents (1610612733) in volume group vg: 2147483648 required
Creating 9PB mirrored LV:
  Insufficient free extents (1610612733) in volume group vg: 2415919104 required
Creating 16PB mirrored LV:
  Unable to create logical volume lv with no extents
Creating 17PB mirrored LV:
  Using minimum mirror region size of 524288 sectors
  Logical volume "lv" created
  LV   VG   Attr   LSize Origin Snap%  Move Log     Copy%
  lv   vg   mwi-a- 1.00P                    lv_mlog   0.48

Failing to create the 2PB mirror is fine... (The 3 devices are 2 PB a piece - so
once a space for the metadata is carved out, we can't find devices large enough
for mirrors >= 2PB.)  However, once we try to do an 'lvcreate -m1 -n lv vg -L
17P', things break down and we get LVs that are 1PB.

Also, I'm wondering why there are different error messages when creating 5PB
mirrors vs 8PB mirrors - both have insufficient space...

Comment 1 Alasdair Kergon 2006-11-10 22:28:48 UTC
patch included in lvm2-2.02.14-1; please retest

Comment 2 RHEL Program Management 2006-11-10 22:44:43 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 3 Jonathan Earl Brassow 2006-11-13 16:49:52 UTC
Creating 1 PB mirrors now fails.

# from /var/log/messages
allocation failed: out of vmalloc space - use vmalloc=<size> to increase size.
device-mapper: couldn't allocate clean bitset
device-mapper: dm-mirror: Error creating mirror dirty log
device-mapper: error adding target to table

I should have enough memory (w/ 2GB of RAM).

I'm wondering why I could create 1 PB mirrors before, but I can't now.  The
kernel didn't complain before...  Must be the region_size we are using.  I don't
see any messages that the region size is being increased - which means that the
bitset shouldn't fix in a single extent.  Have we added the ability to have
multiple extent logs?  (lvdisplay reveals that the log was created with only one
extent.)


Comment 4 Corey Marthaler 2007-01-24 23:26:45 UTC
Jon, are you still seeing this issue? Your last comment seems to implay that
this bug is not yet fixed.

Comment 5 Jonathan Earl Brassow 2007-01-25 15:16:39 UTC
Haven't tried lately... I'll try to get to in soon.

If you'd like to try, you can simply make a device mapper device that has a real
disk on the front and an arbitrary error target on the back.  That way, you can
make disks of any size and test LVM meta-data operations.


Comment 7 Alasdair Kergon 2007-02-27 20:13:27 UTC
Is there still a problem here or can we close this?