This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| resizevmdisk [2021/08/28 10:46] – alexk7110 | resizevmdisk [2021/08/28 10:51] (current) – alexk7110 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Resizing LVM on Proxmox ===== | ====== Resizing LVM on Proxmox ===== | ||
| * First you resize the VM disk offline on Proxmox | * First you resize the VM disk offline on Proxmox | ||
| - | * Boot the VM and enter it: | + | * Boot the VM and enter the following in a shell: |
| <code bash> | <code bash> | ||
| - | | + | sudo su |
| - | + | ||
| - | # fdisk -l /dev/sda | + | |
| - | + | ||
| - | # parted /dev/sda | + | |
| - | + | ||
| - | > Answer: Fix | + | |
| - | > resize part 3 100% | + | |
| - | > quit | + | |
| - | + | ||
| - | # pvresize /dev/sda3 | + | |
| - | # lvresize --extents +100%FREE --resizefs / | + | |
| + | # Check sda or vda or any other disk you wish to resize | ||
| + | fdisk -l /dev/sda | ||
| + | |||
| + | # There will be a red message mentioning the resize | ||
| + | # Use parted now so it asks for a fix | ||
| + | parted /dev/sda | ||
| + | |||
| + | > Answer: Fix | ||
| + | > resize part 3 100% | ||
| + | > quit | ||
| + | |||
| + | # Next you resize the physical volume of the last partition if available | ||
| + | pvresize /dev/sda3 | ||
| + | # Then you resize the logical volume to occupy the rest of the drive | ||
| + | lvresize --extents +100%FREE --resizefs / | ||
| + | </ | ||
| * Take a breath, it's done. | * Take a breath, it's done. | ||
| * I should read up on LVM management. | * I should read up on LVM management. | ||
| - | </ | + | |