How to Resize Local Volume for a Virtual machine in Proxmox - How can I make ubuntu--vg-ubuntu--lv consume the entire disk space available


Question: How do I resize the local volume on the VM in Proxmox?

Login to See the Rest of the Answer

Answer:
  1. Give desired size of the Hard-Disk
     #check if the root disk is cosumed 100%
      sudo dh -h
     # Increase the Physical Volume (pv) to max size
         pvresize /dev/sda3


2. Inside the VM, do the commands:
     # Expand the Logical Volume (LV) to max size to match
        lvresize -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv

3. Expand the File System itself:
   # Expand the filesystem itself
     resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv

Double check the paths maybe different from the mentioned above.

To prevent this from happening. Run
sudo journalctl --vacuum-size=100M

Then configure journalctl to keep mininamal logs:
sudo nano /etc/systemd/journald.conf

Look for these lines (they may be commented out) and set them like this:

ini
SystemMaxUse=100M SystemKeepFree=50M SystemMaxFileSize=10M SystemMaxFiles=10


     




Login to Continue, We will bring you back to this content 0



For peering opportunity Autonomouse System Number: AS401345 Custom Software Development at ErnesTech Email Address[email protected]