Description of problem:
A volume group which I have converted from lvm1 to lvm2 causes
problems when attempting to snapshot any logical volume for the 9th
time. Note that I can take many snapshots, but it appears shapshot
number 9 of any LV causes the problem.
Either there is a coded limit of 8 snapshots, and the commands need
to prevent attempt number 9, or there is a bug trying to take it.
The problem does not appear to be in any way hardware related.
Snapshot # 9 (/dev/rootvg/test9) does not appear. I can still
perform vg/lv operations, and can even perform an lvremove of the
attempted snapshot # 9, but need to reboot to be able to
access /dev/rootvg/tmp again.
Version-Release number of selected component (if applicable):
How reproducible:
Every time
Steps to Reproduce:
1. Installed basic RH EL3 and upgraded to EL4 beta 2. All lvm
filesystems except /boot. (I believe it will happen from a fresh EL4
install but we had issues with our install disk on the EM64T, so we
installed EL3 and upgraded).
2. vgconvert -M 2 rootvg (I believe an install straight onto LVM2
filesystems will also perform the same).
3. Snapshot one of the LVs 8 times...
4. Try to take snapshot # 9 of the same LV:
[root@el4beta test2]# lvcreate -s -L 1M -n test7 /dev/rootvg/tmp
Actual results:
Error trying to create snapshot 9:
Rounding up size to full physical extent 16.00 MB
device-mapper ioctl cmd 9 failed: Cannot allocate memory
Couldn't load device 'rootvg-test4'.
Problem reactivating origin tmp
Note that I was trying to create /dev/rootvg/test7
(aka /dev/mapper/rootvg-test7) and it says it couldn't load device
rootvg-test4 - that's not what I asked for!
At this point /tmp is locked and any attempts to access it or a
mounted snapshot(ls, app uses a temp file, or whatever) are met by a
system wait. Other commands/functions as they should.
Expected results:
If this is a limitation (max 8 snapshots of any particular LV), the
command should have refused politely. Otherwise the device mapper
should have created the rootvg-test7 snapshot.
Additional info:
here is the order they were created in:
[root@el4beta ~]# lvcreate -s -L 1M -n test /dev/rootvg/tmp
Rounding up size to full physical extent 16.00 MB
Logical volume "test" created (# 1)
[root@el4beta ~]# lvcreate -s -L 1M -n test9 /dev/rootvg/tmp
Rounding up size to full physical extent 16.00 MB
Logical volume "test9" created (# 2)
[root@el4beta ~]# lvcreate -s -L 1M -n test1 /dev/rootvg/tmp
Rounding up size to full physical extent 16.00 MB
Logical volume "test1" created (# 3)
... snapshots 4-7 (test2-5) follow along the same lines, finally...
[root@el4beta test2]# lvcreate -s -L 1M -n test6 /dev/rootvg/tmp
Rounding up size to full physical extent 16.00 MB
Logical volume "test6" created **(# 8)

Each snapshot requires a certain amount of (not-swappable) kernel
memory, and you've run out:-(
Work is underway to improve the way this situation is handled and to
increase the amount of memory available.

Hmmm, it must scale non-linearly. I can happily take those first 8
snapshots, then:
* Try to take one more snapshot, at which point it falls over, or
* Take another 4 snapshots of a different filesystem without any
problems (number 5 of the second set fell over on the test I just did
though).
I'll leave you all to it.