All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Brassow <jbrassow@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH] cluser mirror: Allow VGs to be built on cluster mirrors
Date: Mon, 15 Oct 2012 10:28:17 -0500	[thread overview]
Message-ID: <1350314897.3094.3.camel@f16> (raw)

cluser mirror:  Allow VGs to be built on cluster mirrors

While it is possible to create VGs on top of cluster mirrors,
it is currently worthless to do so because no LVs can be created.
This is not a limitation of 'locking_type = 1' LVM.  IOW, you can
happily stack a VG on top of a single machine LV of 'mirror'
segment type.

The disconnect comes because of the way 'ignore_suspended_devices'
is set.  That is, it is not set during lvcreate/lvremove when
running 'locking_type = 1' (i.e. single machine).  However, it is set
- every time - when 'locking_type = 3' and the activation is sent
through clvmd.

'ignore_suspended_devices' is meant to avoid reading any DM device
that is suspended.  However, a mirror device can block I/O for a couple
reasons.  The first is because it is suspended.  The second is because
it has a unaddressed device failure.  The first case would be already
addressed by the generic rejection of all DM devices that are suspended.
The second is not addressed at all by also rejecting mirror devices if
'ignore_suspended_devices' is set.  Therefore, this chunk of code is
pointless.  It also is the cause of not being able to use mirrors as
a source for VG stacking.

Index: lvm2/lib/activate/dev_manager.c
===================================================================
--- lvm2.orig/lib/activate/dev_manager.c
+++ lvm2/lib/activate/dev_manager.c
@@ -181,16 +181,10 @@ int device_is_usable(struct device *dev)
 	}
 
 	/* FIXME Also check for mirror block_on_error and mpath no paths */
-	/* For now, we exclude all mirrors */
-
 	do {
 		next = dm_get_next_target(dmt, next, &start, &length,
 					  &target_type, &params);
 		/* Skip if target type doesn't match */
-		if (target_type && !strcmp(target_type, "mirror") && ignore_suspended_devices()) {
-			log_debug("%s: Mirror device %s not usable.", dev_name(dev), name);
-			goto out;
-		}
 
 		/*
 		 * Snapshot origin could be sitting on top of a mirror which




                 reply	other threads:[~2012-10-15 15:28 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=1350314897.3094.3.camel@f16 \
    --to=jbrassow@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.