From: David Teigland <teigland@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH] vgchange: disallow clustered vg with thin or cache type
Date: Wed, 3 Sep 2014 11:49:04 -0500 [thread overview]
Message-ID: <20140903164904.GC20852@redhat.com> (raw)
---
tools/vgchange.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/tools/vgchange.c b/tools/vgchange.c
index 88dc180798d2..770fac35ca55 100644
--- a/tools/vgchange.c
+++ b/tools/vgchange.c
@@ -304,6 +304,26 @@ static int _vgchange_clustered(struct cmd_context *cmd,
struct volume_group *vg)
{
int clustered = !strcmp(arg_str_value(cmd, clustered_ARG, "n"), "y");
+ struct lv_list *lvl;
+ struct logical_volume *lv;
+
+ if (clustered) {
+ dm_list_iterate_items(lvl, &vg->lvs) {
+ lv = lvl->lv;
+
+ if (lv_is_cache_type(lv)) {
+ log_error("Clustered VG is not supported with cache type LV %s",
+ lv->name);
+ return 0;
+ }
+
+ if (lv_is_thin_type(lv)) {
+ log_error("Clustered VG is not supported with thin type LV %s",
+ lv->name);
+ return 0;
+ }
+ }
+ }
if (clustered && (vg_is_clustered(vg))) {
log_error("Volume group \"%s\" is already clustered",
--
1.8.3.1
reply other threads:[~2014-09-03 16:49 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=20140903164904.GC20852@redhat.com \
--to=teigland@redhat.com \
--cc=lvm-devel@redhat.com \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.