今天给服务器加了个硬盘
因为考虑到以后的扩展问题所以我启用了LVM以便更灵活地调控分区,但是在进行了创建PV 加入VG 扩展LV都无错误之后,执行resize2fs却出错了。
错误如下:
解决方案:
扩容挂载在系统根目录下的lv时,因为
1.进程占用问题导致resize2fs /dev/mapper/centos-root命令执行失败,
2.根目录剩余空间太小导致 resize2fs /dev/mapper/centos-root 执行报错:
resize2fs: Bad magic number in super-block 当尝试打开 resize2fs /dev/mapper/centos-root 时找不到有效的文件系统超级块.
通过xfs扩容磁盘命令解决上述问题:
xfs_growfs /dev/mapper/centos
Comments | NOTHING