LVM做扩容Bad magic number in super-block while trying

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了LVM做扩容Bad magic number in super-block while trying相关的知识,希望对你有一定的参考价值。

环境:
CentOS Linux release 7.2.1511 (Core)
做LVM 逻辑卷扩容的时候报错: (扩容逻辑边界)
shell>resize2fs -p /dev/mapper/centos-root
resize2fs 1.42.9 (28-Dec-2013)
resize2fs: Bad magic number in super-block while trying to open /dev/mapper/centos-root
Couldn‘t find valid filesystem superblock.

操作流程:
shell>fdisk /dev/sda
337 partprobe /dev/sda
338 fdisk -l
339 pvcreate /dev/sda5
340 pvs
341 vgs
342 vgextend /dev/sda5 centos
343 pvs
344 vgextend centos /dev/sda5
345 pvs
346 vgs
347 lvs
348 lvextend -L 130G /dev/mapper/centos-root (物理边界扩展)
349 resize2fs -p /dev/mapper/centos-root (逻辑边界扩展报错)
350 df -h
** 351 xfs_growfs /dev/mapper/centos-root ** (解决命令``)
352 df -h

故障原因:
resize2fs不能够对xfs文件系统进行调整

解决方案:
xfs_groufs
shell>xfs_growfs /dev/mapper/centos-root
shell>df -hl

解释:
XFS支持在线调整大小,要扩展一个现存的XFS文件系统,你可以使用命令行工具xfs_growfs,这在大多数Linux发行版上都默认可用。

以上是关于LVM做扩容Bad magic number in super-block while trying的主要内容,如果未能解决你的问题,请参考以下文章

10.lv扩容报错:resize2fs: Bad magic number in super-block while trying to open

故障处理:磁盘扩容出错:e2fsck: Bad magic number in super-block while trying to open /dev/vdb1

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

resize2fs: Bad magic number in super-block while t

resize2fs: Bad magic number in super-block while trying to open

python3 ImportError: bad magic number in 'xxx': b'U\r\r\n'