summaryrefslogtreecommitdiffstats
path: root/man/pvcreate.8
diff options
context:
space:
mode:
Diffstat (limited to 'man/pvcreate.8')
-rw-r--r--man/pvcreate.867
1 files changed, 62 insertions, 5 deletions
diff --git a/man/pvcreate.8 b/man/pvcreate.8
index 681e3978..5bec86fd 100644
--- a/man/pvcreate.8
+++ b/man/pvcreate.8
@@ -7,8 +7,15 @@ pvcreate \- initialize a disk or partition for use by LVM
.RB [ \-f [ f ]| \-\-force " [" \-\-force ]]
.RB [ \-y | \-\-yes ]
.RB [ \-h | \-\-help ]
+.RB [ \-t | \-\-test ]
.RB [ \-v | \-\-verbose ]
-.RB [ \-V | \-\-version ]
+.RB [ \-\-labelsector ]
+.RB [ \-M | \-\-metadatatype type ]
+.RB [ \-\-metadatacopies #copies ]
+.RB [ \-\-metadatasize size ]
+.RB [ \-\-restorefile file ]
+.RB [ \-\-setphysicalvolumesize size ]
+.RB [ \-\-version ]
.IR PhysicalVolume " [" PhysicalVolume ...]
.SH DESCRIPTION
.B pvcreate
@@ -17,7 +24,7 @@ initializes
for later use by the Logical Volume Manager (LVM). Each
.I PhysicalVolume
can be a disk partition, whole disk, meta device, or loopback file.
-For DOS disk partitions, the partition id must be set to 0x8e using
+For DOS disk partitions, the partition id should be set to 0x8e using
.BR fdisk "(8), " cfdisk "(8), "
or a equivalent. For
.B whole disk devices only
@@ -47,11 +54,61 @@ In an emergency you can override this behaviour with -ff.
Specify the uuid for the device.
Without this option, \fBpvcreate\fP generates a random uuid.
All of your physical volumes must have unique uuids.
-You need to use this option to restore a backup of LVM metadata onto
-a replacement device - see \fBvgcfgrestore\fP(8).
+You need to use this option before restoring a backup of LVM metadata
+onto a replacement device - see \fBvgcfgrestore\fP(8).
.TP
.BR \-y ", " \-\-yes
Answer yes to all questions.
+.SH NEW METADATA OPTIONS
+LVM2 introduces a new format for storing metadata on disk.
+This new format is more efficient and resilient than the format the
+original version of LVM used and offers the advanced user greater
+flexibility and control.
+.sp
+The new format may be selected on the command line with \fB-M2\fP or by
+setting \fBformat = "lvm2"\fP in the \fBglobal\fP section of \fBlvm.conf\fP.
+Each physical volume in the same volume group must use the same format, but
+different volume groups on a machine may use different formats
+simultaneously: the tools can handle both formats.
+Additional formats can be added as shared libraries.
+.sp
+Additional tools for manipulating the locations and sizes of metadata areas
+will be written in due course. Use the verbose/debug options on the tools
+to see where the metadata areas are placed.
+.TP
+.BR \-\-metadatasize " size"
+The approximate amount of space to be set aside for each metadata area.
+(The size you specify may get rounded.)
+.TP
+.BR \-\-metadatacopies " copies"
+The number of metadata areas to set aside on each PV. Currently
+this can be 0, 1 or 2.
+If set to 2 (the default), two copies of the volume group metadata
+are held on the PV, one at the front of the PV and one at the end.
+If set to 1, one copy is kept at the front of the PV (starting in the
+5th sector).
+If set to 0, no copies are kept on this PV - you might wish to use this
+with VGs containing large numbers of PVs. But if you do this and
+then later use \fBvgsplit\fP you must ensure that each VG is still going
+to have a suitable number of copies of the metadata after the split!
+.TP
+.BR \-\-restorefile " file"
+In conjunction with \fB--uuid\fP, this extracts the location and size
+of the data on the PV from the file (produced by \fBvgcfgbackup\fP)
+and ensures that the metadata that the program produces is consistent
+with the contents of the file i.e. the physical extents will be in
+the same place and not get overwritten by new metadata. This provides
+a mechanism to upgrade the metadata format or to add/remove metadata
+areas. Use with care. See also \fBvgconvert\fP(8).
+.TP
+.BR \-\-labelsector " sector"
+By default the PV is labelled with an LVM2 identifier in its second
+sector (sector 1). This lets you use a different sector near the
+start of the disk (between 0 and 3 inclusive - see LABEL_SCAN_SECTORS
+in the source). Use with care.
+.TP
+.BR \-\-setphysicalvolumesize " size"
+Overrides the automatically-detected size of the PV. Use with care.
.SH Example
Initialize partition #4 on the third SCSI disk and the entire fifth
SCSI disk for later use by LVM:
@@ -61,4 +118,4 @@ SCSI disk for later use by LVM:
.SH SEE ALSO
.BR lvm "(8), " vgcreate "(8), " vgextend "(8), " lvcreate "(8), "
.BR cfdisk "(8), " fdisk "(8), " losetup "(8), " mdadd "(8), "
-.BR vgcfgrestore "(8)"
+.BR vgcfgrestore "(8), " vgconvert "(8)"