1PVCK(8)                     System Manager's Manual                    PVCK(8)
2
3
4

NAME

6       pvck - Check metadata on physical volumes
7

SYNOPSIS

9       pvck option_args position_args
10           [ option_args ]
11

DESCRIPTION

13       pvck checks LVM metadata on PVs.
14
15       Use the --dump option to extract metadata from PVs for debugging.  With
16       dump, set --pvmetadatacopies 2 to extract metadata from a second  meta‐
17       data  area  at the end of the device. Use the --file option to save the
18       raw metadata to a specified file. (The raw metadata is not usable  with
19       vgcfgbackup and vgcfgrestore.)
20
21

USAGE

23       Check for metadata on a device
24
25       pvck PV ...
26           [ COMMON_OPTIONS ]
27
28       Print metadata from a device
29
30       pvck --dump String PV
31           [ -f|--file String ]
32           [    --[pv]metadatacopies 0|1|2 ]
33           [ COMMON_OPTIONS ]
34
35       Common options for command:
36           [    --labelsector Number ]
37
38       Common options for lvm:
39           [ -d|--debug ]
40           [ -h|--help ]
41           [ -q|--quiet ]
42           [ -t|--test ]
43           [ -v|--verbose ]
44           [ -y|--yes ]
45           [    --commandprofile String ]
46           [    --config String ]
47           [    --driverloaded y|n ]
48           [    --lockopt String ]
49           [    --longhelp ]
50           [    --nolocking ]
51           [    --profile String ]
52           [    --version ]
53

OPTIONS

55       --commandprofile String
56              The command profile to use for command configuration.  See
57              lvm.conf(5) for more information about profiles.
58
59       --config String
60              Config settings for the command. These override lvm.conf set‐
61              tings.  The String arg uses the same format as lvm.conf, or may
62              use section/field syntax.  See lvm.conf(5) for more information
63              about config.
64
65       -d|--debug ...
66              Set debug level. Repeat from 1 to 6 times to increase the detail
67              of messages sent to the log file and/or syslog (if configured).
68
69       --driverloaded y|n
70              If set to no, the command will not attempt to use device-mapper.
71              For testing and debugging.
72
73       --dump String
74              Dump metadata from a PV. Option values include metadata to print
75              or save the current text metadata, metadata_area to save the
76              entire text metadata area to a file, metadata_all to save the
77              current and any previous complete versions of metadata to a
78              file, and headers to print and check LVM headers.
79
80       -f|--file String
81
82       -h|--help
83              Display help text.
84
85       --labelsector Number
86              By default the PV is labelled with an LVM2 identifier in its
87              second sector (sector 1). This lets you use a different sector
88              near the start of the disk (between 0 and 3 inclusive - see
89              LABEL_SCAN_SECTORS in the source). Use with care.
90
91       --lockopt String
92              Used to pass options for special cases to lvmlockd.  See lvm‐
93              lockd(8) for more information.
94
95       --longhelp
96              Display long help text.
97
98       --nolocking
99              Disable locking.
100
101       --profile String
102              An alias for --commandprofile or --metadataprofile, depending on
103              the command.
104
105       --[pv]metadatacopies 0|1|2
106              The number of metadata areas to set aside on a PV for storing VG
107              metadata.  When 2, one copy of the VG metadata is stored at the
108              front of the PV and a second copy is stored at the end.  When 1,
109              one copy of the VG metadata is stored at the front of the PV.
110              When 0, no copies of the VG metadata are stored on the given PV.
111              This may be useful in VGs containing many PVs (this places limi‐
112              tations on the ability to use vgsplit later.)
113
114       -q|--quiet ...
115              Suppress output and log messages. Overrides --debug and --ver‐
116              bose.  Repeat once to also suppress any prompts with answer
117              'no'.
118
119       -t|--test
120              Run in test mode. Commands will not update metadata.  This is
121              implemented by disabling all metadata writing but nevertheless
122              returning success to the calling function. This may lead to
123              unusual error messages in multi-stage operations if a tool
124              relies on reading back metadata it believes has changed but
125              hasn't.
126
127       -v|--verbose ...
128              Set verbose level. Repeat from 1 to 4 times to increase the
129              detail of messages sent to stdout and stderr.
130
131       --version
132              Display version information.
133
134       -y|--yes
135              Do not prompt for confirmation interactively but always assume
136              the answer yes. Use with extreme caution.  (For automatic no,
137              see -qq.)
138

