调整容器磁盘大小不生效
mattshma opened this issue · comments
mattshma commented
调整容器磁盘大小后,重启,再重新 df
看,磁盘大小未变。查了下资源,还需使用 resize2fs
实施变更即可:sudo resize2fs /dev/rbd1
mattshma commented
容器挂载的 rbd ,启动时报错:
MountVolume.MountDevice failed for volume "xx" : rbd: failed to mount device /dev/rbd5 at /var/lib/k8s/kubelet/plugins/kubernetes.io/rbd/rbd/xx (fstype: ext4), error 'fsck' found errors on device /dev/rbd5 but could not correct them: fsck from util-linux 2.23.2 /dev/rbd5: recovering journal /dev/rbd5 contains a file system with errors, check forced. /dev/rbd5: Resize inode not valid. /dev/rbd5: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY. (i.e., without -a or -p options) .
执行: sudo e2fsck -f /dev/rbd5
即可,不过由于文件系统已报错,数据会丢失。