add lvconvert --repair --auto that honours lvm.conf mirror policy
PATCH 1/1 add lvconvert --repair --auto that honours lvm.conf mirror policy
Hi,
I'm attaching a draft version of basic configuration capability for automatic mirror repairs. This will make dmeventd respect the two lvm.conf options setting failed mirror replacement policies. It doesn't affect the basic (manual) lvconvert --repair mode (I have added --auto for that purpose; it might need a better name though).
Please note that the patch is untested yet, but I'd like to get feedback anyway. Thanks!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lvconvert-repair-auto.diff
Type: text/x-diff
Size: 4768 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20090521/8df90306/attachment.bin>
-------------- next part --------------
Yours,
Petr.
Signature · 6 lines
Peter Rockai | me()mornfall!net | prockai()redhat!com
http://blog.mornfall.net | http://web.mornfall.net
"In My Egotistical Opinion, most people's C programs should be
indented six feet downward and covered with dirt."
-- Blair P. Houghton on the subject of C program indentationPATCH 1/1 add lvconvert --repair --auto that honours lvm.conf mirror policy
Quoted 9 lines · Petr Rockai
I'm attaching a draft version of basic configuration capability for automatic
mirror repairs. This will make dmeventd respect the two lvm.conf options
setting failed mirror replacement policies. It doesn't affect the basic
(manual) lvconvert --repair mode (I have added --auto for that purpose; it
might need a better name though).
I like this better. (Agree that we need different name than '--auto'.)
thanks,
brassow
PATCH 1/1 add lvconvert --repair --auto that honours lvm.conf mirror policy
In reply to Petr RockaiHi again,
I have now tested the patch, and following is (obviously) also needed to make it work. Other than that, everything seems to work as expected (most importantly, the mirror_device_fault_policy is obeyed by dmeventd).
The missing patch bit:
===================================================================
RCS file: /cvs/lvm2/LVM2/tools/commands.h,v
retrieving revision 1.125
commands.h +3 -3
@@ -94,7 +94,7 @@ xx(lvconvert,0 ,"lvconvert " "[-m|--mirrors Mirrors [{--mirrorlog {disk|core}|--corelog}]]\n" -"\t[--repair]\n" +"\t[--repair [--auto]]\n" "\t[-R|--regionsize MirrorLogRegionSize]\n" "\t[--alloc AllocationPolicy]\n" "\t[-b|--background]\n"
@@ -116,8 +116,8 @@ xx(lvconvert, "\tOriginalLogicalVolume[Path] SnapshotLogicalVolume[Path]\n", alloc_ARG, background_ARG, chunksize_ARG, corelog_ARG, interval_ARG, - mirrorlog_ARG, mirrors_ARG, regionsize_ARG, repair_ARG, snapshot_ARG, - test_ARG, zero_ARG) + mirrorlog_ARG, mirrors_ARG, regionsize_ARG, repair_ARG, auto_ARG, + snapshot_ARG, test_ARG, zero_ARG) xx(lvcreate, "Create a logical volume",
Is this version OK to commit, then? (Better option names than --repair --auto are still solicited, but probably not such a high priority anyway...)
Yours,
Petr.
Signature · 6 lines
Peter Rockai | me()mornfall!net | prockai()redhat!com
http://blog.mornfall.net | http://web.mornfall.net
"In My Egotistical Opinion, most people's C programs should be
indented six feet downward and covered with dirt."
-- Blair P. Houghton on the subject of C program indentationPATCH 1/1 lvconvert --repair prompts and policies
In reply to Petr RockaiHi,
this is a new iteration of the patch, that hopefully addresses everyone's concerns. For "normal" use (manual), it will prompt whether replacement of devices is desired, with -y and -f to select yes and no respectively. Moreover, --use-policies is provided that will read and use the lvm.conf mirror policy settings.
We use --use-policies for dmeventd.
Yours,
Petr.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lvconvert-repair-policies.diff
Type: text/x-diff
Size: 8138 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20090602/d6471f13/attachment.bin>
-------------- next part --------------
Signature · 6 lines
Peter Rockai | me()mornfall!net | prockai()redhat!com
http://blog.mornfall.net | http://web.mornfall.net
"In My Egotistical Opinion, most people's C programs should be
indented six feet downward and covered with dirt."
-- Blair P. Houghton on the subject of C program indentation