k8s node调整错误的磁盘容量分配

问题: 磁盘容量分配错

/var/lib/docker占据了所有磁盘, 缩减 /var/lib/docker到20G, 容量分配到其他分区

解决:

一串命令:

systemctl stop kubelet.service 
systemctl stop docker
lsof  | grep /var/lib/docker
umount /var/lib/docker
e2fsck -f /dev/vg_root/lv_docker
resize2fs /dev/vg_root/lv_docker 20G
lvreduce -L 21G /dev/vg_root/lv_docker 
mount /var/lib/docker
resize2fs /dev/vg_root/lv_docker
lvresize -L 500G /dev/vg_root/lv_root
lvresize -L 2t /dev/vg_root/lv_new 
resize2fs /dev/vg_root/lv_root
resize2fs /dev/vg_root/lv_new