All of lore.kernel.org
 help / color / mirror / Atom feed
From: jbrassow@sourceware.org <jbrassow@sourceware.org>
To: lvm-devel@redhat.com
Subject: LVM2/lib/activate dev_manager.c
Date: 13 Feb 2012 17:59:23 -0000	[thread overview]
Message-ID: <20120213175923.11219.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	jbrassow at sourceware.org	2012-02-13 17:59:22

Modified files:
	lib/activate   : dev_manager.c 

Log message:
	Fix bug that caused RAID devices to be unable to activate if sub-LV was missing.
	
	Commit 02f6f4902fd90709f55e2e97e969ee28c2945c81 introduced a bug that caused
	RAID devices to fail to activate if the device for a single sub-LV failed.
	The special case of LVM mirror was handled, but not LVM RAID.
	EXAMPLE:
	[root at bp-01 ~]# devices vg
	LV            Copy%  Devices
	lv            100.00 lv_rimage_0(0),lv_rimage_1(0)
	[lv_rimage_0]        /dev/sde1(1)
	[lv_rimage_1]        /dev/sdh1(1)
	[lv_rmeta_0]         /dev/sde1(0)
	[lv_rmeta_1]         /dev/sdh1(0)
	[root at bp-01 ~]# vgchange -an vg
	0 logical volume(s) in volume group "vg" now active
	[root at bp-01 ~]# off.sh sdh
	Turning off sdh
	[root at bp-01 ~]# vgchange -ay vg --partial
	Partial mode. Incomplete logical volumes will be processed.
	Couldn't find device with uuid fbI0YO-GX7x-firU-Vy5o-vzwx-vAKZ-feRxfF.
	Cannot activate vg/lv_rimage_1: all segments missing.
	0 logical volume(s) in volume group "vg" now active
	
	AFTER this patch:
	[root at bp-01 ~]# vgchange -ay vg --partial
	Partial mode. Incomplete logical volumes will be processed.
	Couldn't find device with uuid fbI0YO-GX7x-firU-Vy5o-vzwx-vAKZ-feRxfF.
	1 logical volume(s) in volume group "vg" now active
	[root at bp-01 ~]# devices vg
	Couldn't find device with uuid fbI0YO-GX7x-firU-Vy5o-vzwx-vAKZ-feRxfF.
	LV            Copy%  Devices
	lv            100.00 lv_rimage_0(0),lv_rimage_1(0)
	[lv_rimage_0]        /dev/sde1(1)
	[lv_rimage_1]        unknown device(1)
	[lv_rmeta_0]         /dev/sde1(0)
	[lv_rmeta_1]         unknown device(0)
	[root at bp-01 ~]# dmsetup table vg-lv; dmsetup status vg-lv
	0 1024000 raid raid1 3 0 region_size 1024 2 253:2 253:3 - -
	0 1024000 raid raid1 2 AD 1024000/1024000
	
	No WHATSNEW update necessary because this is an intrarelease fix.
	
	brassow

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/dev_manager.c.diff?cvsroot=lvm2&r1=1.270&r2=1.271

--- LVM2/lib/activate/dev_manager.c	2012/02/01 13:47:27	1.270
+++ LVM2/lib/activate/dev_manager.c	2012/02/13 17:59:21	1.271
@@ -1449,11 +1449,14 @@
 		}
 
 		/*
-		 * Mirrors activate LVs replaced with error targets
+		 * Mirrors activate LVs replaced with error targets and
+		 * RAID can handle non-accessible sub-LVs.
 		 *
 		 * TODO: Can we eventually skip to activate such LVs ?
 		 */
 		if (!num_existing_areas &&
+		    !strstr(seg->lv->name, "_rmeta_") &&
+		    !strstr(seg->lv->name, "_rimage_") &&
 		    !strstr(seg->lv->name, "_mimage_") &&
 		    !((name = strstr(seg->lv->name, "_mlog")) && !name[5])) {
 			log_error("Cannot activate %s/%s: all segments missing.",



             reply	other threads:[~2012-02-13 17:59 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-13 17:59 jbrassow [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-01-25 11:10 LVM2/lib/activate dev_manager.c agk
2012-01-19 15:19 zkabelac
2011-12-21 12:55 zkabelac
2011-11-15 17:25 zkabelac
2011-11-15 17:21 zkabelac
2011-11-15 17:15 zkabelac
2011-10-28 20:34 zkabelac
2011-10-11 10:02 zkabelac
2011-10-11  9:03 zkabelac
2011-10-11  9:02 zkabelac
2011-10-11  9:01 zkabelac
2011-10-11  8:54 zkabelac
2011-10-03 18:24 zkabelac
2011-07-05  1:01 agk
2011-07-04 14:56 agk
2010-12-22 15:32 zkabelac
2010-12-20 14:04 zkabelac
2010-05-14 12:39 mbroz
2010-05-14 12:30 mbroz
2010-05-14 12:03 mbroz
2010-02-23 15:49 mornfall
2010-02-10 14:38 snitzer
2010-01-22 13:28 snitzer
2010-01-13  1:44 snitzer
2009-12-03 10:01 zkabelac
2009-12-03  9:59 zkabelac
2009-11-04 14:56 mbroz
2009-05-07 12:01 mbroz
2008-09-19  7:05 agk
2008-01-08 16:47 zkabelac
2007-12-03 18:00 agk
2007-11-29 15:04 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=20120213175923.11219.qmail@sourceware.org \
    --to=jbrassow@sourceware.org \
    --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.