LVM Linux volume management

Why ?

Notes

vgchange -a n
vgscan --mknodes (may not be necessary, but won't hurt)
vgexport -a
vgimport -a
vgchange -a y

That should bring them back to life.

2021 Grow LVM

  1. Increase the disk (e.g. AWS resize)
  2. On linux check that size is visible with

    lsblk
    xvdf             202:80   0 1000G  0 disk
    └─xvdf1          202:81   0  500G  0 part
      └─home         253:0    0  500G  0 lvm  /home
  3. If partition used for LVM grow it to full size, param: diskname <partition #>

    growpart /dev/xvdf  1
  4. Grow lvm physical volume

    pvs
    pvresize /dev/xvdf1
    pvs
  5. Grow volume group

    vgs
  6. Grow actual volume (--resizefs also resizes underlying filesystem)

    lvextend --resizefs --extents +100%FREE </dev/<lvg>/volume name>
    df -h

2020 add disk to existing centos Linux


CategoryLinux

linux/LVM (last edited 2021-08-27 00:50:43 by PieterSmit)