[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[lvm-devel] LVM2/lib/metadata lv_manip.c



CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac sourceware org	2012-01-25 08:57:25

Modified files:
	lib/metadata   : lv_manip.c 

Log message:
	Thin prevent removal of its data and metadata LVs
	
	LVs cannot be removed while there are linked to thin pool.
	(Gives better error message, than validation).

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/lv_manip.c.diff?cvsroot=lvm2&r1=1.348&r2=1.349

--- LVM2/lib/metadata/lv_manip.c	2012/01/24 14:53:59	1.348
+++ LVM2/lib/metadata/lv_manip.c	2012/01/25 08:57:25	1.349
@@ -3172,6 +3172,12 @@
 		return 0;
 	}
 
+	if (lv_is_thin_pool_data(lv) || lv_is_thin_pool_metadata(lv)) {
+		log_error("Can't remove logical volume %s used by a thin pool.",
+			  lv->name);
+		return 0;
+	}
+
 	if (lv->status & LOCKED) {
 		log_error("Can't remove locked LV %s", lv->name);
 		return 0;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]