resize2fs: Bad magic number in super-block while trying to open /dev/centos/root Couldn't find valid filesystem superblock

今天在进行lvm扩容之后,按照惯例进行 resize2fs 操作,发现报如下错误:

# resize2fs /dev/centos/root 
resize2fs 1.42.9 (28-Dec-2013)
resize2fs: Bad magic number in super-block while trying to open /dev/centos/root
Couldn't find valid filesystem superblock.

检查 /dev/centos/root 文件系统,发现是xfs,如下;

# mount |grep root
/dev/mapper/centos-root on / type xfs (rw,relatime,attr2,inode64,noquota)

xfs的文件系统重新定义大小用如下命令:

# xfs_growfs /dev/mapper/centos-root 
meta-data=/dev/mapper/centos-root isize=256 agcount=4, agsize=3276800 blks
= sectsz=512 attr=2, projid32bit=1
= crc=0 finobt=0
data = bsize=4096 blocks=13107200, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=0
log =internal bsize=4096 blocks=6400, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
data blocks changed from 13107200 to 39336960

重新进行df -h查看挂载点,发现大小已经更改。

posted @ 2018-04-06 11:06  wangmo  阅读(5515)  评论(0编辑  收藏  举报