public inbox for
help / color / mirror / Atom feed
Subject: LVM2 ./WHATS_NEW tools/lvremove.c
Date: Mon, 23 Oct 2006 11:46:00 -0000	[thread overview]
Message-ID: <> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	2006-10-23 11:46:16

Modified files:
	.              : WHATS_NEW 
	tools          : lvremove.c 

Log message:
	Don't allow a node to remove an LV that's exclusively active on anther node.


--- LVM2/WHATS_NEW	2006/10/21 23:18:43	1.476
+++ LVM2/WHATS_NEW	2006/10/23 11:46:15	1.477
@@ -1,5 +1,6 @@
 Version 2.02.13 -
+  Don't allow a node to remove an LV that's exclusively active on anther node.
   Cope if same PV is included more than once in cmdline PE range list.
   Set PV size to current device size if it is found to be zero.
   Add segment parameter to target_present functions.
--- LVM2/tools/lvremove.c	2006/05/09 21:23:51	1.48
+++ LVM2/tools/lvremove.c	2006/10/23 11:46:16	1.49
@@ -75,6 +75,16 @@
 	if (!archive(vg))
 		return ECMD_FAILED;
+	/* If the VG is clustered then make sure no-one else is using the LV
+	   we are about to remove */
+	if (vg->status & CLUSTERED) {
+		if (!activate_lv_excl(cmd, lv)) {
+			log_error("Can't get exclusive access to volume \"%s\"",
+				  lv->name);
+			return ECMD_FAILED;
+		}
+	}
 	/* FIXME Snapshot commit out of sequence if it fails after here? */
 	if (!deactivate_lv(cmd, lv)) {
 		log_error("Unable to deactivate logical volume \"%s\"",

                 reply	other threads:[~2006-10-23 11:46 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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \

* 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 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).