Dit deel is nog niet vertaald. Je ziet de Engelse tekst.
Wat het doet
lvs prints one line per LV with its VG, attributes, size, and for snapshots and thin volumes the data use. lvdisplay gives the device path, UUID, status and extent count. lvscan lists all LVs with their state (ACTIVE/inactive).
Zo schrijf je het
lvs [OPTION]... [VG|VG/LV...]
lvdisplay [OPTION]... [VG|VG/LV...]
lvscan [OPTION]...Opties 28
Meest gebruikt
Report (lvs)
Common LVM options
Niets past bij dit filter.
Voorbeelden 10
$ als gewone gebruiker# als root (of met sudo)
1All LVs
lvs LV VG Attr LSize Pool Origin Data% Meta% root rhel -wi-ao---- <17.00g swap rhel -wi-ao---- 2.00g lvdata vgdata -wi-ao---- 5.00ga = active, o = open (mounted).
2Details with path
lvdisplay /dev/vgdata/lvdataLV Path, UUID, LV Size, Current LE.
3Which disks does an LV use?
lvs -o +devicesImportant before removing a PV.
4Size in MiB or extents
lvs --units m; lvs -o lv_name,seg_size_peCheck exam tasks with extents.
5Snapshot and thin use
lvs -o lv_name,origin,data_percent,metadata_percentA full snapshot becomes invalid; a full thin pool stops writes.
6All LVs including hidden ones
lvs -aPool data, metadata and RAID images.
7Extent map
lvdisplay -m /dev/vgdata/lvdataWhich PV ranges are used.
8List with state
lvscan ACTIVE '/dev/rhel/root' [<17.00 GiB] inheritInactive LVs cannot be mounted (vgchange -ay).
9JSON
lvs --reportformat json -o lv_name,lv_size,vg_nameFor automation.
10Large LVs only
lvs -S 'lv_size>10g'Filter the report.
Niets past bij dit filter.
Exitcodes
0 | Done. |
5 | Error. |