Dit deel is nog niet vertaald. Je ziet de Engelse tekst.
Wat het doet
pvs prints one line per PV with its VG, size and free space. pvdisplay shows all details (PE size, total and free PEs, UUID). With -o you choose report columns and with -S you filter. pvscan scans devices for PVs and can trigger auto-activation.
Zo schrijf je het
pvs [OPTION]... [PV...]
pvdisplay [OPTION]... [PV...]
pvscan [OPTION]...Opties 34
Meest gebruikt
Report (pvs, also lvs/vgs)
pvdisplay
pvscan
Common LVM options
Niets past bij dit filter.
Voorbeelden 10
$ als gewone gebruiker# als root (of met sudo)
1All PVs
pvs PV VG Fmt Attr PSize PFree /dev/vda2 rhel lvm2 a-- <19.00g 0 /dev/vdb1 vgdata lvm2 a-- <5.00g 1.00gPFree = free space on that PV.
2Details of one PV
pvdisplay /dev/vdb1PE Size, Total PE, Free PE, Allocated PE, UUID.
3Which LVs use this PV?
pvdisplay -m /dev/vdb1Needed before you remove a disk.
4Own columns
pvs -o pv_name,vg_name,pv_size,pv_free,dev_sizedev_size shows the size of the device itself.
5PVs with free space
pvs -S 'pv_free>0'Where can new LVs go?
6Sizes in MiB for scripts
pvs --units m --nosuffix --noheadings -o pv_free /dev/vdb1Just a number.
7JSON
pvs --reportformat jsonFor automation.
8PVs not in any VG
pvscan -nNew disks ready to use.
9Scan after adding disks
pvscan --cacheUpdates LVM's view of devices.
10Segments of a PV
pvs --segments -o +lv_nameWhich LV uses which extents.
Niets past bij dit filter.
Exitcodes
0 | Done. |
5 | Error. |