forked from linux/documentation
50 lines
2.1 KiB
Markdown
50 lines
2.1 KiB
Markdown
# LVM
|
|
|
|
## Overview
|
|
First to get an overview of the block device setup on the system:
|
|
|
|
```
|
|
# lsblk --fs
|
|
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
|
|
sda
|
|
├─sda1 vfat FAT32 AB56-C193 591.7M 1% /boot/efi
|
|
├─sda2 ext4 1.0 e2e5800e-c969-4c63-b7c4-7dccc632ffac 594.7M 32% /boot
|
|
├─sda3 swap 1 6ca673ab-3ccf-4052-a4c9-0f64346446f7 [SWAP]
|
|
└─sda4 LVM2_member LVM2 001 vHm4BU-Sz6m-H5me-ZePd-2OHO-XlUy-FM8deG
|
|
├─vg_root-lv_root xfs 57165c32-8a96-4315-8d1a-94249101cd7f 3.7G 77% /
|
|
├─vg_root-lv_var_log xfs 54cb726f-2efb-4490-a276-19751161ba76 2.6G 34% /var/log
|
|
├─vg_root-lv_var xfs 4cc85d54-680b-4f51-89f1-d942d7793ad2 8.1G 49% /var
|
|
├─vg_root-lv_tmp xfs 8325668b-4be4-44f0-a0c3-6d347aa974fd 1.9G 2% /tmp
|
|
└─vg_root-lv_home xfs 469ab242-2cdb-488f-9440-aae9c8f185bd 13G 35% /home
|
|
sr0
|
|
#
|
|
```
|
|
|
|
and configured in LVM as physical volumes:
|
|
|
|
```
|
|
# pvs
|
|
PV VG Fmt Attr PSize PFree
|
|
/dev/sda4 vg_root lvm2 a-- <58.38g 384.00m
|
|
#
|
|
```
|
|
|
|
and the logical volumes:
|
|
|
|
```
|
|
# lvs
|
|
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
|
|
lv_home vg_root -wi-ao---- 20.00g
|
|
lv_root vg_root -wi-ao---- 16.00g
|
|
lv_tmp vg_root -wi-ao---- 2.00g
|
|
lv_var vg_root -wi-ao---- 16.00g
|
|
lv_var_log vg_root -wi-ao---- 4.00g
|
|
#
|
|
```
|
|
|
|
## Recovering a Lost LVM Volume Disk
|
|
|
|
This [guide](https://www.suse.com/c/recovering-lost-lvm-volume-disk/) is rather helpful in doing so.
|
|
|
|
If you miss physical volumes you see in the block device setup (`lsblk --fs`), then you should check out if there is a `filter` setting in `/etc/lvm/lvm.conf` or some device files in `/etc/lvm/devices/`. If you want to see everything in the LVM tools you should remove these device files and the filter setting.
|