If you set up lvm and are using a logical volume on a volume group, you may reach the point where the volume gets full and needs to be extended. The following steps are a quick tip how to do this.
The steps are base on the assumption that there is some space left in the volumegroup and the volume is formatted with ext4.
The volume may be extended even if it is mounted and in use.
- Make a backup
- really, make a backup!
- now do create a backup! I warned you!
- ok ok, just run the commands, but do not cry if you loose some data…
- lvextend -L +16G /dev/mapper/vgname-lvname
- resize2fs -p /dev/mapper/vgname-lvname
I know, you’ll find this solution if you google for it… Now I wrote this, I will not have to google anymore ;-)