VARIABLES

140       PV
141              Physical Volume name, a device path under  /dev.   For  commands
142              managing physical extents, a PV positional arg generally accepts
143              a suffix indicating a range (or  multiple  ranges)  of  physical
144              extents  (PEs). When the first PE is omitted, it defaults to the
145              start of the device, and when the last PE is omitted it defaults
146              to  end.   Start and end range (inclusive): PV[:PE-PE]...  Start
147              and length range (counting from 0): PV[:PE+PE]...
148
149       String
150              See the option description for information about the string con‐
151              tent.
152
153       Size[UNIT]
154              Size  is  an  input number that accepts an optional unit.  Input
155              units are always treated as base two values, regardless of capi‐
156              talization,  e.g.  'k'  and 'K' both refer to 1024.  The default
157              input unit is specified by letter, followed by |UNIT.  UNIT rep‐
158              resents  other  possible  input units: bBsSkKmMgGtTpPeE.  b|B is
159              bytes, s|S is sectors of 512 bytes, k|K  is  kilobytes,  m|M  is
160              megabytes, g|G is gigabytes, t|T is terabytes, p|P is petabytes,
161              e|E is exabytes.  (This should not be confused with  the  output
162              control --units, where capital letters mean multiple of 1000.)
163

ENVIRONMENT VARIABLES

165       See  lvm(8)  for  information  about environment variables used by lvm.
166       For example, LVM_VG_NAME can generally be substituted for a required VG
167       parameter.
168

EXAMPLES

170       If  the  partition table is corrupted or lost on /dev/sda, and you sus‐
171       pect there was an LVM partition at approximately  100  MiB,  then  this
172       area  of the disk can be scanned using the --labelsector parameter with
173       a value of 204800 (100 * 1024 * 1024 / 512 = 204800).
174       pvck --labelsector 204800 /dev/sda
175

SEE ALSO

177       lvm(8) lvm.conf(5) lvmconfig(8)
178
179       pvchange(8)  pvck(8)  pvcreate(8)  pvdisplay(8)  pvmove(8)  pvremove(8)
180       pvresize(8) pvs(8) pvscan(8)
181
182       vgcfgbackup(8)  vgcfgrestore(8)  vgchange(8) vgck(8) vgcreate(8) vgcon‐
183       vert(8)  vgdisplay(8)  vgexport(8)  vgextend(8)  vgimport(8)  vgimport‐
184       clone(8)  vgmerge(8)  vgmknodes(8)  vgreduce(8) vgremove(8) vgrename(8)
185       vgs(8) vgscan(8) vgsplit(8)
186
187       lvcreate(8) lvchange(8)  lvconvert(8)  lvdisplay(8)  lvextend(8)  lvre‐
188       duce(8) lvremove(8) lvrename(8) lvresize(8) lvs(8) lvscan(8)
189
190       lvm-fullreport(8) lvm-lvpoll(8) lvm2-activation-generator(8) blkdeacti‐
191       vate(8) lvmdump(8)
192
193       dmeventd(8) lvmpolld(8)  lvmlockd(8)  lvmlockctl(8)  cmirrord(8)  lvmd‐
194       busd(8)
195
196       lvmsystemid(7) lvmreport(7) lvmraid(7) lvmthin(7) lvmcache(7)
197
198
199
200Red Hat, Inc.          LVM TOOLS 2.03.06(2) (2019-10-23)               PVCK(8)
Impressum