Increase diskstorage for Linux VMs

To increase the storage drive you first have to increase the storagecapacity in the proxmox admin gui. Then you can use the following commands in this order to increase the size of the volume.

fdisk -l
cfdisk

Next choose "Resize" and then "Write".

fdisk -l <pathtomaindevice> #example path: /dev/sda
parted

Next choose "print" -> "Resizepart". Enter number of device. Then choose "quit".

pvresize <pathtonewdevice>
lvextend -l +100%FREE <pathtolocalpartition>
resize2fs <pathtolocalpartition>
df -h

Then reboot the machine.


Revision #3
Created 21 December 2022 13:14:35 by Luca Noah Caprez
Updated 8 February 2024 21:43:08 by Luca Noah Caprez