public inbox for lvm2-cvs@sourceware.org help / color / mirror / Atom feed
From: jbrassow@sourceware.org To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org Subject: LVM2 ./WHATS_NEW lib/activate/activate.c lib/a ... Date: Wed, 22 Jun 2011 21:31:00 -0000 [thread overview] Message-ID: <20110622213122.1831.qmail@sourceware.org> (raw) CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: jbrassow@sourceware.org 2011-06-22 21:31:21 Modified files: . : WHATS_NEW lib/activate : activate.c activate.h lib/metadata : mirror.c Log message: Fix issue preventing cluster mirror creation. Mirrors used to be created by first creating a linear device and then adding the other images plus the log. Now mirrors are created by creating all the images in one go and then adding the log separately. The new way ran into the condition that cluster mirrors cannot change the log type (in the case of creation, from core -> disk) while the mirror is not active. (It isn't active because it is in the process of being created.) The reason this condition is in place is because a remote node may have the mirror active, and we don't want to alter the log underneath it. What we really needed was a way of checking if the mirror was active remotely but not locally, and in that case do not allow a change of the log. I've added this check, and cluster mirrors can now be created again. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.2023&r2=1.2024 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/activate.c.diff?cvsroot=lvm2&r1=1.202&r2=1.203 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/activate.h.diff?cvsroot=lvm2&r1=1.77&r2=1.78 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/mirror.c.diff?cvsroot=lvm2&r1=1.154&r2=1.155 --- LVM2/WHATS_NEW 2011/06/17 14:50:53 1.2023 +++ LVM2/WHATS_NEW 2011/06/22 21:31:21 1.2024 @@ -1,5 +1,6 @@ Version 2.02.86 - ================================= + Fix issue preventing cluster mirror creation. Disable udev fallback by default and add activation/udev_fallback to lvm.conf. Call vg_mark_partial_lvs() before VG structure is returned from the cache. Remove unused internal flag ACTIVATE_EXCL from the code. --- LVM2/lib/activate/activate.c 2011/06/17 14:30:58 1.202 +++ LVM2/lib/activate/activate.c 2011/06/22 21:31:21 1.203 @@ -823,13 +823,11 @@ return _lv_is_active(lv, NULL, NULL); } -/* -int lv_is_active_locally(struct logical_volume *lv) +int lv_is_active_but_not_locally(struct logical_volume *lv) { int l; - return _lv_is_active(lv, &l, NULL) && l; + return _lv_is_active(lv, &l, NULL) && !l; } -*/ int lv_is_active_exclusive_locally(struct logical_volume *lv) { --- LVM2/lib/activate/activate.h 2011/06/17 14:14:19 1.77 +++ LVM2/lib/activate/activate.h 2011/06/22 21:31:21 1.78 @@ -101,6 +101,7 @@ int lvs_in_vg_opened(const struct volume_group *vg); int lv_is_active(struct logical_volume *lv); +int lv_is_active_but_not_locally(struct logical_volume *lv); int lv_is_active_exclusive_locally(struct logical_volume *lv); int lv_is_active_exclusive_remotely(struct logical_volume *lv); --- LVM2/lib/metadata/mirror.c 2011/06/17 14:27:35 1.154 +++ LVM2/lib/metadata/mirror.c 2011/06/22 21:31:21 1.155 @@ -1857,15 +1857,9 @@ return 0; } - /* - * We are unable to convert the log of inactive cluster mirrors - * due to the inability to detect whether the mirror is active - * on remote nodes (even though it is inactive on this node) - */ - if (vg_is_clustered(lv->vg) && - !(lv_info(cmd, lv, 0, &info, 0, 0) && info.exists)) { - log_error("Unable to convert the log of inactive " - "cluster mirror %s", lv->name); + if (lv_is_active_but_not_locally(lv)) { + log_error("Unable to convert the log of a mirror, %s, that is " + "active remotely but not locally", lv->name); return 0; }
next reply other threads:[~2011-06-22 21:31 UTC|newest] Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-06-22 21:31 jbrassow [this message] -- strict thread matches above, loose matches on Subject: below -- 2012-03-23 9:58 zkabelac 2012-02-23 22:42 zkabelac 2012-01-25 13:10 zkabelac 2012-01-25 8:48 zkabelac 2011-11-18 19:31 zkabelac 2011-10-06 14:55 jbrassow 2011-10-03 18:37 zkabelac 2011-09-22 17:33 prajnoha 2011-06-30 18:25 agk 2011-06-17 14:22 zkabelac 2011-06-17 14:14 zkabelac 2011-02-04 19:14 zkabelac 2011-02-03 1:24 zkabelac 2010-08-17 1:16 agk 2010-02-24 20:01 mbroz 2010-02-24 20:00 mbroz 2009-10-01 0:35 agk 2009-06-01 12:43 mbroz 2009-05-20 11:09 mbroz 2009-05-20 9:52 mbroz 2009-02-28 0:54 agk 2008-12-19 14:22 prajnoha 2008-04-07 10:23 mbroz 2008-01-30 14:00 agk 2007-11-12 20:51 agk 2007-07-02 11:17 wysochanski 2007-03-08 21:08 agk 2006-10-03 17:55 agk 2006-08-21 12:55 agk 2006-08-08 21:20 agk 2005-12-19 21:01 agk 2005-10-25 19:08 agk 2005-10-19 13:59 agk 2005-06-01 16:51 agk 2005-01-12 22:58 agk
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=20110622213122.1831.qmail@sourceware.org \ --to=jbrassow@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).