Linux开机出现welcome to emergency mode! 解决方法
Linux开机出现welcome to emergency mode! 解决方法
Linux开机出现welcome to emergency mode! 解决方法起因linux服务器中有一台安装KVM虚拟机重启不了,直接reboot,发现宿主机起不来代码语言:javascript代码运行次数:0运行复制Welcome to emergency mode! After logging in, typ
Linux开机出现welcome to emergency mode! 解决方法
Linux开机出现welcome to emergency mode! 解决方法
linux服务器中有一台安装KVM虚拟机重启不了,直接reboot,发现宿主机起不来
代码语言:javascript代码运行次数:0运行复制Welcome to emergency mode! After logging in, type "journalctl -xb" to view
system logs,"systemctl reboot" to reboot ,"systemctl default" or ^D to
try again to boot into default mode.
Give root password for maintenance
(or type Control-D to continue):
进入开机界面如图,进入救援模式
1.输入密码登录root账户; 2.执行命令 journalctl -xb 查看日志输出,搜索关键字”fsck failed”(输入/,然后输入关键字后回车,通过/n查看上一个/下一个匹配项),在错误提示信息附近可以看到错误相关的设备,用红标记,例如我的是/dev/disk/*;
查看 cat /etc/fstab
代码语言:javascript代码运行次数:0运行复制 # cat /etc/fstab
/dev/mapper/cl-root / xfs defaults 0 0
UUID=f51f5108-cb0-4a5f-ab58-aed88252dbbd /boot xfs defaults 0 0
/dev/mapper/cl-home /home xfs defaults 0 0
/dev/mapper/cl-swap swap swap defaults 0 0
/dev/sdb1 /data2T ext4 defaults 0 0
分别注释三条记录
代码语言:javascript代码运行次数:0运行复制vi /etc/fstab
#/dev/mapper/cl-home /home xfs defaults 0 0
#/dev/mapper/cl-swap swap swap defaults 0 0
#/dev/sdb1 /data2T ext4 defaults 0 0
分别注释以下三条记录:发现 注释到 #/dev/mapper/cl-home /home 可以正常进系统,说明 /dev/mapper/cl-home需要修复
代码语言:javascript代码运行次数:0运行复制fsck -y /dev/mapper/cl-home
由于文件格式是xfs
xfs_repair /dev/mapper/cl-home (ext系列工具为fsck)
xfs_repair -L /dev/mapper/cl-home
如果修复失败,可以加上 -L 参数,这样可能会丢失部分数据。
先执行 xfs_repair -L /dev/mapper/cl-home
再执行xfs_repair /dev/mapper/cl-home
再执行xfs_check/dev/mapper/cl-home 检查文件系统是否修复成功。
说明:-L是修复xfs文件系统的最后手段,慎重选择,它会清空日志,会丢失用户数据和文件。
代码语言:javascript代码运行次数:0运行复制# xfs_repair /dev/mapper/cl-home
Phase 1 - find and verify superblock...
Phase 2 - using internal log
- zero log...
ERROR: The filesystem has valuable metadata changes in a log which needs to
be replayed. Mount the filesystem to replay the log, and unmount it before
re-running xfs_repair. If you are unable to mount the filesystem, then use
the -L option to destroy the log and attempt a repair.
ote that destroying the log may cause corruption -- please attempt a mount
of the filesystem before doing this.
xfs_repair -L /dev/mapper/cl-home
[root@centos7_loc6 ~]# xfs_repair -L /dev/mapper/cl-home
Phase 1 - find and verify superblock...
Phase 2 - using internal log
- zero log...
ALERT: The filesystem has valuable metadata changes in a log which is being
destroyed because the -L option was used.
- scan filesystem freespace and inode maps...
- found root inode c
Phase - for each AG...
- scan and clear agi unlinked lists...
- process known inodes and perform inode discovery...
- agno = 0
Metadata CRC error detected at xfs_dir_block block 0x7c26698/0x1000
bad directory block magic # 0 in block 0 for directory inode 10176945
corrupt block 0 in directory inode 10176945
will junk block
no . entry for directory 10176945
no .. entry for directory 10176945
problem with directory contents in inode 10176945
cleared inode 10176945
- agno = 1
- agno = 2
- agno =
- process newly discovered inodes...
Phase 4 - check for duplicate blocks...
- setting up duplicate extent list...
- check for inodes claiming duplicate blocks...
- agno = 0
- agno = 2
- agno = 1
- agno =
entry "share" in shortform directory 11275604 references free inode 10176945
junking entry "share" in directory inode 11275604
entry ".." at block 0 offset 80 in directory inode 1127558550 references free inode 10176945
entry ".." at block 0 offset 80 in directory inode 10181109 references free inode 10176945
entry ".." at block 0 offset 80 in directory inode 1765985908 references free inode 10176945
entry ".." at block 0 offset 80 in directory inode 1765985941 references free inode 10176945
entry ".." at block 0 offset 80 in directory inode 1765986041 references free inode 10176945
entry ".." at block 0 offset 80 in directory inode 1765986497 references free inode 10176945
entry ".." at block 0 offset 80 in directory inode 1765987174 references free inode 10176945
entry ".." at block 0 offset 80 in directory inode 752128626 references free inode 10176945
Phase 5 - rebuild AG headers and trees...
- reset superblock...
Phase 6 - check inode connectivity...
- resetting contents of realtime bitmap and summary inodes
- traversing filesystem ...
entry ".." in directory inode 10181109 points to free inode 10176945
bad hash table for directory inode 10181109 (no data entry): rebuilding
rebuilding directory inode 10181109
entry ".." in directory inode 752128626 points to free inode 10176945
bad hash table for directory inode 752128626 (no data entry): rebuilding
rebuilding directory inode 752128626
entry ".." in directory inode 1127558550 points to free inode 10176945
bad hash table for directory inode 1127558550 (no data entry): rebuilding
rebuilding directory inode 1127558550
entry ".." in directory inode 1765985908 points to free inode 10176945
bad hash table for directory inode 1765985908 (no data entry): rebuilding
rebuilding directory inode 1765985908
entry ".." in directory inode 1765985941 points to free inode 10176945
bad hash table for directory inode 1765985941 (no data entry): rebuilding
rebuilding directory inode 1765985941
entry ".." in directory inode 1765986041 points to free inode 10176945
bad hash table for directory inode 1765986041 (no data entry): rebuilding
rebuilding directory inode 1765986041
entry ".." in directory inode 1765986497 points to free inode 10176945
bad hash table for directory inode 1765986497 (no data entry): rebuilding
rebuilding directory inode 1765986497
entry ".." in directory inode 1765987174 points to free inode 10176945
bad hash table for directory inode 1765987174 (no data entry): rebuilding
rebuilding directory inode 1765987174
- traversal finished ...
- moving disconnected inodes to lost+found ...
disconnected dir inode 10176949, moving to lost+found
disconnected dir inode 1765987174, moving to lost+found
Phase 7 - verify and correct link counts...
resetting inode 276498 nlinks from 2 to 71
resetting inode 11275604 nlinks from 1 to 12
Maximum metadata LS (99:218728) is ahead of log (1:8).
Format log to cycle 102.
done
开机把挂载注释去掉
代码语言:javascript代码运行次数:0运行复制vim /etc/fstab
/dev/mapper/cl-home /home xfs defaults 0 0
问题解决
#感谢您对电脑配置推荐网 - 最新i3 i5 i7组装电脑配置单推荐报价格的认可,转载请说明来源于"电脑配置推荐网 - 最新i3 i5 i7组装电脑配置单推荐报价格
上传时间: 2025-07-24 14:20:52
推荐阅读
留言与评论(共有 15 条评论) |
本站网友 孕妇梦见蛇 | 26分钟前 发表 |
218728) is ahead of log (1 | |
本站网友 泉港租房 | 20分钟前 发表 |
用红标记 | |
本站网友 空中餐厅 | 17分钟前 发表 |
这样可能会丢失部分数据 | |
本站网友 一维码生成器 | 25分钟前 发表 |
"systemctl reboot" to reboot | |
本站网友 降血压的蔬菜 | 14分钟前 发表 |
rebuilding rebuilding directory inode 752128626 entry ".." in directory inode 1127558550 points to free inode 10176945 bad hash table for directory inode 1127558550 (no data entry) | |
本站网友 g37s | 25分钟前 发表 |
进入救援模式image-2021092616427766解决方法1.输入密码登录root账户; 2.执行命令 journalctl -xb 查看日志输出 | |
本站网友 pcre | 23分钟前 发表 |
The filesystem has valuable metadata changes in a log which is being destroyed because the -L option was used. - scan filesystem freespace and inode maps... - found root inode c Phase - for each AG... - scan and clear agi unlinked lists... - process known inodes and perform inode discovery... - agno = 0 Metadata CRC error detected at xfs_dir_block block 0x7c26698/0x1000 bad directory block magic # 0 in block 0 for directory inode 10176945 corrupt block 0 in directory inode 10176945 will junk block no . entry for directory 10176945 no .. entry for directory 10176945 problem with directory contents in inode 10176945 cleared inode 10176945 - agno = 1 - agno = 2 - agno = - process newly discovered inodes... Phase 4 - check for duplicate blocks... - setting up duplicate extent list... - check for inodes claiming duplicate blocks... - agno = 0 - agno = 2 - agno = 1 - agno = entry "share" in shortform directory 11275604 references free inode 10176945 junking entry "share" in directory inode 11275604 entry ".." at block 0 offset 80 in directory inode 1127558550 references free inode 10176945 entry ".." at block 0 offset 80 in directory inode 10181109 references free inode 10176945 entry ".." at block 0 offset 80 in directory inode 1765985908 references free inode 10176945 entry ".." at block 0 offset 80 in directory inode 1765985941 references free inode 10176945 entry ".." at block 0 offset 80 in directory inode 1765986041 references free inode 10176945 entry ".." at block 0 offset 80 in directory inode 1765986497 references free inode 10176945 entry ".." at block 0 offset 80 in directory inode 1765987174 references free inode 10176945 entry ".." at block 0 offset 80 in directory inode 752128626 references free inode 10176945 Phase 5 - rebuild AG headers and trees... - reset superblock... Phase 6 - check inode connectivity... - resetting contents of realtime bitmap and summary inodes - traversing filesystem ... entry ".." in directory inode 10181109 points to free inode 10176945 bad hash table for directory inode 10181109 (no data entry) | |
本站网友 如何增强宝宝免疫力 | 23分钟前 发表 |
搜索关键字”fsck failed”(输入/ | |
本站网友 房地美 | 17分钟前 发表 |
Linux开机出现welcome to emergency mode! 解决方法 Linux开机出现welcome to emergency mode! 解决方法起因linux服务器中有一台安装KVM虚拟机重启不了 | |
本站网友 小应 | 9分钟前 发表 |
moving to lost+found Phase 7 - verify and correct link counts... resetting inode 276498 nlinks from 2 to 71 resetting inode 11275604 nlinks from 1 to 12 Maximum metadata LS (99 | |
本站网友 8000万 | 7分钟前 发表 |
rebuilding rebuilding directory inode 1765987174 - traversal finished ... - moving disconnected inodes to lost+found ... disconnected dir inode 10176949 | |
本站网友 国有控股公司 | 22分钟前 发表 |
这样可能会丢失部分数据 | |
本站网友 怎么样瘦腰 | 30分钟前 发表 |
rebuilding rebuilding directory inode 10181109 entry ".." in directory inode 752128626 points to free inode 10176945 bad hash table for directory inode 752128626 (no data entry) | |
本站网友 亚洲彩虹论坛 | 11分钟前 发表 |
搜索关键字”fsck failed”(输入/ |