[Bug 726375] New: lvm lvconvert cannot handle mirror logs (on disk) larger than 4KiB
https://bugzilla.novell.com/show_bug.cgi?id=726375 https://bugzilla.novell.com/show_bug.cgi?id=726375#c0 Summary: lvm lvconvert cannot handle mirror logs (on disk) larger than 4KiB Classification: openSUSE Product: openSUSE 12.1 Version: RC 1 Platform: x86-64 OS/Version: SuSE Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: Yarny@public-files.de QAContact: qa@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1 When I create a mirrored logical volume with lvcreate, which is large enough such that the mirror log is larger than 4KiB, it cannot be stored on disk. Using lvconvert to move it to disk results in "device-mapper: reload ioctl failed: Invalid argument Failed to lock ${NAME_OF_LV}" Reproducible: Always Steps to Reproduce: I tried it with the current KDE Live CD (12.1 Build0379 x86_64) inside a VirtualBox, which runs on openSUSE 11.4. * Boot said Live CD (e.g. in VBox) with a hard disk with 200 MiB free space (or more). This disk will store some loop-devices which will hold LVM physical volumes. * Login as root. * Mount your temporary disk space to /mnt. * Execute the following commands in a shell: ################################################################ # Set some dir where you have 100MiB free TMPDIR=/mnt ## Prepare 3 disks (loop devices) with 48GiB each for k in a b c do dd if=/dev/null of=$TMPDIR/$k.loop bs=1G seek=48 count=0 done a=$(losetup -f --show $TMPDIR/a.loop) b=$(losetup -f --show $TMPDIR/b.loop) c=$(losetup -f --show $TMPDIR/c.loop) ## Create LVM volume group pvcreate \ --metadatasize 1M \ $a $b $c vgcreate \ --metadatatype 2 \ --physicalextentsize 4k \ --clustered n \ testvg \ $a $b $c ## Create a mirrored 40GiB logical volume with 2 mirror legs # The "mirror log" is kept in RAM for now. lvcreate \ --extents 10485760 \ --name testlv \ --mirrors 1 \ --nosync \ --regionsize 1M \ --mirrorlog core \ testvg \ $a $b # Move the "mirror log" to disk, into the third loop device lvconvert \ --mirrorlog disk \ testvg/testlv \ $c ################################################################ Variations that do /not/ fail: * Change region size to 2M or * Change number of extents to 524288 (e.g. LV size to 20GiB) Actual Results: device-mapper: reload ioctl failed: Invalid argument Failed to lock testlv Expected Results: Logical volumen testlv converted. I remember that this problem existed in earlier version of openSUSE. When testing this, I'm booting the LiveCD with "splash=verbose 3" to prevent KDE from starting up (I guess that's not really relevant). -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=726375 https://bugzilla.novell.com/show_bug.cgi?id=726375#c Andreas Jaeger <aj@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team-screening@forge.pr |xwhu@suse.com |ovo.novell.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=726375 https://bugzilla.novell.com/show_bug.cgi?id=726375#c Xinwei Hu <xwhu@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=726375 https://bugzilla.novell.com/show_bug.cgi?id=726375#c1 Xinwei Hu <xwhu@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEEDINFO InfoProvider| |Yarny@public-files.de --- Comment #1 from Xinwei Hu <xwhu@suse.com> 2011-10-28 05:03:18 UTC --- Hi, I tried to reproduce this issue. By doing exactly you described, I don't find any failure. Would you run the last 'lvconvert -vvvvvvvvvv --mirrorlog disk testvg/testlv $c' for me, and attach the whole output here ? Thanks. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=726375 https://bugzilla.novell.com/show_bug.cgi?id=726375#c2 Yarny Yarny <Yarny@public-files.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |ASSIGNED InfoProvider|Yarny@public-files.de | --- Comment #2 from Yarny Yarny <Yarny@public-files.de> 2011-10-28 09:35:53 UTC --- Created an attachment (id=459310) --> (http://bugzilla.novell.com/attachment.cgi?id=459310) Output of "lvconvert -vvvvvvvvvv --mirrorlog disk testvg/testlv $c" -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=726375 https://bugzilla.novell.com/show_bug.cgi?id=726375#c3 Xinwei Hu <xwhu@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEEDINFO InfoProvider| |Yarny@public-files.de --- Comment #3 from Xinwei Hu <xwhu@suse.com> 2011-10-31 03:54:01 UTC --- Hi Yarny, Index: LVM2.2.02.84/lib/metadata/mirror.c =================================================================== --- LVM2.2.02.84.orig/lib/metadata/mirror.c 2011-01-24 22:19:05.000000000 +0800 +++ LVM2.2.02.84/lib/metadata/mirror.c 2011-10-28 18:08:40.000000000 +0800 @@ -1843,8 +1843,9 @@ /* allocate destination extents */ ah = allocate_extents(lv->vg, NULL, segtype, - 0, 0, log_count - old_log_count, region_size, 0, - allocatable_pvs, alloc, parallel_areas); + 0, 0, log_count - old_log_count, region_size, + lv->le_count, allocatable_pvs, + alloc, parallel_areas); if (!ah) { log_error("Unable to allocate extents for mirror log."); return 0; Would you try this patch ? Or, if you prefer rpm, I can provide you a pre-build one. Thanks. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=726375 https://bugzilla.novell.com/show_bug.cgi?id=726375#c4 Yarny Yarny <Yarny@public-files.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |ASSIGNED InfoProvider|Yarny@public-files.de | --- Comment #4 from Yarny Yarny <Yarny@public-files.de> 2011-10-31 09:51:57 UTC --- Hi Xin Wei Hu,
Or, if you prefer rpm, I can provide you a pre-build one. Yes please, if it's not too big effort for you. I would need to learn how to built lvm tools first.
Thanks. Yarny -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=726375 https://bugzilla.novell.com/show_bug.cgi?id=726375#c5 --- Comment #5 from Xinwei Hu <xwhu@suse.com> 2011-10-31 10:39:55 UTC --- Created an attachment (id=459554) --> (http://bugzilla.novell.com/attachment.cgi?id=459554) test package Hi, This is the test package for your testing. Please let me know if it works on your side. Thanks. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=726375 https://bugzilla.novell.com/show_bug.cgi?id=726375#c Xinwei Hu <xwhu@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEEDINFO InfoProvider| |Yarny@public-files.de -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=726375 https://bugzilla.novell.com/show_bug.cgi?id=726375#c6 Yarny Yarny <Yarny@public-files.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |ASSIGNED InfoProvider|Yarny@public-files.de | --- Comment #6 from Yarny Yarny <Yarny@public-files.de> 2011-10-31 13:16:53 UTC --- Thanks, Xin Wei Hu, It seems to work well! I booted said Live CD and installed your rpm with 'zypper in $RPM_FILE'. Then I followed my script from the original bug report. It yielded:
Logical volume testlv converted. I also tested with 480GiB physical volumes and 400GiB logical volume size, which also worked.
I want to add that 'zypper ps' reports that clicfs is using some of files replaced by your rpm, but I guess that's not significant for the test run. Thanks for your help! Yarny -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=726375 https://bugzilla.novell.com/show_bug.cgi?id=726375#c7 Xinwei Hu <xwhu@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED --- Comment #7 from Xinwei Hu <xwhu@suse.com> 2011-11-01 03:22:06 UTC --- I've submitted the update to 12.1:Update. Close as FIXED ;) Thanks for reporting. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=726375 https://bugzilla.novell.com/show_bug.cgi?id=726375#c8 --- Comment #8 from Bernhard Wiedemann <bwiedemann@suse.com> 2011-11-01 05:00:19 CET --- This is an autogenerated message for OBS integration: This bug (726375) was mentioned in https://build.opensuse.org/request/show/89850 12.1 / lvm2 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=726375 https://bugzilla.novell.com/show_bug.cgi?id=726375#c9 --- Comment #9 from Bernhard Wiedemann <bwiedemann@suse.com> 2011-11-01 11:00:33 CET --- This is an autogenerated message for OBS integration: This bug (726375) was mentioned in https://build.opensuse.org/request/show/89859 12.1 / lvm2 https://build.opensuse.org/request/show/89860 12.1 / lvm2 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com