linux服务器硬盘修复,Linux服务器磁盘坏道怎么修复

Linux服务器磁盘坏道怎么修复

发布时间:2020-06-02 17:23:24

来源:亿速云

阅读:316

作者:Leah

Linux服务器磁盘坏道怎么修复?针对这个问题,今天小编总结这篇有关磁盘修复的文章,希望能帮助更多想解决这个问题的朋友找到更加简单易行的办法。

一、处理过程

1、磁盘坏道检查

出现问题之后,首先把业务停掉了,然后把磁盘卸载掉来进行修复,出现这种问题有可能是磁盘的磁道有坏区,我首先检查了一下磁盘坏道的情况。

badblocks -sv /dev/sdb

差不多检查了一些时间,发现并没有坏道。

2、修复磁盘文件系统

在修复文件系统的时候发现无法修复,提示Superblock invalid。

[root@ad4 ~]# fsck -t ext4 /dev/sdb

fsck from util-linux-ng 2.17.2

e2fsck 1.41.12 (17-May-2010)

fsck.ext4: Superblock invalid, trying backup blocks...

fsck.ext4: Bad magic number in super-block while trying to open /dev/sdb

The superblock could not be read or does not describe a correct ext2

filesystem.  If the device is valid and it really contains an ext2

filesystem (and not swap or ufs or something else), then the superblock

is corrupt, and you might try running e2fsck with an alternate superblock:

e2fsck -b 8193

3、查看文件系统备份Superblock

[root@ad4 ~]# mke2fs -n /dev/sdb

mke2fs 1.41.12 (17-May-2010)

/dev/sdb is entire device, not just one partition!

Proceed anyway? (y,n) y

Filesystem label=

OS type: Linux

Block size=4096 (log=2)

Fragment size=4096 (log=2)

Stride=1 blocks, Stripe width=0 blocks

122093568 inodes, 488364854 blocks

24418242 blocks (5.00%) reserved for the super user

First data block=0

Maximum filesystem blocks=4294967296

14904 block groups

32768 blocks per group, 32768 fragments per group

8192 inodes per group

Superblock backups stored on blocks:

32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,

4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,

102400000, 214990848

4、修复文件系统

e2fsck -b 214990848 -y /dev/sdb

出现了很多修复的东西,修复成功

看完这篇文章,你们学会修复Linux服务器磁盘坏道的方法了吗?如果还想学到更多技能或想了解更多相关内容,欢迎关注亿速云行业资讯频道,感谢各位的阅读!

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值