{
    "content": [
        {
            "type": "text",
            "text": "# pvcreate (man)\n\n## NAME\n\npvcreate — Initialize physical volume(s) for use by LVM\n\n## SYNOPSIS\n\npvcreate positionargs\n[ optionargs ]\n\n## DESCRIPTION\n\npvcreate  initializes  a  Physical Volume (PV) on a device so the device is recognized as be‐\nlonging to LVM.  This allows the PV to be used in a Volume Group (VG).  An LVM disk label  is\nwritten to the device, and LVM metadata areas are initialized.  A PV can be placed on a whole\ndevice or partition.\n\n## TLDR\n\n> Initialize a disk or partition for use as a physical volume.\n\n- Initialize the `/dev/sda1` volume for use by LVM:\n  `sudo pvcreate {{/dev/sdXY}}`\n- Force the creation without any confirmation prompts:\n  `sudo pvcreate {{-f|--force}} {{/dev/sdXY}}`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION** (1 subsections)\n- **USAGE**\n- **OPTIONS** (15 subsections)\n- **VARIABLES**\n- **ENVIRONMENT VARIABLES**\n- **EXAMPLES** (2 subsections)\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "pvcreate",
        "section": "",
        "mode": "man",
        "summary": "pvcreate — Initialize physical volume(s) for use by LVM",
        "synopsis": "pvcreate positionargs\n[ optionargs ]",
        "tldr_summary": "Initialize a disk or partition for use as a physical volume.",
        "tldr_examples": [
            {
                "description": "Initialize the `/dev/sda1` volume for use by LVM",
                "command": "sudo pvcreate {{/dev/sdXY}}"
            },
            {
                "description": "Force the creation without any confirmation prompts",
                "command": "sudo pvcreate {{-f|--force}} {{/dev/sdXY}}"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "-d",
                "long": "--debug",
                "arg": null,
                "description": "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). --devices PV Restricts the devices that are visible and accessible to the command. Devices not listed will appear to be missing. This option can be repeated, or accepts a comma sep‐ arated list of devices. This overrides the devices file. --devicesfile String A file listing devices that LVM should use. The file must exist in /etc/lvm/devices/ and is managed with the lvmdevices(8) command. This overrides the lvm.conf(5) de‐ vices/devicesfile and devices/usedevicesfile settings. --driverloaded y|n If set to no, the command will not attempt to use device-mapper. For testing and de‐ bugging."
            },
            {
                "flag": "-f",
                "long": "--force",
                "arg": null,
                "description": "Override various checks, confirmations and protections. Use with extreme caution."
            },
            {
                "flag": "-h",
                "long": "--help",
                "arg": null,
                "description": "Display help text. --journal String Record information in the systemd journal. This information is in addition to infor‐ mation enabled by the lvm.conf log/journal setting. command: record information about the command. output: record the default command output. debug: record full command debugging. --labelsector Number 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 in‐ clusive - see LABELSCANSECTORS in the source). Use with care. --lockopt String Used to pass options for special cases to lvmlockd. See lvmlockd(8) for more informa‐ tion."
            },
            {
                "flag": "",
                "long": "--longhelp",
                "arg": null,
                "description": "Display long help text. --metadataignore y|n 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. --metadatasize Size[m|UNIT] The approximate amount of space used for each VG metadata area. The size may be rounded."
            },
            {
                "flag": "-M",
                "long": "--metadatatype",
                "arg": null,
                "description": "Specifies the type of on-disk metadata to use. lvm2 (or just 2) is the current, stan‐ dard format. lvm1 (or just 1) is no longer used."
            },
            {
                "flag": "",
                "long": "--nohints",
                "arg": null,
                "description": "Do not use the hints file to locate devices for PVs. A command may read more devices to find PVs when hints are not used. The command will still perform standard hint file invalidation where appropriate."
            },
            {
                "flag": "",
                "long": "--nolocking",
                "arg": null,
                "description": "Disable locking. Use with caution, concurrent commands may produce incorrect results."
            },
            {
                "flag": "",
                "long": "--norestorefile",
                "arg": null,
                "description": "In conjunction with --uuid, this allows a uuid to be specified without also requiring that a backup of the metadata be provided. --profile String An alias for --commandprofile or --metadataprofile, depending on the command. --[pv]metadatacopies 0|1|2 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.)"
            },
            {
                "flag": "-q",
                "long": "--quiet",
                "arg": null,
                "description": "Suppress output and log messages. Overrides --debug and --verbose. Repeat once to also suppress any prompts with answer 'no'. --reportformat basic|json Overrides current output format for reports which is defined globally by the re‐ port/outputformat setting in lvm.conf(5). basic 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. json produces report output in JSON format. See lvmreport(7) for more information. --restorefile String In conjunction with --uuid, 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. --setphysicalvolumesize Size[m|UNIT] Overrides the automatically detected size of the PV. Use with care, or prior to re‐ ducing the physical size of the device."
            },
            {
                "flag": "-t",
                "long": "--test",
                "arg": null,
                "description": "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 read‐ ing back metadata it believes has changed but hasn't."
            },
            {
                "flag": "-u",
                "long": "--uuid",
                "arg": null,
                "description": "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 vgcfgrestore(8). As such, use of --restorefile is compulsory unless the --nore‐ storefile is used. All PVs must have unique UUIDs, and LVM will prevent certain oper‐ ations if multiple devices are seen with the same UUID. See vgimportclone(8) for more information."
            },
            {
                "flag": "-v",
                "long": "--verbose",
                "arg": null,
                "description": "Set verbose level. Repeat from 1 to 4 times to increase the detail of messages sent to stdout and stderr."
            },
            {
                "flag": "",
                "long": "--version",
                "arg": null,
                "description": "Display version information."
            },
            {
                "flag": "-y",
                "long": "--yes",
                "arg": null,
                "description": "Do not prompt for confirmation interactively but always assume the answer yes. Use with extreme caution. (For automatic no, see -qq.)"
            },
            {
                "flag": "-Z",
                "long": "--zero",
                "arg": null,
                "description": "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 --restorefile or --uuid are specified."
            }
        ],
        "examples": [
            "Initialize a partition and a full device.",
            "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 -1, and consequently sector 63 is",
            "aligned on a 4KiB boundary) manually account for this when initializing for use by LVM."
        ],
        "see_also": [
            {
                "name": "lvm",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/lvm/8/json"
            },
            {
                "name": "lvm.conf",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/lvm.conf/5/json"
            },
            {
                "name": "lvmconfig",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/lvmconfig/8/json"
            },
            {
                "name": "lvmdevices",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/lvmdevices/8/json"
            },
            {
                "name": "pvchange",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/pvchange/8/json"
            },
            {
                "name": "pvck",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/pvck/8/json"
            },
            {
                "name": "pvdisplay",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/pvdisplay/8/json"
            },
            {
                "name": "pvmove",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/pvmove/8/json"
            },
            {
                "name": "pvremove",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/pvremove/8/json"
            },
            {
                "name": "pvresize",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/pvresize/8/json"
            },
            {
                "name": "pvs",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/pvs/8/json"
            },
            {
                "name": "pvscan",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/pvscan/8/json"
            },
            {
                "name": "vgcfgbackup",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/vgcfgbackup/8/json"
            },
            {
                "name": "vgcfgrestore",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/vgcfgrestore/8/json"
            },
            {
                "name": "vgchange",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/vgchange/8/json"
            },
            {
                "name": "vgck",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/vgck/8/json"
            },
            {
                "name": "vgcreate",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/vgcreate/8/json"
            },
            {
                "name": "vgconvert",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/vgconvert/8/json"
            },
            {
                "name": "vgdisplay",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/vgdisplay/8/json"
            },
            {
                "name": "vgexport",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/vgexport/8/json"
            },
            {
                "name": "vgextend",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/vgextend/8/json"
            },
            {
                "name": "vgimport",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/vgimport/8/json"
            },
            {
                "name": "vgimportclone",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/vgimportclone/8/json"
            },
            {
                "name": "vgimportdevices",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/vgimportdevices/8/json"
            },
            {
                "name": "vgmerge",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/vgmerge/8/json"
            },
            {
                "name": "vgmknodes",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/vgmknodes/8/json"
            },
            {
                "name": "vgreduce",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/vgreduce/8/json"
            },
            {
                "name": "vgremove",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/vgremove/8/json"
            },
            {
                "name": "vgrename",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/vgrename/8/json"
            },
            {
                "name": "vgs",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/vgs/8/json"
            },
            {
                "name": "vgscan",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/vgscan/8/json"
            },
            {
                "name": "vgsplit",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/vgsplit/8/json"
            },
            {
                "name": "lvcreate",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/lvcreate/8/json"
            },
            {
                "name": "lvchange",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/lvchange/8/json"
            },
            {
                "name": "lvconvert",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/lvconvert/8/json"
            },
            {
                "name": "lvdisplay",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/lvdisplay/8/json"
            },
            {
                "name": "lvextend",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/lvextend/8/json"
            },
            {
                "name": "lvreduce",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/lvreduce/8/json"
            },
            {
                "name": "lvremove",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/lvremove/8/json"
            },
            {
                "name": "lvrename",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/lvrename/8/json"
            },
            {
                "name": "lvresize",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/lvresize/8/json"
            },
            {
                "name": "lvs",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/lvs/8/json"
            },
            {
                "name": "lvscan",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/lvscan/8/json"
            },
            {
                "name": "lvm-fullreport",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/lvm-fullreport/8/json"
            },
            {
                "name": "lvm-lvpoll",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/lvm-lvpoll/8/json"
            },
            {
                "name": "blkdeactivate",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/blkdeactivate/8/json"
            },
            {
                "name": "lvmdump",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/lvmdump/8/json"
            },
            {
                "name": "dmeventd",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/dmeventd/8/json"
            },
            {
                "name": "lvmpolld",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/lvmpolld/8/json"
            },
            {
                "name": "lvmlockd",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/lvmlockd/8/json"
            },
            {
                "name": "lvmlockctl",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/lvmlockctl/8/json"
            },
            {
                "name": "cmirrord",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/cmirrord/8/json"
            },
            {
                "name": "lvmdbusd",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/lvmdbusd/8/json"
            },
            {
                "name": "fsadm",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/fsadm/8/json"
            },
            {
                "name": "lvmsystemid",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/lvmsystemid/7/json"
            },
            {
                "name": "lvmreport",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/lvmreport/7/json"
            },
            {
                "name": "lvmraid",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/lvmraid/7/json"
            },
            {
                "name": "lvmthin",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/lvmthin/7/json"
            },
            {
                "name": "lvmcache",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/lvmcache/7/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 12,
                "subsections": [
                    {
                        "name": "Metadata location, size, and alignment",
                        "lines": 47
                    }
                ]
            },
            {
                "name": "USAGE",
                "lines": 38,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 29,
                "subsections": [
                    {
                        "name": "-d --debug",
                        "lines": 17,
                        "flag": "-d",
                        "long": "--debug"
                    },
                    {
                        "name": "-f --force",
                        "lines": 2,
                        "flag": "-f",
                        "long": "--force"
                    },
                    {
                        "name": "-h --help",
                        "lines": 17,
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "--longhelp",
                        "lines": 11,
                        "long": "--longhelp"
                    },
                    {
                        "name": "-M --metadatatype lvm2",
                        "lines": 3,
                        "flag": "-M",
                        "long": "--metadatatype"
                    },
                    {
                        "name": "--nohints",
                        "lines": 4,
                        "long": "--nohints"
                    },
                    {
                        "name": "--nolocking",
                        "lines": 3,
                        "long": "--nolocking"
                    },
                    {
                        "name": "--norestorefile",
                        "lines": 14,
                        "long": "--norestorefile"
                    },
                    {
                        "name": "-q --quiet",
                        "lines": 22,
                        "flag": "-q",
                        "long": "--quiet"
                    },
                    {
                        "name": "-t --test",
                        "lines": 5,
                        "flag": "-t",
                        "long": "--test"
                    },
                    {
                        "name": "-u --uuid _",
                        "lines": 7,
                        "flag": "-u",
                        "long": "--uuid"
                    },
                    {
                        "name": "-v --verbose",
                        "lines": 3,
                        "flag": "-v",
                        "long": "--verbose"
                    },
                    {
                        "name": "--version",
                        "lines": 2,
                        "long": "--version"
                    },
                    {
                        "name": "-y --yes",
                        "lines": 3,
                        "flag": "-y",
                        "long": "--yes"
                    },
                    {
                        "name": "-Z --zero y",
                        "lines": 3,
                        "flag": "-Z",
                        "long": "--zero"
                    }
                ]
            },
            {
                "name": "VARIABLES",
                "lines": 17,
                "subsections": []
            },
            {
                "name": "ENVIRONMENT VARIABLES",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "EXAMPLES",
                "lines": 1,
                "subsections": [
                    {
                        "name": "pvcreate /dev/sdc4 /dev/sde",
                        "lines": 3
                    },
                    {
                        "name": "pvcreate --dataalignmentoffset 7s /dev/sdb",
                        "lines": 1
                    }
                ]
            },
            {
                "name": "SEE ALSO",
                "lines": 20,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "pvcreate — Initialize physical volume(s) for use by LVM\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "pvcreate positionargs\n[ optionargs ]\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "pvcreate  initializes  a  Physical Volume (PV) on a device so the device is recognized as be‐\nlonging to LVM.  This allows the PV to be used in a Volume Group (VG).  An LVM disk label  is\nwritten to the device, and LVM metadata areas are initialized.  A PV can be placed on a whole\ndevice or partition.\n\nUse vgcreate(8) to create a new VG on the PV, or vgextend(8) to add the PV to an existing VG.\nUse pvremove(8) to remove the LVM disk label from the device.\n\nThe  force  option  will  create a PV without confirmation.  Repeating the force option (-ff)\nwill forcibly create a PV, overriding checks that normally prevent it, e.g. if the PV is  al‐\nready in a VG.\n",
                "subsections": [
                    {
                        "name": "Metadata location, size, and alignment",
                        "content": "The LVM disk label begins 512 bytes from the start of the device, and is 512 bytes in size.\n\nThe  LVM  metadata  area begins at an offset (from the start of the device) equal to the page\nsize of the machine creating the PV (often 4 KiB.) The metadata  area  contains  a  512  byte\nheader and a multi-KiB circular buffer that holds text copies of the VG metadata.\n\nWith  default settings, the first physical extent (PE), which contains LV data, is 1 MiB from\nthe start of the device.  This location is controlled by defaultdataalignment in  lvm.conf,\nwhich  is set to 1 (MiB) by default.  The pestart will be a multiple of this many MiB.  This\nlocation can be checked with:\npvs -o pestart PV\n\nThe size of the LVM metadata area is the space between the the start of the metadata area and\nthe first PE.  When metadata begins at 4 KiB and the first PE is at 1024  KiB,  the  metadata\narea size is 1020 KiB.  This can be checked with:\npvs -o mdasize PV\n\nThe  mdasize cannot be increased after pvcreate, so if larger metadata is needed, it must be\nset during pvcreate.  Two copies of the VG metadata must always fit within the metadata area,\nso the maximum VG metadata size is around half the mdasize.  This can be checked with:\nvgs -o mdafree VG\n\nA larger metadata area can be set with --metadatasize.  The resulting mdasize may be  larger\nthan specified due to defaultdataalignment placing pestart on a MiB boundary, and the fact\nthat  the  metadata  area  extends  to the first PE.  With metadata starting at 4 KiB and de‐\nfaultdataalignment 1 (MiB), setting --metadatasize 2048k results in pestart of 3  MiB  and\nmdasize  of  3068 KiB.  Alternatively, --metadatasize 2044k results in pestart at 2 MiB and\nmdasize of 2044 KiB.\n\nThe alignment of pestart described above may be automatically overridden based on md  device\nproperties  or  device  i/o properties reported in sysfs.  These automatic adjustments can be\nenabled/disabled using lvm.conf settings mdchunkalignment and  dataalignmentoffsetdetec‐\ntion.\n\nTo  use  a  different pestart alignment, use the --dataalignment option.  The --metadatasize\noption would also typically be used in this case because the metadata area size  also  deter‐\nmines  the  location  of pestart.  When using these two options together, pestart is calcu‐\nlated as: metadata area start (page size), plus the specified --metadatasize, rounded  up  to\nthe next multiple of --dataalignment.  With metadata starting at 4 KiB, --metadatasize 2048k,\nand  --dataalignment  128k,  pestart  is 2176 KiB and mdasize is 2172 KiB.  The pestart of\n2176 KiB is the nearest even multiple of 128 KiB that provides at least 2048 KiB of  metadata\nspace.  Always check the resulting alignment and metadata size when using these options.\n\nTo  shift  an  aligned  pestart  value,  use the --dataalignmentoffset option.  The pestart\nalignment is calculated as described above, and then the value  specified  with  --dataalign‐\nmentoffset is added to produce the final pestart value.\n"
                    }
                ]
            },
            "USAGE": {
                "content": "pvcreate PV ...\n[ -f|--force ]\n[ -M|--metadatatype lvm2 ]\n[ -u|--uuid String ]\n[ -Z|--zero y|n ]\n[    --dataalignment Size[k|UNIT] ]\n[    --dataalignmentoffset Size[k|UNIT] ]\n[    --bootloaderareasize Size[m|UNIT] ]\n[    --labelsector Number ]\n[    --[pv]metadatacopies 0|1|2 ]\n[    --metadatasize Size[m|UNIT] ]\n[    --metadataignore y|n ]\n[    --norestorefile ]\n[    --setphysicalvolumesize Size[m|UNIT] ]\n[    --reportformat basic|json ]\n[    --restorefile String ]\n[ COMMONOPTIONS ]\n\nCommon options for lvm:\n[ -d|--debug ]\n[ -h|--help ]\n[ -q|--quiet ]\n[ -t|--test ]\n[ -v|--verbose ]\n[ -y|--yes ]\n[    --commandprofile String ]\n[    --config String ]\n[    --devices PV ]\n[    --devicesfile String ]\n[    --driverloaded y|n ]\n[    --journal String ]\n[    --lockopt String ]\n[    --longhelp ]\n[    --nohints ]\n[    --nolocking ]\n[    --profile String ]\n[    --version ]\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "--bootloaderareasize Size[m|UNIT]\nReserve  space for the bootloader between the LVM metadata area and the first PE.  The\nbootloader area is reserved for bootloaders to embed their own data or  metadata;  LVM\nwill not use it.  The bootloader area begins where the first PE would otherwise be lo‐\ncated.   The  first PE is moved out by the size of the bootloader area, and then moved\nout further if necessary to match the data alignment.  The  start  of  the  bootloader\narea  is always aligned, see also --dataalignment and --dataalignmentoffset. The boot‐\nloader area may be larger than requested due to the alignment,  but  it's  never  less\nthan  the requested size.  To see the bootloader area start and size of an existing PV\nuse pvs -o +pvbastart,pvbasize.\n\n--commandprofile String\nThe command profile to use for command configuration.  See lvm.conf(5) for more infor‐\nmation about profiles.\n\n--config String\nConfig settings for the command. These override lvm.conf(5) settings.  The String  arg\nuses the same format as lvm.conf(5), or may use section/field syntax.  See lvm.conf(5)\nfor more information about config.\n\n--dataalignment Size[k|UNIT]\nAlign the start of a PV data area with a multiple of this number.  To see the location\nof  the  first  Physical Extent (PE) of an existing PV, use pvs -o +pestart. In addi‐\ntion, it may be shifted by an alignment offset, see --dataalignmentoffset.  Also spec‐\nify an appropriate PE size when creating a VG.\n\n--dataalignmentoffset Size[k|UNIT]\nShift the start of the PV data area by this additional offset.\n",
                "subsections": [
                    {
                        "name": "-d --debug",
                        "content": "Set debug level. Repeat from 1 to 6 times to increase the detail of messages  sent  to\nthe log file and/or syslog (if configured).\n\n--devices PV\nRestricts  the  devices  that  are visible and accessible to the command.  Devices not\nlisted will appear to be missing. This option can be repeated, or accepts a comma sep‐\narated list of devices. This overrides the devices file.\n\n--devicesfile String\nA file listing devices that LVM should use.  The file must exist in  /etc/lvm/devices/\nand  is  managed  with  the lvmdevices(8) command.  This overrides the lvm.conf(5) de‐\nvices/devicesfile and devices/usedevicesfile settings.\n\n--driverloaded y|n\nIf set to no, the command will not attempt to use device-mapper.  For testing and  de‐\nbugging.\n",
                        "flag": "-d",
                        "long": "--debug"
                    },
                    {
                        "name": "-f --force",
                        "content": "Override various checks, confirmations and protections.  Use with extreme caution.\n",
                        "flag": "-f",
                        "long": "--force"
                    },
                    {
                        "name": "-h --help",
                        "content": "Display help text.\n\n--journal String\nRecord  information in the systemd journal.  This information is in addition to infor‐\nmation enabled by the lvm.conf log/journal setting.  command: record information about\nthe command.  output: record the default command output.  debug: record  full  command\ndebugging.\n\n--labelsector Number\nBy default the PV is labelled with an LVM2 identifier in its second sector (sector 1).\nThis  lets  you use a different sector near the start of the disk (between 0 and 3 in‐\nclusive - see LABELSCANSECTORS in the source). Use with care.\n\n--lockopt String\nUsed to pass options for special cases to lvmlockd.  See lvmlockd(8) for more informa‐\ntion.\n",
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "--longhelp",
                        "content": "Display long help text.\n\n--metadataignore y|n\nSpecifies the metadataignore property of a PV.  If yes, metadata areas on the  PV  are\nignored,  and lvm will not store metadata in the metadata areas of the PV.  If no, lvm\nwill store metadata on the PV.\n\n--metadatasize Size[m|UNIT]\nThe approximate amount of space used for each VG  metadata  area.   The  size  may  be\nrounded.\n",
                        "long": "--longhelp"
                    },
                    {
                        "name": "-M --metadatatype lvm2",
                        "content": "Specifies the type of on-disk metadata to use.  lvm2 (or just 2) is the current, stan‐\ndard format.  lvm1 (or just 1) is no longer used.\n",
                        "flag": "-M",
                        "long": "--metadatatype"
                    },
                    {
                        "name": "--nohints",
                        "content": "Do  not  use the hints file to locate devices for PVs. A command may read more devices\nto find PVs when hints are not used. The command will still perform standard hint file\ninvalidation where appropriate.\n",
                        "long": "--nohints"
                    },
                    {
                        "name": "--nolocking",
                        "content": "Disable locking. Use with caution, concurrent commands may produce incorrect  results.\n\n",
                        "long": "--nolocking"
                    },
                    {
                        "name": "--norestorefile",
                        "content": "In  conjunction with --uuid, this allows a uuid to be specified without also requiring\nthat a backup of the metadata be provided.\n\n--profile String\nAn alias for --commandprofile or --metadataprofile, depending on the command.\n\n--[pv]metadatacopies 0|1|2\nThe number of metadata areas to set aside on a PV for storing VG  metadata.   When  2,\none  copy  of  the  VG  metadata is stored at the front of the PV and a second copy is\nstored at the end.  When 1, one copy of the VG metadata is stored at the front of  the\nPV.   When  0,  no  copies of the VG metadata are stored on the given PV.  This may be\nuseful in VGs containing many PVs (this places  limitations  on  the  ability  to  use\nvgsplit later.)\n",
                        "long": "--norestorefile"
                    },
                    {
                        "name": "-q --quiet",
                        "content": "Suppress  output  and  log  messages. Overrides --debug and --verbose.  Repeat once to\nalso suppress any prompts with answer 'no'.\n\n--reportformat basic|json\nOverrides current output format for reports which  is  defined  globally  by  the  re‐\nport/outputformat  setting in lvm.conf(5).  basic is the original format with columns\nand rows.  If there is more than one report per command, each report is prefixed  with\nthe  report  name  for identification. json produces report output in JSON format. See\nlvmreport(7) for more information.\n\n--restorefile String\nIn conjunction with --uuid, this reads the file (produced  by  vgcfgbackup),  extracts\nthe location and size of the data on the PV, and ensures that the metadata produced by\nthe  program  is  consistent  with the contents of the file, i.e. the physical extents\nwill be in the same place and not be overwritten by  new  metadata.  This  provides  a\nmechanism  to  upgrade  the  metadata format or to add/remove metadata areas. Use with\ncare.\n\n--setphysicalvolumesize Size[m|UNIT]\nOverrides the automatically detected size of the PV.  Use with care, or prior  to  re‐\nducing the physical size of the device.\n",
                        "flag": "-q",
                        "long": "--quiet"
                    },
                    {
                        "name": "-t --test",
                        "content": "Run in test mode. Commands will not update metadata.  This is implemented by disabling\nall  metadata writing but nevertheless returning success to the calling function. This\nmay lead to unusual error messages in multi-stage operations if a tool relies on read‐\ning back metadata it believes has changed but hasn't.\n",
                        "flag": "-t",
                        "long": "--test"
                    },
                    {
                        "name": "-u --uuid _",
                        "content": "Specify a UUID for the device.  Without this option, a random UUID is generated.  This\noption is needed before restoring a backup of LVM metadata onto a replacement  device;\nsee  vgcfgrestore(8).  As  such, use of --restorefile is compulsory unless the --nore‐\nstorefile is used.  All PVs must have unique UUIDs, and LVM will prevent certain oper‐\nations if multiple devices are seen with the same UUID.  See vgimportclone(8) for more\ninformation.\n",
                        "flag": "-u",
                        "long": "--uuid"
                    },
                    {
                        "name": "-v --verbose",
                        "content": "Set verbose level. Repeat from 1 to 4 times to increase the detail of messages sent to\nstdout and stderr.\n",
                        "flag": "-v",
                        "long": "--verbose"
                    },
                    {
                        "name": "--version",
                        "content": "Display version information.\n",
                        "long": "--version"
                    },
                    {
                        "name": "-y --yes",
                        "content": "Do not prompt for confirmation interactively but always assume  the  answer  yes.  Use\nwith extreme caution.  (For automatic no, see -qq.)\n",
                        "flag": "-y",
                        "long": "--yes"
                    },
                    {
                        "name": "-Z --zero y",
                        "content": "Controls  if the first 4 sectors (2048 bytes) of the device are wiped.  The default is\nto wipe these sectors unless either or both of --restorefile or --uuid are specified.\n",
                        "flag": "-Z",
                        "long": "--zero"
                    }
                ]
            },
            "VARIABLES": {
                "content": "PV     Physical Volume name, a device path under /dev.  For commands  managing  physical  ex‐\ntents,  a PV positional arg generally accepts a suffix indicating a range (or multiple\nranges) of physical extents (PEs). When the first PE is omitted, it  defaults  to  the\nstart  of  the  device, and when the last PE is omitted it defaults to end.  Start and\nend range (inclusive): PV[:PE-PE]...   Start  and  length  range  (counting  from  0):\nPV[:PE+PE]...\n\nString See the option description for information about the string content.\n\nSize[UNIT]\nSize is an input number that accepts an optional unit.  Input units are always treated\nas base two values, regardless of capitalization, e.g. 'k' and 'K' both refer to 1024.\nThe  default  input  unit  is specified by letter, followed by |UNIT.  UNIT represents\nother possible input units: b|B is bytes, s|S is sectors of 512 bytes, k|K is KiB, m|M\nis MiB, g|G is GiB, t|T is TiB, p|P is PiB, e|E is EiB.  (This should not be  confused\nwith the output control --units, where capital letters mean multiple of 1000.)\n",
                "subsections": []
            },
            "ENVIRONMENT VARIABLES": {
                "content": "See lvm(8) for information about environment variables used by lvm.  For example, LVMVGNAME\ncan generally be substituted for a required VG parameter.\n",
                "subsections": []
            },
            "EXAMPLES": {
                "content": "Initialize a partition and a full device.",
                "subsections": [
                    {
                        "name": "pvcreate /dev/sdc4 /dev/sde",
                        "content": "If a device is a 4KiB sector drive that compensates for windows partitioning (sector 7 is the\nlowest aligned logical block, the 4KiB sectors start at LBA -1, and consequently sector 63 is\naligned on a 4KiB boundary) manually account for this when initializing for use by LVM."
                    },
                    {
                        "name": "pvcreate --dataalignmentoffset 7s /dev/sdb",
                        "content": ""
                    }
                ]
            },
            "SEE ALSO": {
                "content": "lvm(8), lvm.conf(5), lvmconfig(8), lvmdevices(8),\n\npvchange(8), pvck(8), pvcreate(8), pvdisplay(8), pvmove(8), pvremove(8), pvresize(8), pvs(8),\npvscan(8),\n\nvgcfgbackup(8), vgcfgrestore(8), vgchange(8), vgck(8), vgcreate(8), vgconvert(8),\nvgdisplay(8), vgexport(8), vgextend(8), vgimport(8), vgimportclone(8), vgimportdevices(8),\nvgmerge(8), vgmknodes(8), vgreduce(8), vgremove(8), vgrename(8), vgs(8), vgscan(8),\nvgsplit(8),\n\nlvcreate(8), lvchange(8), lvconvert(8), lvdisplay(8), lvextend(8), lvreduce(8), lvremove(8),\nlvrename(8), lvresize(8), lvs(8), lvscan(8),\n\nlvm-fullreport(8), lvm-lvpoll(8), blkdeactivate(8), lvmdump(8),\n\ndmeventd(8), lvmpolld(8), lvmlockd(8), lvmlockctl(8), cmirrord(8), lvmdbusd(8), fsadm(8),\n\nlvmsystemid(7), lvmreport(7), lvmraid(7), lvmthin(7), lvmcache(7)\n\nRed Hat, Inc.                     LVM TOOLS 2.03.16(2) (2022-05-18)                      PVCREATE(8)",
                "subsections": []
            }
        }
    }
}