Difference between revisions of "Pvs"

From wikieduonline
Jump to navigation Jump to search
 
(20 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[LVM]]
+
{{lc}}
 +
<code>pvs</code><ref>http://man7.org/linux/man-pages/man8/pvs.8.html</ref> Display information about physical volumes
  
 +
<code>pvs</code> can hang if some device has been removed under some circumstances.
  
 +
== Examples ==
 +
pvs
 +
(No output if not devices, see [[pvcreate]])
  
== Examples ==
+
pvs
:<code>pvs</code>
+
  PV        VG Fmt  Attr PSize  PFree
:No output if not devices
+
  [[/dev/sd]]b      [[lvm2]] ---  50.00g 50.00g
  
 
Example output, with one PV create but not assigned to any VG:
 
Example output, with one PV create but not assigned to any VG:
Line 13: Line 18:
 
   /dev/mapper/3600a09803831416c592b4f566453764t            lvm2 ---  250.00g 250.00g
 
   /dev/mapper/3600a09803831416c592b4f566453764t            lvm2 ---  250.00g 250.00g
 
   /dev/sdc4                                      VG2    lvm2 a--    <8.28t 100.00g
 
   /dev/sdc4                                      VG2    lvm2 a--    <8.28t 100.00g
 +
</pre>
 +
 +
Output with missing device:
 +
<pre>pvs
 +
  WARNING: Device for PV R3Hfm8-5J2Z-Tl59-5Q5O-ZpDq-foNa-SGpQst not found or rejected by a filter.
 +
  PV                                              VG      Fmt  Attr PSize    PFree
 +
  /dev/mapper/3600508b1001c553702fe495119c850f1p1 VG1 lvm2 a--  <446.60g  32.00m
 +
  /dev/mapper/3600a09803831416c592b4f566453764t            lvm2 ---  250.00g 250.00g
 +
  /dev/sdc4                                      VG2    lvm2 a--    <8.28t 100.00g
 +
</pre>
 +
 +
<pre>
 +
pvs --segments
 +
        PV        VG Fmt  Attr PSize  PFree  Start SSize
 +
        /dev/sda  vg lvm2 a--  100.00m 88.00m    0    1
 +
        /dev/sda  vg lvm2 a--  100.00m 88.00m    1    1
 +
        /dev/sda  vg lvm2 a--  100.00m 88.00m    2    1
 +
        /dev/sda  vg lvm2 a--  100.00m 88.00m    3    22
 +
        /dev/sdb  vg lvm2 a--  100.00m 92.00m    0    1
 +
        /dev/sdb  vg lvm2 a--  100.00m 92.00m    1    1
 +
        /dev/sdb  vg lvm2 a--  100.00m 92.00m    2    23
 
</pre>
 
</pre>
  
  
 +
<code>
 +
pvs -o pv_free
 +
</code>
 +
 +
== Related ==
 +
* <code>[[lvs]]</code>
  
 
== Activities ==
 
== Activities ==
* Review <code>no_path_retry</code> configuration options to avoid [[pvs]] to hang : https://www.suse.com/support/kb/doc/?id=7022310
+
* Change <code>no_path_retry</code> to <code>no_path_retry queue</code> in <code>[[multipath.conf]]</code><ref>http://manpages.org/multipathconf/5</ref> configuration options to avoid <code>[[pvs]]</code> to hang : https://www.suse.com/support/kb/doc/?id=7022310
 
 
  
 
== See also ==
 
== See also ==
* [[dmsetup]] ls and [[multipath]] -ll
+
* <code>[[dmsetup]] ls</code> and <code>[[multipath]] -ll</code>
 
* {{lvm commands}}
 
* {{lvm commands}}
 +
* {{Linux block devices}}
  
  
 
[[Category:Linux]]
 
[[Category:Linux]]

Latest revision as of 09:54, 8 February 2023

pvs[1] Display information about physical volumes

pvs can hang if some device has been removed under some circumstances.

Examples[edit]

pvs
(No output if not devices, see pvcreate)
pvs
 PV         VG Fmt  Attr PSize  PFree
 /dev/sdb      lvm2 ---  50.00g 50.00g

Example output, with one PV create but not assigned to any VG:

pvs
  PV                                              VG       Fmt  Attr PSize    PFree
  /dev/mapper/3600508b1001c553702fe495119c850f1p1 VG1 lvm2 a--  <446.60g  32.00m
  /dev/mapper/3600a09803831416c592b4f566453764t            lvm2 ---   250.00g 250.00g
  /dev/sdc4                                       VG2     lvm2 a--    <8.28t 100.00g

Output with missing device:

pvs
  WARNING: Device for PV R3Hfm8-5J2Z-Tl59-5Q5O-ZpDq-foNa-SGpQst not found or rejected by a filter.
  PV                                              VG       Fmt  Attr PSize    PFree
  /dev/mapper/3600508b1001c553702fe495119c850f1p1 VG1 lvm2 a--  <446.60g  32.00m
  /dev/mapper/3600a09803831416c592b4f566453764t            lvm2 ---   250.00g 250.00g
  /dev/sdc4                                       VG2     lvm2 a--    <8.28t 100.00g
pvs --segments
         PV         VG Fmt  Attr PSize   PFree  Start SSize
         /dev/sda   vg lvm2 a--  100.00m 88.00m     0     1
         /dev/sda   vg lvm2 a--  100.00m 88.00m     1     1
         /dev/sda   vg lvm2 a--  100.00m 88.00m     2     1
         /dev/sda   vg lvm2 a--  100.00m 88.00m     3    22
         /dev/sdb   vg lvm2 a--  100.00m 92.00m     0     1
         /dev/sdb   vg lvm2 a--  100.00m 92.00m     1     1
         /dev/sdb   vg lvm2 a--  100.00m 92.00m     2    23


pvs -o pv_free

Related[edit]

Activities[edit]

See also[edit]

scan: pvscan vgscan
LVM: lvs lvmscan lvm fullreport lvmreport lvmconfig lvmdump lvmcheck lvm dumpconfig
Scan: pvs vgs lvs pvscan vgscan
PV: pvcreate pvremove pvscan pvremove pvscan pvs pvchange pvck pvdisplay pvresize
LV: lvdisplay lvcreate lvremove, lvresize, lvextend, lvreduce, lvrename
VG: vgdisplay,vgcreate,vgremove, vgextend, vgreduce, vgscan, vgchange, vgrename, vgcfgbackup, vgcfgrestore, vgimportclone, vgck
Check commands: pvck vgck
  • http://man7.org/linux/man-pages/man8/pvs.8.html
  • http://manpages.org/multipathconf/5
  • Advertising: