public inbox for lvm2-cvs@sourceware.org help / color / mirror / Atom feed
From: mornfall@sourceware.org To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org Subject: LVM2 lib/metadata/mirror.c test/t-lvconvert-re ... Date: Thu, 17 Dec 2009 15:38:00 -0000 [thread overview] Message-ID: <20091217153831.25837.qmail@sourceware.org> (raw) CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: mornfall@sourceware.org 2009-12-17 15:38:30 Modified files: lib/metadata : mirror.c test : t-lvconvert-repair.sh Log message: Fix removal of multiple devices from a mirror (+ regression test). Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/mirror.c.diff?cvsroot=lvm2&r1=1.99&r2=1.100 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-lvconvert-repair.sh.diff?cvsroot=lvm2&r1=1.2&r2=1.3 --- LVM2/lib/metadata/mirror.c 2009/12/09 19:53:39 1.99 +++ LVM2/lib/metadata/mirror.c 2009/12/17 15:38:29 1.100 @@ -533,6 +533,7 @@ _is_mirror_image_removable(sub_lv, removable_pvs)) { if (!shift_mirror_images(mirrored_seg, s)) return_0; + s--; /* adjust counter after shifting */ new_area_count--; } } @@ -783,7 +784,7 @@ DEFAULT_MIRROR_LOG_FAULT_POLICY); else policy = find_config_str(NULL, "activation/mirror_device_fault_policy", - DEFAULT_MIRROR_DEV_FAULT_POLICY); + DEFAULT_MIRROR_IMAGE_FAULT_POLICY); if (!strcmp(policy, "remove")) return MIRROR_REMOVE; --- LVM2/test/t-lvconvert-repair.sh 2009/06/04 12:01:16 1.2 +++ LVM2/test/t-lvconvert-repair.sh 2009/12/17 15:38:29 1.3 @@ -11,9 +11,36 @@ . ./test-utils.sh -prepare_vg 4 +prepare_vg 5 + +# fail multiple devices + +lvcreate -m 3 -L 1 -n 3way $vg +disable_dev $dev2 $dev4 +echo n | lvconvert -i 1 --repair $vg/3way +lvs -a -o +devices > lvlist +not grep unknown lvlist +vgreduce --removemissing $vg +enable_dev $dev2 $dev4 +lvchange -a n $vg/3way + +vgremove -ff $vg +vgcreate $vg $dev1 $dev2 $dev3 $dev4 + +lvcreate -m 2 -L 1 -n 4way $vg +disable_dev $dev1 $dev2 +echo n | lvconvert -i 1 --repair $vg/4way +lvs -a -o +devices > lvlist +not grep unknown lvlist +vgreduce --removemissing $vg +enable_dev $dev1 $dev2 +lvchange -a n $vg/4way + +# fail single devices + +vgremove -ff $vg +vgcreate $vg $dev1 $dev2 $dev3 -vgreduce $vg $dev4 lvcreate -m 1 -L 1 -n mirror $vg lvchange -a n $vg/mirror
reply other threads:[~2009-12-17 15:38 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20091217153831.25837.qmail@sourceware.org \ --to=mornfall@sourceware.org \ --cc=lvm-devel@redhat.com \ --cc=lvm2-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).