summaryrefslogtreecommitdiffstats
path: root/man/pvcreate.8.in
diff options
context:
space:
mode:
Diffstat (limited to 'man/pvcreate.8.in')
-rw-r--r--man/pvcreate.8.in144
1 files changed, 78 insertions, 66 deletions
diff --git a/man/pvcreate.8.in b/man/pvcreate.8.in
index 7193beb2..3fec8dc6 100644
--- a/man/pvcreate.8.in
+++ b/man/pvcreate.8.in
@@ -8,30 +8,42 @@ pvcreate \- initialize a disk or partition for use by LVM
.RB [ \-t | \-\-test ]
.RB [ \-v | \-\-verbose ]
.RB [ \-\-version ]
-.RB [ \-f [ f ]| \-\-force " [" \-\-force ]]
+.RB [ \-f [ f ]| \-\-force
+.RB [ \-\-force ]]
.RB [ \-y | \-\-yes ]
.RB [ \-\-labelsector ]
-.RB [ \-M | \-\-metadatatype " " \fItype ]
-.RB [ \-\-[pv]metadatacopies " " \fI#copies ]
-.RB [ \-\-metadatasize " " \fIsize ]
-.RB [ \-\-metadataignore " {" \fIy | \fIn }]
-.RB [ \-\-dataalignment " " \fIalignment ]
-.RB [ \-\-dataalignmentoffset " " \fIalignment_offset ]
-.RB [ \-\-restorefile " " \fIfile ]
+.RB [ \-M | \-\-metadatatype
+.IR type ]
+.RB [ \-\- [ pv ] metadatacopies
+.IR NumberOfCopies ]
+.RB [ \-\-metadatasize
+.IR size ]
+.RB [ \-\-metadataignore
+.RI { y | n }]
+.RB [ \-\-dataalignment
+.IR alignment ]
+.RB [ \-\-dataalignmentoffset
+.IR alignment_offset ]
+.RB [ \-\-restorefile
+.IR file ]
.RB [ \-\-norestorefile ]
-.RB [ \-\-setphysicalvolumesize " " \fIsize ]
-.RB [ \-u | \-\-uuid " " \fIuuid ]
-.RB [ \-Z | \-\-zero " {" \fIy | \fIn }]
-.IR PhysicalVolume " [" PhysicalVolume ...]
+.RB [ \-\-setphysicalvolumesize
+.IR size ]
+.RB [ \-u | \-\-uuid
+.IR uuid ]
+.RB [ \-Z | \-\-zero
+.RI { y | n }]
+.I PhysicalVolume
+.RI [ PhysicalVolume ...]
.SH DESCRIPTION
-.B pvcreate
-initializes
+pvcreate initializes
.I PhysicalVolume
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 should be set to 0x8e using
-.BR fdisk "(8), " cfdisk "(8), "
+.BR fdisk (8),
+.BR cfdisk (8),
or a equivalent. For
.B whole disk devices only
the partition table must be erased, which will effectively destroy all
@@ -57,45 +69,45 @@ Force the creation without any confirmation. You can not recreate
In an emergency you can override this behaviour with \fB-ff\fP.
.TP
.BR \-u ", " \-\-uuid " " \fIuuid
-Specify the uuid for the device.
-Without this option, \fBpvcreate\fP generates a random uuid.
+Specify the uuid for the device.
+Without this option, \fBpvcreate\fP(8) generates a random uuid.
All of your physical volumes must have unique uuids.
-You need to use this option before restoring a backup of LVM metadata
+You need to use this option before restoring a backup of LVM metadata
onto a replacement device - see \fBvgcfgrestore\fP(8). As such, use of
-\fB--restorefile\fP is compulsory unless the \fB--norestorefile\fP is
+\fB\-\-restorefile\fP is compulsory unless the \fB\-\-norestorefile\fP is
used.
.TP
.BR \-y ", " \-\-yes
Answer yes to all questions.
.TP
-.BR \-Z ", " \-\-zero " " \fIy | \fIn
-Whether or not the first 4 sectors (2048 bytes) of the device should be
+.BR \-Z ", " \-\-zero " {" \fIy | \fIn }
+Whether or not the first 4 sectors (2048 bytes) of the device should be
wiped.
-If this option is not given, the
-default is to wipe these sectors unless either or both of the \fB--restorefile\fP
-or \fB--uuid\fP options were specified.
+If this option is not given, the
+default is to wipe these sectors unless either or both of the
+\fB\-\-restorefile\fP or \fB\-\-uuid\fP options were specified.
.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
+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.
+.P
+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(5).
Each physical volume in the same volume group must use the same format, but
-different volume groups on a machine may use different formats
+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
+.P
+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
-.BI \-\-metadatasize " size"
+.B \-\-metadatasize \fIsize
The approximate amount of space to be set aside for each metadata area.
(The size you specify may get rounded.)
.TP
-.BI \-\-dataalignment " alignment"
+.B \-\-dataalignment \fIalignment
Align the start of the data to a multiple of this number.
You should also specify an appropriate \fIPhysicalExtentSize\fP when creating
the Volume Group with \fBvgcreate\fP.
@@ -103,25 +115,25 @@ the Volume Group with \fBvgcreate\fP.
To see the location of the first Physical Extent of an existing Physical Volume
use \fBpvs -o +pe_start\fP . It will be a multiple of the requested
alignment. In addition it may be shifted by \fIalignment_offset\fP from
-\fIdata_alignment_offset_detection\fP (if enabled in \fBlvm.conf\fP) or
-\fB--dataalignmentoffset\fP.
+\fIdata_alignment_offset_detection\fP (if enabled in \fBlvm.conf\fP(5)) or
+\fB\-\-dataalignmentoffset\fP.
.TP
-.BI \-\-dataalignmentoffset " alignment_offset"
+.B \-\-dataalignmentoffset \fIalignment_offset
Shift the start of the data area by this additional \fIalignment_offset\fP.
.TP
-.BI \-\-[pv]metadatacopies " copies"
+.BR \-\- [ pv ] metadatacopies " " \fINumberOfCopies
The number of metadata areas to set aside on each PV. Currently
-this can be 0, 1 or 2.
-If set to 2, 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 (the default), one copy is kept at the front of the PV
+this can be 0, 1 or 2.
+If set to 2, 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 (the default), 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
+then later use \fBvgsplit\fP(8) you must ensure that each VG is still going
to have a suitable number of copies of the metadata after the split!
.TP
-.BI \-\-metadataignore " y" \fR| n
+.BR \-\-metadataignore " {" \fIy | \fIn }
Ignore or un-ignore metadata areas on this physical volume.
The default is "n". This setting can be changed with \fBpvchange\fP.
If metadata areas on a physical volume are ignored, LVM will
@@ -132,49 +144,49 @@ metadata on this device, it is still wise always to allocate a metadata
area in case you need it in the future and to use this option to instruct
LVM2 to ignore it.
.TP
-.BI \-\-restorefile " file"
+.B \-\-restorefile \fIfile
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
+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
.B \-\-norestorefile
-In conjunction with \fB--uuid\fP, this allows a \fIuuid\fP to be specified
+In conjunction with \fB\-\-uuid\fP, this allows a \fIuuid\fP to be specified
without also requiring that a backup of the metadata be provided.
.TP
-.BI \-\-labelsector " sector"
-By default the PV is labelled with an LVM2 identifier in its second
+.B \-\-labelsector \fIsector
+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
-.BI \-\-setphysicalvolumesize " size"
+.B \-\-setphysicalvolumesize \fIsize
Overrides the automatically-detected size of the PV. Use with care.
-.SH EXAMPLES
+.SH Examples
Initialize partition #4 on the third SCSI disk and the entire fifth
SCSI disk for later use by LVM:
.sp
.B pvcreate /dev/sdc4 /dev/sde
-.sp
-If the 2nd SCSI disk is a 4KB sector drive that compensates for windows
-partitioning (sector 7 is the lowest aligned logical block, the 4KB
-sectors start at LBA -1, and consequently sector 63 is aligned on a 4KB
+
+If the 2nd SCSI disk is a 4KiB sector drive that compensates for windows
+partitioning (sector 7 is the lowest aligned logical block, the 4KiB
+sectors start at LBA -1, and consequently sector 63 is aligned on a 4KiB
boundary) manually account for this when initializing for use by LVM:
.sp
-.B pvcreate --dataalignmentoffset 7s /dev/sdb
-.sp
+.B pvcreate \-\-dataalignmentoffset 7s /dev/sdb
+
.SH SEE ALSO
.BR lvm.conf (5),
.BR lvm (8),
-.BR vgcreate (8),
-.BR vgextend (8),
-.BR lvcreate (8),
-.BR cfdisk (8),
-.BR fdisk (8),
-.BR losetup (8),
-.BR mdadm (8),
-.BR vgcfgrestore (8),
+.BR vgcreate (8),
+.BR vgextend (8),
+.BR lvcreate (8),
+.BR cfdisk (8),
+.BR fdisk (8),
+.BR losetup (8),
+.BR mdadm (8),
+.BR vgcfgrestore (8),
.BR vgconvert (8)