Shrink a Proxmox LXC
Shrinking the root disk of one of my LXC containers using the following commands:
List the containers:
pct list
Stop the particular container you want to resize:
pct stop XXX (XXX is the container ID)
Find out it’s path on the node:
lvdisplay | grep “LV Path\|LV Size”
For good measure one can run a file system check:
e2fsck -fy /dev/pve/vm-999-disk-0
Resize the file system:
resize2fs /dev/pve/vm-999-disk-0 10G
Resize the local volume
lvreduce -L 10G /dev/pve/vm-999-disk-0
Edit the container’s conf, look for the rootfs line and change accordingly:
nano /etc/pve/lxc/999.conf
rootfs: local-lvm:vm-999-disk-0,size=32G >> rootfs: local-lvm:vm-999-disk-0,size=10G
Start it:
pct start 999
Enter it and check the new size:
pct enter 999
df -h
Shrink proxmox vm bootdisk
Go to
lvm lvreduce -L -32g pve/filename.raw
eg. lvm lvreduce -L -32g pve/vm-103-disk-0
qm rescan
How to install Docker Nginx Proxy Manager and Portainer
How to mount a SMB share drive to a Proxmox container
Using OpenCV + Tesseract + Python to Extract Numerical Data from images and Export them to a CSV file.
Samsung A71 – Wifi calling notification keep appearing on the closed screen
Mount a Storj drive in Windows 10 using Rclone
Fixing download speeds on DD-WRT for Netgear R6700v3
Veracrypt Network share drive + windows 10
Problem: Unable to mount a encrypted container in veracrypt. Will ask say wrong username or password.
Solution:
In veracrypt,
Press Select File button
Select your file and click Open button
This will open a window that ask for username and password. This is your network share and password for the network share