Уменьшение размера lxc контейнера
proxmox: shrink lxc container
Proxmox 4.2
Container: 101
Storage: iSCSI with group "iscsi-lvm-group"
Current size: 20G
Needed size: 10G
BACKUP FIRST!
Stop VM
lcx-stop -n 101
Check disk
e2fsck -f /dev/iscsi-lvm-group/vm-101-disk-1
(use tune2fs if "MMP check failed" error, and e2fsck again)
Do your disk little smaller that you want
resize2fs /dev/iscsi-lvm-group/vm-101-disk-1 9G
Reduce LVM size to what you want
lvreduce -L 10G /dev/iscsi-lvm-group/vm-101-disk-1
Resize your disk without size parameter
resize2fs /dev/iscsi-lvm-group/vm-101-disk-1
Check disk
e2fsck -f /dev/iscsi-lvm-group/vm-101-disk-1
(use tune2fs if "MMP check failed" error, and e2fsck again)
Edit disk size in container config
vi /etc/pve/lxc/101.conf
Run the container
Комментарии
Отправить комментарий