开机异常Failed to open /sysroot/etc/fstab:Input 和 mysql无法启动 Ignoring the redo log due to missing MLOG

由于机器异常关机导致今早发生两个问题。

问题一 centos7无法正常开机

在这里插入图片描述
报错:Failed to open /sysroot/etc/fstab:Input

处理方法:

xfs_repair /dev/dm-0

#如果报错:xfs_repair: cannot open /dev/dm-0: Device or resource busy ,则
umount /dev/mapper/centos-root
xfs_repair -v -L /dev/mapper/centos-root
reboot

参考文章:https://renwoxing.blog.csdn.net/article/details/108376058

问题二 mysql无法正常启动

启动mysql报错 InnoDB: Ignoring the redo log due to missing MLOG_CHECKPOINT between the checkpoint 2105726655 and the end 2105726464. 看样子他checkpoint的范围点丢失了。
(通过 systemctl status mysqld.service 、 journalctl -xe 、/var/log/mysqld.log 日志得知 )

2021-08-12T02:14:25.512028Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2021-08-12T02:14:25.513270Z 0 [ERROR] InnoDB: Ignoring the redo log due to missing MLOG_CHECKPOINT between the checkpoint 2105726655 and the end 2105726464.
2021-08-12T02:14:25.513302Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2021-08-12T02:14:26.035408Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2021-08-12T02:14:26.035483Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2021-08-12T02:14:26.035508Z 0 [ERROR] Failed to initialize builtin plugins.
2021-08-12T02:14:26.035517Z 0 [ERROR] Aborting

在这里插入图片描述

处理方法:

#方法一:修改 my.cnf ,使用innodb_force_recovery=1,然后重启mysql。其数字范围1~6 。 慎用
[mysqld]
innodb_force_recovery=1

#方法二:
删除文件ib_logfile*  ,删除之前要备份下ib_logfile0, ib_logfile1 ,然后重启

参考:
https://blog.csdn.net/yunhua12/article/details/81393572
在这里插入图片描述

END

  • 3
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值