summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Wysochanski <dwysocha@redhat.com>2010-06-30 12:49:28 +0000
committerDave Wysochanski <dwysocha@redhat.com>2010-06-30 12:49:28 +0000
commit7985f80c633af78a9209b02cc848b82a7202cff9 (patch)
treed99077c422447ee195380d21cce54a5a0695494d
parent7f119c2236f2a5e0a1cef145a45a1e422d0af391 (diff)
downloadlvm2-7985f80c633af78a9209b02cc848b82a7202cff9.tar.gz
lvm2-7985f80c633af78a9209b02cc848b82a7202cff9.tar.xz
lvm2-7985f80c633af78a9209b02cc848b82a7202cff9.zip
Add pvmetadatacopies to lvm.conf and pvcreate man pages.
-rw-r--r--lib/config/defaults.h1
-rw-r--r--man/lvm.conf.5.in12
-rw-r--r--man/pvcreate.8.in1
-rw-r--r--tools/toollib.c10
4 files changed, 22 insertions, 2 deletions
diff --git a/lib/config/defaults.h b/lib/config/defaults.h
index 9f48d190..3d8881ca 100644
--- a/lib/config/defaults.h
+++ b/lib/config/defaults.h
@@ -60,6 +60,7 @@
#define DEFAULT_STRIPESIZE 64 /* KB */
#define DEFAULT_PVMETADATAIGNORE 0
+#define DEFAULT_PVMETADATAIGNORE_STR "n"
#define DEFAULT_PVMETADATASIZE 255
#define DEFAULT_PVMETADATACOPIES 1
#define DEFAULT_VGMETADATACOPIES 0
diff --git a/man/lvm.conf.5.in b/man/lvm.conf.5.in
index 88f3ab35..4af73f3d 100644
--- a/man/lvm.conf.5.in
+++ b/man/lvm.conf.5.in
@@ -406,6 +406,18 @@ The metadata areas are treated as circular buffers, so
unused space becomes filled with an archive of the most recent
previous versions of the metadata.
.IP
+\fBpvmetadataignore\fP When creating a physical volume using the LVM2
+metadata format, this states whether metadata areas should be ignored.
+The default is "n". If metadata areas on a physical volume are ignored,
+LVM will not not store metadata in the metadata areas present on newly
+created Physical Volumes. The option can be overridden on the command
+line with \fB--pvmetadataignore\fP. Metadata areas cannot be created
+or extended after Logical Volumes have been allocated on the device.
+If you do not want to store metadata on this device, it is still wise
+always to allocate a metadata area (use a non-zero value for
+\fB--pvmetadatacopies) in case you need it in the future and to use
+this option to instruct LVM2 to ignore it.
+.IP
\fBvgmetadatacopies\fP \(em When creating a volume group using the
LVM2 metadata format, this is the default number of copies of metadata
desired across all the physical volumes in the volume group. If set to
diff --git a/man/pvcreate.8.in b/man/pvcreate.8.in
index d0ba898e..3f26a132 100644
--- a/man/pvcreate.8.in
+++ b/man/pvcreate.8.in
@@ -13,6 +13,7 @@ pvcreate \- initialize a disk or partition for use by LVM
.RB [ \-M | \-\-metadatatype type ]
.RB [ \-\-[pv]metadatacopies #copies ]
.RB [ \-\-metadatasize size ]
+.RB [ \-\-metadataignore y|n ]
.RB [ \-\-dataalignment alignment ]
.RB [ \-\-dataalignmentoffset alignment_offset ]
.RB [ \-\-restorefile file ]
diff --git a/tools/toollib.c b/tools/toollib.c
index 1ba8cdd8..9ffbae2a 100644
--- a/tools/toollib.c
+++ b/tools/toollib.c
@@ -1379,8 +1379,14 @@ int pvcreate_params_validate(struct cmd_context *cmd,
if (arg_count(cmd, metadataignore_ARG)) {
pp->mda_ignore = !strcmp(arg_str_value(cmd,
- metadataignore_ARG,
- "n"), "y");
+ metadataignore_ARG,
+ DEFAULT_PVMETADATAIGNORE_STR),
+ "y");
+ } else {
+ pp->mda_ignore = !strcmp(find_config_tree_str(cmd,
+ "metadata/pvmetadataignore",
+ DEFAULT_PVMETADATAIGNORE_STR),
+ "y");
}
if (arg_count(cmd, pvmetadatacopies_ARG) &&
!arg_int_value(cmd, pvmetadatacopies_ARG, -1) &&