LVM报错:resize2fs: Bad magic number in super-block

简介:

问题:resize2fs: Bad magic number in super-block while trying to open /dev/mapper/cl-root


[root@docker1 ~]# df -Th

Filesystem          Type      Size  Used      Avail   Use%   Mounted on

/dev/mapper/cl-root      xfs     18G     18G    897M    96%    /

devtmpfs            devtmpfs  901M     0      901M   0%     /dev

tmpfs              tmpfs     912M     0     912M   0%     /dev/shm

tmpfs              tmpfs     912M    608K    912M   1%    /run

tmpfs              tmpfs     912M     0     912M   0%     /sys/fs/cgroup

/dev/sda1           xfs      1014M    186M    829M  19%     /boot

tmpfs              tmpfs     183M     0     183M   0%     /run/user/0


添加硬盘后,重新扫描硬盘状态

[root@docker1 ~]# echo "- - -" >/sys/class/scsi_host/host0/scan 

[root@docker1 ~]# echo "- - -" >/sys/class/scsi_host/host1/scan 

[root@docker1 ~]# echo "- - -" >/sys/class/scsi_host/host2/scan 


[root@docker1 ~]# vgdisplay

  --- Volume group ---

  VG Name               cl

  System ID             

  Format                lvm2

  Metadata Areas          1

  Metadata Sequence No      3

  VG Access             read/write

  VG Status             resizable

  MAX LV                0

  Cur LV                2

  Open LV                2

  Max PV                0

  Cur PV                1

  Act PV                1

  VG Size               <19.00 GiB

  PE Size               4.00 MiB

  Total PE              4863

  Alloc PE / Size         4862 / 18.99 GiB

  Free  PE / Size        1 / 4.00 MiB

  VG UUID               0g6KUL-2kdC-e4Ml-EMFH-2JYs-SNUT-bn09Od

   

[root@docker1 ~]# pvcreate /dev/sdc

  Physical volume "/dev/sdc" successfully created.

[root@docker1 ~]# pvscan

  PV /dev/sda2   VG cl              lvm2 [<19.00 GiB / 4.00 MiB free]

  PV /dev/sdc                       lvm2 [20.00 GiB]

  Total: 2 [<39.00 GiB] / in use: 1 [<19.00 GiB] / in no VG: 1 [20.00 GiB]


[root@docker1 ~]# vgextend cl /dev/sdc

  Volume group "cl" successfully extended


[root@docker1 ~]# resize2fs /dev/mapper/cl-root

resize2fs 1.42.9 (28-Dec-2013)

resize2fs: Bad magic number in super-block while trying to open /dev/mapper/cl-root

Couldn't find valid filesystem superblock.



[root@docker1 ~]# mount |grep cl-root

/dev/mapper/cl-root on / type xfs (rw,relatime,seclabel,attr2,inode64,noquota)


[root@docker1 ~]# xfs_

xfs_admin      xfs_freeze     xfs_logprint   xfs_quota

xfs_bmap       xfs_fsr        xfs_mdrestore  xfs_repair

xfs_copy       xfs_growfs     xfs_metadump   xfs_rtcp

xfs_db         xfs_info       xfs_mkfile     

xfs_estimate   xfs_io         xfs_ncheck   

  

[root@docker1 ~]# xfs_growfs /dev/mapper/cl-root

meta-data=/dev/mapper/cl-root    isize=512    agcount=4, agsize=1179136 blks

         =             sectsz=512    attr=2, projid32bit=1

         =             crc=1        finobt=0 spinodes=0

data      =             bsize=4096     blocks=4716544, imaxpct=25

         =            sunit=0       swidth=0 blks

naming    =version 2        bsize=4096    ascii-ci=0 ftype=1

log      =internal         bsize=4096    blocks=2560, version=2

         =             sectsz=512    sunit=0 blks, lazy-count=1

realtime =none             extsz=4096     blocks=0, rtextents=0

data blocks changed from 4716544 to 5242880

[root@docker1 ~]# df -Th

Filesystem          Type      Size  Used Avail Use% Mounted on

/dev/mapper/cl-root     xfs      20G   18G  2.9G  86% /

devtmpfs            devtmpfs  901M     0  901M   0% /dev

tmpfs               tmpfs     912M     0  912M   0% /dev/shm

tmpfs               tmpfs     912M  640K  912M   1% /run

tmpfs               tmpfs     912M     0  912M   0% /sys/fs/cgroup

/dev/sda1            xfs      1014M  186M  829M  19% /boot

tmpfs               tmpfs     183M     0  183M   0% /run/user/0




本文转自 Mr_sheng 51CTO博客,原文链接:http://blog.51cto.com/sf1314/2062106

相关文章
|
4月前
|
存储 Linux
文件 inode 与 no space left on device 异常
文件 inode 与 no space left on device 异常
47 0
|
6月前
|
Linux 固态存储
linux ext4-fs error,[求助]EXT4-fs error (device sdb4) ext4_find_entry
linux ext4-fs error,[求助]EXT4-fs error (device sdb4) ext4_find_entry
linux ext4-fs error,[求助]EXT4-fs error (device sdb4) ext4_find_entry
|
6月前
|
Docker 容器
devmapper: Thin Pool has 162394 free data blocks which is less than minimum required 163840 free dat
devmapper: Thin Pool has 162394 free data blocks which is less than minimum required 163840 free dat
45 0
|
Linux
【Linux】关于Bad magic number in super-block 当尝试打开/dev/sda1 时找不到有效的文件系统超级块
【Linux】关于Bad magic number in super-block 当尝试打开/dev/sda1 时找不到有效的文件系统超级块
345 0
|
数据安全/隐私保护
Internal error XFS_WANT_CORRUPTED_GOTO at line 1635 of file fs/xfs/libxfs/xfs_alloc.c.
下面为解决问题中报的错误: Internal error XFS_WANT_CORRUPTED_GOTO at line 1635 of file fs/xfs/libxfs/xfs_alloc.c. Caller xfs_free_extent
416 0
Internal error XFS_WANT_CORRUPTED_GOTO at line 1635 of file fs/xfs/libxfs/xfs_alloc.c.
|
Linux
Linux Buffer I/O error on device dm-4, logical block
Linux服务器日志(Oracle Linux Server release 5.7)里面出现了一些"Buffer I/O error on device dm-4, logical block 0"之类的错误,如下所示: Jul 3 02:33:24 localhost kernel: Buf...
7658 0