{"id":3841,"date":"2022-12-20T17:20:14","date_gmt":"2022-12-20T20:20:14","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/pvcreate-man8\/"},"modified":"2022-12-20T17:20:14","modified_gmt":"2022-12-20T20:20:14","slug":"pvcreate-man8","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/pvcreate-man8\/","title":{"rendered":"PVCREATE (man8)"},"content":{"rendered":"<h1 align=\"center\">PVCREATE<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#USAGE\">USAGE<\/a><br \/> <a href=\"#OPTIONS\">OPTIONS<\/a><br \/> <a href=\"#VARIABLES\">VARIABLES<\/a><br \/> <a href=\"#ENVIRONMENT VARIABLES\">ENVIRONMENT VARIABLES<\/a><br \/> <a href=\"#EXAMPLES\">EXAMPLES<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">pvcreate \u2212 Initialize physical volume(s) for use by LVM<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>pvcreate<\/b> <i>position_args<\/i> <br \/> [ <i>option_args<\/i> ]<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">pvcreate initializes a Physical Volume (PV) on a device so the device is recognized as belonging to LVM. This allows the PV to be used in a Volume Group (VG). An LVM disk label is written to the device, and LVM metadata areas are initialized. A PV can be placed on a whole device or partition.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Use <b>vgcreate<\/b>(8) to create a new VG on the PV, or <b>vgextend<\/b>(8) to add the PV to an existing VG. Use <b>pvremove<\/b>(8) to remove the LVM disk label from the device.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The force option will create a PV without confirmation. Repeating the force option (<b>-ff<\/b>) will forcibly create a PV, overriding checks that normally prevent it, e.g. if the PV is already in a VG.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Metadata location, size, and alignment<\/b><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The LVM disk label begins 512 bytes from the start of the device, and is 512 bytes in size.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The LVM metadata area begins at an offset (from the start of the device) equal to the page size of the machine creating the PV (often 4 KiB.) The metadata area contains a 512 byte header and a multi-KiB circular buffer that holds text copies of the VG metadata.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">With default settings, the first physical extent (PE), which contains LV data, is 1 MiB from the start of the device. This location is controlled by <b>default_data_alignment<\/b> in lvm.conf, which is set to 1 (MiB) by default. The pe_start will be a multiple of this many MiB. This location can be checked with: <b><br \/> pvs \u2212o pe_start<\/b> <i>PV<\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The size of the LVM metadata area is the space between the the start of the metadata area and the first PE. When metadata begins at 4 KiB and the first PE is at 1024 KiB, the metadata area size is 1020 KiB. This can be checked with: <b><br \/> pvs \u2212o mda_size<\/b> <i>PV<\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The mda_size cannot be increased after pvcreate, so if larger metadata is needed, it must be set during pvcreate. Two copies of the VG metadata must always fit within the metadata area, so the maximum VG metadata size is around half the mda_size. This can be checked with: <b><br \/> vgs \u2212o mda_free<\/b> <i>VG<\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">A larger metadata area can be set with \u2212\u2212metadatasize. The resulting mda_size may be larger than specified due to default_data_alignment placing pe_start on a MiB boundary, and the fact that the metadata area extends to the first PE. With metadata starting at 4 KiB and default_data_alignment 1 (MiB), setting \u2212\u2212metadatasize 2048k results in pe_start of 3 MiB and mda_size of 3068 KiB. Alternatively, \u2212\u2212metadatasize 2044k results in pe_start at 2 MiB and mda_size of 2044 KiB.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The alignment of pe_start described above may be automatically overriden based on md device properties or device i\/o properties reported in sysfs. These automatic adjustments can be enabled\/disabled using lvm.conf settings md_chunk_alignment and data_alignment_offset_detection.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">To use a different pe_start alignment, use the \u2212\u2212dataalignment option. The \u2212\u2212metadatasize option would also typically be used in this case because the metadata area size also determines the location of pe_start. When using these two options together, pe_start is calculated as: metadata area start (page size), plus the specified \u2212\u2212metadatasize, rounded up to the next multiple of \u2212\u2212dataalignment. With metadata starting at 4 KiB, \u2212\u2212metadatasize 2048k, and \u2212\u2212dataalignment 128k, pe_start is 2176 KiB and mda_size is 2172 KiB. The pe_start of 2176 KiB is the nearest even multiple of 128 KiB that provides at least 2048 KiB of metadata space. Always check the resulting alignment and metadata size when using these options.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">To shift an aligned pe_start value, use the \u2212\u2212dataaligmentoffset option. The pe_start alignment is calculated as described above, and then the value specified with \u2212\u2212dataaligmentoffset is added to produce the final pe_start value.<\/p>\n<h2>USAGE <a name=\"USAGE\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>pvcreate<\/b> <i>PV<\/i> &#8230;<\/p>\n<p style=\"margin-left:17%;\">[ <b>\u2212f<\/b>|<b>\u2212\u2212force<\/b> ] <br \/> [ <b>\u2212M<\/b>|<b>\u2212\u2212metadatatype lvm2<\/b> ] <br \/> [ <b>\u2212u<\/b>|<b>\u2212\u2212uuid<\/b> <i>String<\/i> ] <br \/> [ <b>\u2212Z<\/b>|<b>\u2212\u2212zero y<\/b>|<b>n<\/b> ] <br \/> [ <b>\u2212\u2212dataalignment<\/b> <i>Size<\/i>[k|UNIT] ] <br \/> [ <b>\u2212\u2212dataalignmentoffset<\/b> <i>Size<\/i>[k|UNIT] ] <br \/> [ <b>\u2212\u2212bootloaderareasize<\/b> <i>Size<\/i>[m|UNIT] ] <br \/> [ <b>\u2212\u2212labelsector<\/b> <i>Number<\/i> ] <br \/> [ <b>\u2212\u2212[pv]metadatacopies 0<\/b>|<b>1<\/b>|<b>2<\/b> ] <br \/> [ <b>\u2212\u2212metadatasize<\/b> <i>Size<\/i>[m|UNIT] ] <br \/> [ <b>\u2212\u2212metadataignore y<\/b>|<b>n<\/b> ] <br \/> [ <b>\u2212\u2212norestorefile<\/b> ] <br \/> [ <b>\u2212\u2212setphysicalvolumesize<\/b> <i>Size<\/i>[m|UNIT] ] <br \/> [ <b>\u2212\u2212reportformat basic<\/b>|<b>json<\/b> ] <br \/> [ <b>\u2212\u2212restorefile<\/b> <i>String<\/i> ] <br \/> [ COMMON_OPTIONS ]<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Common options for lvm:<\/p>\n<p style=\"margin-left:17%;\">[ <b>\u2212d<\/b>|<b>\u2212\u2212debug<\/b> ] <br \/> [ <b>\u2212h<\/b>|<b>\u2212\u2212help<\/b> ] <br \/> [ <b>\u2212q<\/b>|<b>\u2212\u2212quiet<\/b> ] <br \/> [ <b>\u2212t<\/b>|<b>\u2212\u2212test<\/b> ] <br \/> [ <b>\u2212v<\/b>|<b>\u2212\u2212verbose<\/b> ] <br \/> [ <b>\u2212y<\/b>|<b>\u2212\u2212yes<\/b> ] <br \/> [ <b>\u2212\u2212commandprofile<\/b> <i>String<\/i> ] <br \/> [ <b>\u2212\u2212config<\/b> <i>String<\/i> ] <br \/> [ <b>\u2212\u2212driverloaded y<\/b>|<b>n<\/b> ] <br \/> [ <b>\u2212\u2212lockopt<\/b> <i>String<\/i> ] <br \/> [ <b>\u2212\u2212longhelp<\/b> ] <br \/> [ <b>\u2212\u2212nolocking<\/b> ] <br \/> [ <b>\u2212\u2212profile<\/b> <i>String<\/i> ] <br \/> [ <b>\u2212\u2212version<\/b> ]<\/p>\n<h2>OPTIONS <a name=\"OPTIONS\"><\/a> <\/h2>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"51%\">\n<p style=\"margin-top: 1em\"><b>\u2212\u2212bootloaderareasize<\/b> <i>Size<\/i>[m|UNIT]<\/p>\n<\/td>\n<td width=\"38%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%;\">Reserve space for the bootloader between the LVM metadata area and the first PE. The bootloader area is reserved for bootloaders to embed their own data or metadata; LVM will not use it. The bootloader area begins where the first PE would otherwise be located. The first PE is moved out by the size of the bootloader area, and then moved out further if necessary to match the data alignment. The start of the bootloader area is always aligned, see also \u2212\u2212dataalignment and \u2212\u2212dataalignmentoffset. The bootloader area may be larger than requested due to the alignment, but it\u2019s never less than the requested size. To see the bootloader area start and size of an existing PV use pvs \u2212o +pv_ba_start,pv_ba_size.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"35%\">\n<p style=\"margin-top: 1em\"><b>\u2212\u2212commandprofile<\/b> <i>String<\/i><\/p>\n<\/td>\n<td width=\"54%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%;\">The command profile to use for command configuration. See <b>lvm.conf<\/b>(5) for more information about profiles.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"23%\">\n<p style=\"margin-top: 1em\"><b>\u2212\u2212config<\/b> <i>String<\/i><\/p>\n<\/td>\n<td width=\"66%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%;\">Config settings for the command. These override lvm.conf settings. The String arg uses the same format as lvm.conf, or may use section\/field syntax. See <b>lvm.conf<\/b>(5) for more information about config.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"43%\">\n<p style=\"margin-top: 1em\"><b>\u2212\u2212dataalignment<\/b> <i>Size<\/i>[k|UNIT]<\/p>\n<\/td>\n<td width=\"46%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%;\">Align the start of a PV data area with a multiple of this number. To see the location of the first Physical Extent (PE) of an existing PV, use pvs \u2212o +pe_start. In addition, it may be shifted by an alignment offset, see \u2212\u2212dataalignmentoffset. Also specify an appropriate PE size when creating a VG.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"52%\">\n<p style=\"margin-top: 1em\"><b>\u2212\u2212dataalignmentoffset<\/b> <i>Size<\/i>[k|UNIT]<\/p>\n<\/td>\n<td width=\"37%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%;\">Shift the start of the PV data area by this additional offset.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"21%\">\n<p style=\"margin-top: 1em\"><b>\u2212d<\/b>|<b>\u2212\u2212debug<\/b> &#8230;<\/p>\n<\/td>\n<td width=\"68%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%;\">Set debug level. Repeat from 1 to 6 times to increase the detail of messages sent to the log file and\/or syslog (if configured).<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"27%\">\n<p style=\"margin-top: 1em\"><b>\u2212\u2212driverloaded y<\/b>|<b>n<\/b><\/p>\n<\/td>\n<td width=\"62%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%;\">If set to no, the command will not attempt to use device-mapper. For testing and debugging.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"21%\">\n<p style=\"margin-top: 1em\"><b>\u2212f<\/b>|<b>\u2212\u2212force<\/b> &#8230;<\/p>\n<\/td>\n<td width=\"68%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%;\">Override various checks, confirmations and protections. Use with extreme caution.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"14%\">\n<p style=\"margin-top: 1em\"><b>\u2212h<\/b>|<b>\u2212\u2212help<\/b><\/p>\n<\/td>\n<td width=\"75%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%;\">Display help text.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"31%\">\n<p style=\"margin-top: 1em\"><b>\u2212\u2212labelsector<\/b> <i>Number<\/i><\/p>\n<\/td>\n<td width=\"58%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%;\">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 \u2212 see LABEL_SCAN_SECTORS in the source). Use with care.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"24%\">\n<p style=\"margin-top: 1em\"><b>\u2212\u2212lockopt<\/b> <i>String<\/i><\/p>\n<\/td>\n<td width=\"65%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%;\">Used to pass options for special cases to lvmlockd. See <b>lvmlockd<\/b>(8) for more information.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"15%\">\n<p style=\"margin-top: 1em\"><b>\u2212\u2212longhelp<\/b><\/p>\n<\/td>\n<td width=\"74%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%;\">Display long help text.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"31%\">\n<p style=\"margin-top: 1em\"><b>\u2212\u2212metadataignore y<\/b>|<b>n<\/b><\/p>\n<\/td>\n<td width=\"58%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%;\">Specifies the metadataignore property of a PV. If yes, metadata areas on the PV are ignored, and lvm will not store metadata in the metadata areas of the PV. If no, lvm will store metadata on the PV.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"41%\">\n<p style=\"margin-top: 1em\"><b>\u2212\u2212metadatasize<\/b> <i>Size<\/i>[m|UNIT]<\/p>\n<\/td>\n<td width=\"48%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%;\">The approximate amount of space used for each VG metadata area. The size may be rounded.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"34%\">\n<p style=\"margin-top: 1em\"><b>\u2212M<\/b>|<b>\u2212\u2212metadatatype lvm2<\/b><\/p>\n<\/td>\n<td width=\"55%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%;\">Specifies the type of on-disk metadata to use. <b>lvm2<\/b> (or just <b>2<\/b>) is the current, standard format. <b>lvm1<\/b> (or just <b>1<\/b>) is no longer used.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"17%\">\n<p style=\"margin-top: 1em\"><b>\u2212\u2212nolocking<\/b><\/p>\n<\/td>\n<td width=\"72%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%;\">Disable locking.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"23%\">\n<p style=\"margin-top: 1em\"><b>\u2212\u2212norestorefile<\/b><\/p>\n<\/td>\n<td width=\"66%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%;\">In conjunction with \u2212\u2212uuid, this allows a uuid to be specified without also requiring that a backup of the metadata be provided.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"24%\">\n<p style=\"margin-top: 1em\"><b>\u2212\u2212profile<\/b> <i>String<\/i><\/p>\n<\/td>\n<td width=\"65%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%;\">An alias for \u2212\u2212commandprofile or \u2212\u2212metadataprofile, depending on the command.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"40%\">\n<p style=\"margin-top: 1em\"><b>\u2212\u2212[pv]metadatacopies 0<\/b>|<b>1<\/b>|<b>2<\/b><\/p>\n<\/td>\n<td width=\"49%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%;\">The number of metadata areas to set aside on a PV for storing VG metadata. When 2, one copy of the VG metadata is stored at the front of the PV and a second copy is stored at the end. When 1, one copy of the VG metadata is stored at the front of the PV. When 0, no copies of the VG metadata are stored on the given PV. This may be useful in VGs containing many PVs (this places limitations on the ability to use vgsplit later.)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"21%\">\n<p style=\"margin-top: 1em\"><b>\u2212q<\/b>|<b>\u2212\u2212quiet<\/b> &#8230;<\/p>\n<\/td>\n<td width=\"68%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%;\">Suppress output and log messages. Overrides \u2212\u2212debug and \u2212\u2212verbose. Repeat once to also suppress any prompts with answer \u2019no\u2019.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"38%\">\n<p style=\"margin-top: 1em\"><b>\u2212\u2212reportformat basic<\/b>|<b>json<\/b><\/p>\n<\/td>\n<td width=\"51%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%;\">Overrides current output format for reports which is defined globally by the report\/output_format setting in lvm.conf. <b>basic<\/b> is the original format with columns and rows. If there is more than one report per command, each report is prefixed with the report name for identification. <b>json<\/b> produces report output in JSON format. See <b>lvmreport<\/b>(7) for more information.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"31%\">\n<p style=\"margin-top: 1em\"><b>\u2212\u2212restorefile<\/b> <i>String<\/i><\/p>\n<\/td>\n<td width=\"58%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%;\">In conjunction with \u2212\u2212uuid, this reads the file (produced by vgcfgbackup), extracts the location and size of the data on the PV, and ensures that the metadata produced by the program is consistent with the contents of the file, i.e. the physical extents will be in the same place and not be overwritten by new metadata. This provides a mechanism to upgrade the metadata format or to add\/remove metadata areas. Use with care.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"55%\">\n<p style=\"margin-top: 1em\"><b>\u2212\u2212setphysicalvolumesize<\/b> <i>Size<\/i>[m|UNIT]<\/p>\n<\/td>\n<td width=\"34%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%;\">Overrides the automatically detected size of the PV. Use with care, or prior to reducing the physical size of the device.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"14%\">\n<p style=\"margin-top: 1em\"><b>\u2212t<\/b>|<b>\u2212\u2212test<\/b><\/p>\n<\/td>\n<td width=\"75%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%;\">Run in test mode. Commands will not update metadata. This is implemented by disabling all metadata writing but nevertheless returning success to the calling function. This may lead to unusual error messages in multi-stage operations if a tool relies on reading back metadata it believes has changed but hasn\u2019t.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"24%\">\n<p style=\"margin-top: 1em\"><b>\u2212u<\/b>|<b>\u2212\u2212uuid<\/b> <i>String<\/i><\/p>\n<\/td>\n<td width=\"65%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%;\">Specify a UUID for the device. Without this option, a random UUID is generated. This option is needed before restoring a backup of LVM metadata onto a replacement device; see <b>vgcfgrestore<\/b>(8). As such, use of -\u2212restorefile is compulsory unless the \u2212\u2212norestorefile is used. All PVs must have unique UUIDs, and LVM will prevent certain operations if multiple devices are seen with the same UUID. See <b>vgimportclone<\/b>(8) for more information.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"24%\">\n<p style=\"margin-top: 1em\"><b>\u2212v<\/b>|<b>\u2212\u2212verbose<\/b> &#8230;<\/p>\n<\/td>\n<td width=\"65%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%;\">Set verbose level. Repeat from 1 to 4 times to increase the detail of messages sent to stdout and stderr.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"14%\">\n<p style=\"margin-top: 1em\"><b>\u2212\u2212version<\/b><\/p>\n<\/td>\n<td width=\"75%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%;\">Display version information.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"12%\">\n<p style=\"margin-top: 1em\"><b>\u2212y<\/b>|<b>\u2212\u2212yes<\/b><\/p>\n<\/td>\n<td width=\"77%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%;\">Do not prompt for confirmation interactively but always assume the answer yes. Use with extreme caution. (For automatic no, see \u2212qq.)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"20%\">\n<p style=\"margin-top: 1em\"><b>\u2212Z<\/b>|<b>\u2212\u2212zero y<\/b>|<b>n<\/b><\/p>\n<\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%;\">Controls if the first 4 sectors (2048 bytes) of the device are wiped. The default is to wipe these sectors unless either or both of -\u2212restorefile or \u2212\u2212uuid are specified.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<h2>VARIABLES <a name=\"VARIABLES\"><\/a> <\/h2>\n<td width=\"11%\"><\/td>\n<td width=\"3%\"><\/td>\n<td width=\"86%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"3%\">\n<p><i>PV<\/i><\/p>\n<\/td>\n<td width=\"86%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%;\">Physical Volume name, a device path under \/dev. For commands managing physical extents, a PV positional arg generally accepts a suffix indicating a range (or multiple ranges) of physical extents (PEs). When the first PE is omitted, it defaults to the start of the device, and when the last PE is omitted it defaults to end. Start and end range (inclusive): <i>PV<\/i>[<b>:<\/b><i>PE<\/i><b>\u2212<\/b><i>PE<\/i>]&#8230; Start and length range (counting from 0): <i>PV<\/i>[<b>:<\/b><i>PE<\/i><b>+<\/b><i>PE<\/i>]&#8230;<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"9%\">\n<p style=\"margin-top: 1em\"><i>String<\/i><\/p>\n<\/td>\n<td width=\"80%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%;\">See the option description for information about the string content.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"15%\">\n<p style=\"margin-top: 1em\"><i>Size<\/i>[UNIT]<\/p>\n<\/td>\n<td width=\"74%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%;\">Size is an input number that accepts an optional unit. Input units are always treated as base two values, regardless of capitalization, e.g. \u2019k\u2019 and \u2019K\u2019 both refer to 1024. The default input unit is specified by letter, followed by |UNIT. UNIT represents other possible input units: <b>bBsSkKmMgGtTpPeE<\/b>. b|B is bytes, s|S is sectors of 512 bytes, k|K is kilobytes, m|M is megabytes, g|G is gigabytes, t|T is terabytes, p|P is petabytes, e|E is exabytes. (This should not be confused with the output control \u2212\u2212units, where capital letters mean multiple of 1000.)<\/p>\n<h2>ENVIRONMENT VARIABLES <a name=\"ENVIRONMENT VARIABLES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">See <b>lvm<\/b>(8) for information about environment variables used by lvm. For example, LVM_VG_NAME can generally be substituted for a required VG parameter.<\/p>\n<h2>EXAMPLES <a name=\"EXAMPLES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Initialize a partition and a full device. <b><br \/> pvcreate \/dev\/sdc4 \/dev\/sde<\/b><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">If a device is a 4KiB sector drive that compensates for windows partitioning (sector 7 is the lowest aligned logical block, the 4KiB sectors start at LBA \u22121, and consequently sector 63 is aligned on a 4KiB boundary) manually account for this when initializing for use by LVM. <b><br \/> pvcreate \u2212\u2212dataalignmentoffset 7s \/dev\/sdb<\/b><\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>lvm<\/b>(8) <b>lvm.conf<\/b>(5) <b>lvmconfig<\/b>(8)<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>pvchange<\/b>(8) <b>pvck<\/b>(8) <b>pvcreate<\/b>(8) <b>pvdisplay<\/b>(8) <b>pvmove<\/b>(8) <b>pvremove<\/b>(8) <b>pvresize<\/b>(8) <b>pvs<\/b>(8) <b>pvscan<\/b>(8)<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>vgcfgbackup<\/b>(8) <b>vgcfgrestore<\/b>(8) <b>vgchange<\/b>(8) <b>vgck<\/b>(8) <b>vgcreate<\/b>(8) <b>vgconvert<\/b>(8) <b>vgdisplay<\/b>(8) <b>vgexport<\/b>(8) <b>vgextend<\/b>(8) <b>vgimport<\/b>(8) <b>vgimportclone<\/b>(8) <b>vgmerge<\/b>(8) <b>vgmknodes<\/b>(8) <b>vgreduce<\/b>(8) <b>vgremove<\/b>(8) <b>vgrename<\/b>(8) <b>vgs<\/b>(8) <b>vgscan<\/b>(8) <b>vgsplit<\/b>(8)<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>lvcreate<\/b>(8) <b>lvchange<\/b>(8) <b>lvconvert<\/b>(8) <b>lvdisplay<\/b>(8) <b>lvextend<\/b>(8) <b>lvreduce<\/b>(8) <b>lvremove<\/b>(8) <b>lvrename<\/b>(8) <b>lvresize<\/b>(8) <b>lvs<\/b>(8) <b>lvscan<\/b>(8)<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>lvm-fullreport<\/b>(8) <b>lvm-lvpoll<\/b>(8) <b>lvm2\u2212activation\u2212generator<\/b>(8) <b>blkdeactivate<\/b>(8) <b>lvmdump<\/b>(8)<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>dmeventd<\/b>(8) <b>lvmpolld<\/b>(8) <b>lvmlockd<\/b>(8) <b>lvmlockctl<\/b>(8) <b>cmirrord<\/b>(8) <b>lvmdbusd<\/b>(8)<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>lvmsystemid<\/b>(7) <b>lvmreport<\/b>(7) <b>lvmraid<\/b>(7) <b>lvmthin<\/b>(7) <b>lvmcache<\/b>(7)<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  pvcreate \u2212 Initialize physical volume(s) for use by LVM <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[5,52,4,936],"class_list":["post-3841","post","type-post","status-publish","format-standard","hentry","category-8-administracion-del-sistema","tag-5","tag-administracion","tag-man8","tag-pvcreate"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3841","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=3841"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3841\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=3841"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=3841"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=3841"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}