rss logo

LVM

Here are some useful commands to manage LVM.

Configuration

Commands

Display informations

root@host:~# pvdisplay
root@host:~# vgdisplay
root@host:~# lvdisplay

Create

root@host:~# pvcreate /dev/sda1
root@host:~# vgcreate vg01 /dev/sda1
root@host:~# lvcreate -L 15G -n lv01 vg01

Extend a ext2/ext3/ext4 volume (here with /tmp)

root@host:~# umount /tmp
root@host:~# lvextend -L+10G /dev/mapper/tmp
root@host:~# resize2fs /dev/mapper/tmp
root@host:~# mount /tmp

Activate logicals volumes

root@host:~# vgchange -ay VGNAME
root@host:~# lvchange -ay LVNAME
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Contact :

contact mail address