LVM disk resize in proxmox

Firts step, resize the disk in proxmox GUI

Adjust parameters to local values and then run the script:

# 1st step:  increase/resize disque  from  GUI console


# 2nd step : Extend physical drive partition
# check free space : 
$sudo fdisk -l

# Extend physical drive partition 
$sudo growpart /dev/sda 3    

# See  phisical drive
$sudo pvdisplay 

# Instruct LVM that disk size has changed
$sudo pvresize /dev/sda3 

# check physical drive if has changed 
$sudo  pvdisplay

# 3rd step:  Extend  Logical  volume

# View starting LV
$sudo lvdisplay

# Resize LV
$sudo lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv 

# View changed LV
$sudo lvdisplay


# 4th  step  :   Resize Filesystem
$sudo resize2fs /dev/ubuntu-vg/ubuntu-lv

# Confirm results
$sudo fdisk -l 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.