Fork me on GitHub

/dev/mapper/centos-root 满了

home 减少容量

卸载逻辑卷 home
umount /dev/mapper/centos-home
检测磁盘错误
e2fsck -f /dev/mapper/centos-home
缩减文件系统大小
resize2fs /dev/mapper/centos-home 522.70G
缩小逻辑卷 
lvresize -L 522.70G /dev/mapper/centos-home
再次挂载
mount /dev/mapper/centos-home /home


root增加容量

首先,我们卸载掉root卷
# umount /dev/mapper/centos-root 
然后,设置卷的大小为100G
# lvresize -L 100G /dev/mapper/centos-root 
接下来,检查磁盘错误
# e2fsck -f /dev/mapper/centos-root
运行以下命令扩展文件系统以后,ext4信息就更新了。
# resize2fs //dev/mapper/centos-root

# xfs_growfs /dev/mapper/centos-root

参考:

https://linux.cn/article-3218-1.html
https://www.cnblogs.com/xs104/p/4642406.html
https://blog.51cto.com/dreamfire/1084729
https://www.cnblogs.com/feiyun126/p/7680534.html

posted @ 2020-11-30 20:02  北斗2016  阅读(3534)  评论(0编辑  收藏  举报