public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2/lib/format_text archiver.c
@ 2012-01-20 11:01 zkabelac
  0 siblings, 0 replies; 6+ messages in thread
From: zkabelac @ 2012-01-20 11:01 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac@sourceware.org	2012-01-20 11:01:13

Modified files:
	lib/format_text: archiver.c 

Log message:
	Thin until proper vgcfgrestore for thin is implementad, disable restore.
	
	Since it may probably do more harm to leave it enabled - add extra test
	for presence of thin volumes in VG, and in this case disable restore.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/archiver.c.diff?cvsroot=lvm2&r1=1.47&r2=1.48

--- LVM2/lib/format_text/archiver.c	2011/08/10 20:25:30	1.47
+++ LVM2/lib/format_text/archiver.c	2012/01/20 11:01:13	1.48
@@ -348,6 +348,7 @@
 {
 	struct volume_group *vg;
 	int missing_pvs, r = 0;
+	const struct lv_list *lvl;
 
 	/*
 	 * Read in the volume group from the text file.
@@ -355,6 +356,16 @@
 	if (!(vg = backup_read_vg(cmd, vg_name, file)))
 		return_0;
 
+	/* FIXME: Restore support is missing for now */
+	dm_list_iterate_items(lvl, &vg->lvs)
+		if (lv_is_thin_type(lvl->lv)) {
+			log_error("Cannot restore Volume Group %s with "
+				  "thin logical volumes. "
+				  "(not yet supported).", vg->name);
+			r = 0;
+			goto out;
+		}
+
 	missing_pvs = vg_missing_pv_count(vg);
 	if (missing_pvs == 0)
 		r = backup_restore_vg(cmd, vg);
@@ -362,6 +373,7 @@
 		log_error("Cannot restore Volume Group %s with %i PVs "
 			  "marked as missing.", vg->name, missing_pvs);
 
+out:
 	release_vg(vg);
 	return r;
 }


^ permalink raw reply	[flat|nested] 6+ messages in thread

* LVM2/lib/format_text archiver.c
@ 2011-02-28 20:50 mbroz
  0 siblings, 0 replies; 6+ messages in thread
From: mbroz @ 2011-02-28 20:50 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	mbroz@sourceware.org	2011-02-28 20:50:01

Modified files:
	lib/format_text: archiver.c 

Log message:
	Rephrase backup message.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/archiver.c.diff?cvsroot=lvm2&r1=1.43&r2=1.44

--- LVM2/lib/format_text/archiver.c	2011/02/25 14:12:14	1.43
+++ LVM2/lib/format_text/archiver.c	2011/02/28 20:50:01	1.44
@@ -217,7 +217,7 @@
 	}
 
 	if (test_mode()) {
-		log_verbose("Test mode: Skipping volume group backup.");
+		log_verbose("Test mode: Skipping backup of volume group.");
 		return 1;
 	}
 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* LVM2/lib/format_text archiver.c
@ 2011-01-05 15:06 zkabelac
  0 siblings, 0 replies; 6+ messages in thread
From: zkabelac @ 2011-01-05 15:06 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac@sourceware.org	2011-01-05 15:06:10

Modified files:
	lib/format_text: archiver.c 

Log message:
	Add sys_debug loging for unlink
	
	This unlink intentionally silently ignores any errors.
	It's still worth to trace its error status in debug mode.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/archiver.c.diff?cvsroot=lvm2&r1=1.36&r2=1.37

--- LVM2/lib/format_text/archiver.c	2010/12/22 13:45:33	1.36
+++ LVM2/lib/format_text/archiver.c	2011/01/05 15:06:10	1.37
@@ -261,7 +261,9 @@
 	/*
 	 * Let this fail silently.
 	 */
-	unlink(path);
+	if (unlink(path))
+		log_sys_debug("unlink", path);
+
 	return 1;
 }
 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* LVM2/lib/format_text archiver.c
@ 2010-06-29 15:04 wysochanski
  0 siblings, 0 replies; 6+ messages in thread
From: wysochanski @ 2010-06-29 15:04 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	wysochanski@sourceware.org	2010-06-29 15:03:59

Modified files:
	lib/format_text: archiver.c 

Log message:
	Add error message if backup_to_file fails because of empty in_use mdas list.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/archiver.c.diff?cvsroot=lvm2&r1=1.31&r2=1.32

--- LVM2/lib/format_text/archiver.c	2010/06/28 20:32:46	1.31
+++ LVM2/lib/format_text/archiver.c	2010/06/29 15:03:59	1.32
@@ -396,6 +396,11 @@
 		return 0;
 	}
 
+	if (!dm_list_size(&tf->metadata_areas_in_use)) {
+		log_error(INTERNAL_ERROR "No in use metadata areas to write.");
+		return 0;
+	}
+
 	/* Write and commit the metadata area */
 	dm_list_iterate_items(mda, &tf->metadata_areas_in_use) {
 		if (!(r = mda->ops->vg_write(tf, vg, mda))) {


^ permalink raw reply	[flat|nested] 6+ messages in thread

* LVM2/lib/format_text archiver.c
@ 2009-05-19  9:45 mbroz
  0 siblings, 0 replies; 6+ messages in thread
From: mbroz @ 2009-05-19  9:45 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	mbroz@sourceware.org	2009-05-19 09:45:34

Modified files:
	lib/format_text: archiver.c 

Log message:
	vgcfgrestore should not quietly fail when backup file has missing PVs.
	
	(fixes previous commit: Fix segfault for vgcfgrestore on VG with missing PVs.)

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/archiver.c.diff?cvsroot=lvm2&r1=1.24&r2=1.25

--- LVM2/lib/format_text/archiver.c	2009/04/22 09:39:46	1.24
+++ LVM2/lib/format_text/archiver.c	2009/05/19 09:45:33	1.25
@@ -335,7 +335,7 @@
 			     const char *file)
 {
 	struct volume_group *vg;
-	int r = 0;
+	int missing_pvs, r = 0;
 
 	/*
 	 * Read in the volume group from the text file.
@@ -343,11 +343,12 @@
 	if (!(vg = backup_read_vg(cmd, vg_name, file)))
 		return_0;
 
-	/*
-	 * If PV is missing, there is already message from read above
-	 */
-	if (!vg_missing_pv_count(vg))
+	missing_pvs = vg_missing_pv_count(vg);
+	if (missing_pvs == 0)
 		r = backup_restore_vg(cmd, vg);
+	else
+		log_error("Cannot restore Volume Group %s with %i PVs "
+			  "marked as missing.", vg->name, missing_pvs);
 
 	vg_release(vg);
 	return r;


^ permalink raw reply	[flat|nested] 6+ messages in thread

* LVM2/lib/format_text archiver.c
@ 2005-05-24 17:37 agk
  0 siblings, 0 replies; 6+ messages in thread
From: agk @ 2005-05-24 17:37 UTC (permalink / raw)
  To: lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk@sourceware.org	2005-05-24 17:37:39

Modified files:
	lib/format_text: archiver.c 

Log message:
	Fix mem allocs after archiver code move.

Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/archiver.c.diff?cvsroot=lvm2&r1=1.1&r2=1.2


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-01-20 11:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-20 11:01 LVM2/lib/format_text archiver.c zkabelac
  -- strict thread matches above, loose matches on Subject: below --
2011-02-28 20:50 mbroz
2011-01-05 15:06 zkabelac
2010-06-29 15:04 wysochanski
2009-05-19  9:45 mbroz
2005-05-24 17:37 agk

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