1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-02 01:18:26 +03:00

Add pvmetadatacopies to lvm.conf and pvcreate man pages.

This commit is contained in:
Dave Wysochanski 2010-06-30 12:49:28 +00:00
parent 7f119c2236
commit 7985f80c63
4 changed files with 22 additions and 2 deletions

View File

@ -60,6 +60,7 @@
#define DEFAULT_STRIPESIZE 64 /* KB */ #define DEFAULT_STRIPESIZE 64 /* KB */
#define DEFAULT_PVMETADATAIGNORE 0 #define DEFAULT_PVMETADATAIGNORE 0
#define DEFAULT_PVMETADATAIGNORE_STR "n"
#define DEFAULT_PVMETADATASIZE 255 #define DEFAULT_PVMETADATASIZE 255
#define DEFAULT_PVMETADATACOPIES 1 #define DEFAULT_PVMETADATACOPIES 1
#define DEFAULT_VGMETADATACOPIES 0 #define DEFAULT_VGMETADATACOPIES 0

View File

@ -406,6 +406,18 @@ The metadata areas are treated as circular buffers, so
unused space becomes filled with an archive of the most recent unused space becomes filled with an archive of the most recent
previous versions of the metadata. previous versions of the metadata.
.IP .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 \fBvgmetadatacopies\fP \(em When creating a volume group using the
LVM2 metadata format, this is the default number of copies of metadata 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 desired across all the physical volumes in the volume group. If set to

View File

@ -13,6 +13,7 @@ pvcreate \- initialize a disk or partition for use by LVM
.RB [ \-M | \-\-metadatatype type ] .RB [ \-M | \-\-metadatatype type ]
.RB [ \-\-[pv]metadatacopies #copies ] .RB [ \-\-[pv]metadatacopies #copies ]
.RB [ \-\-metadatasize size ] .RB [ \-\-metadatasize size ]
.RB [ \-\-metadataignore y|n ]
.RB [ \-\-dataalignment alignment ] .RB [ \-\-dataalignment alignment ]
.RB [ \-\-dataalignmentoffset alignment_offset ] .RB [ \-\-dataalignmentoffset alignment_offset ]
.RB [ \-\-restorefile file ] .RB [ \-\-restorefile file ]

View File

@ -1379,8 +1379,14 @@ int pvcreate_params_validate(struct cmd_context *cmd,
if (arg_count(cmd, metadataignore_ARG)) { if (arg_count(cmd, metadataignore_ARG)) {
pp->mda_ignore = !strcmp(arg_str_value(cmd, pp->mda_ignore = !strcmp(arg_str_value(cmd,
metadataignore_ARG, metadataignore_ARG,
"n"), "y"); 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) && if (arg_count(cmd, pvmetadatacopies_ARG) &&
!arg_int_value(cmd, pvmetadatacopies_ARG, -1) && !arg_int_value(cmd, pvmetadatacopies_ARG, -1) &&