how to change the disk size of pve lxc
To change the disk size of a Proxmox VE LXC container, you can follow these steps:
-
Stop the LXC container:
pct stop <lxc_id> -
Resize the LXC container disk image:
qemu-img resize /var/lib/vz/images/<lxc_id>/vm-<lxc_id>-disk-1.qcow2 +<new_size>GReplace
<lxc_id>with the ID of your LXC container and<new_size>with the desired new size in gigabytes. -
Start the LXC container:
pct start <lxc_id> -
Log in to the LXC container:
pct enter <lxc_id> -
Resize the partition inside the LXC container:
resize2fs /dev/sdaXReplace
Xwith the partition number where the root filesystem resides. You can check the partition layout using thelsblkcommand. -
Verify the new disk size:
df -hThis command will display the updated disk size.
That's it! You have successfully changed the disk size of the Proxmox VE LXC container
原文地址: http://www.cveoy.top/t/topic/iR17 著作权归作者所有。请勿转载和采集!