esxi的虚拟器无法启动

今天遇到 harbor 所在的 linux 无法正常启动,进入就进了安全恢复模式: 尝试方式: lvm 重建。证明没有用。 1.https://www.jianshu.com/p/8f83e2a67009 之前尝试通过 centos 的启动盘进入到 rescue 模式进行修复; 参考文档: grub2 重建后没有解决问题。 https://thunderysteak.github.io/rebuild-initramfs-centos 在以下这个文档 https://wiki.sqlfans.cn/it/it-vmware-emerygency.html 提示我用 ubuntu 的桌面版去挂载修复,但是效果不好,最后还是 centos 的启动盘好用, 因为提示/dev/mapper/centos-root 不存在,所以重建了 fastab 采用以下方式: https://blog.csdn.net/A_1013/article/details/49232095 LinuxCentOS7 关于 PV neme 券显示[unknown]问题 https://blog.csdn.net/Insupport/article/details/116033155 通过创建 pv 解决设备找不到的问题。

xfs_repair 修复问题 https://www.cnblogs.com/zisefeizhu/p/12575996.html centos7 启动流程文档: https://www.cnblogs.com/diantong/p/10745372.html

输入命令:xfs_repair -v -L /dev/dm-0

最重要的方式:

(In this example ) from dracut shell the following lvm command repairs LVM state and its output shows problem was that one of the lvm disk (sdb) was incorrectly removed from LVM. 通过这个获取到磁盘,提示 xfs_repair 修复 sda

1
dracut:/# lvm pvscan --config 'global{locking_type=1}'

最后修改这个

  1. As the proxy root backup the lvm.conf file .
1
194proxyga:~ # cp /etc/lvm/lvm.conf /etc/lvm/lvm.conf-`date +%s
  1. Edit the /etc/lvm/lvm.conf, look for existing “filter” line and change to the following

BEFORE

1
    filter = [ "a/.*/" ]

AFTER

1
    filter = ["r|/dev/s.*|","r|/dev/disk.*|","a/.*/"]
  1. Verify the new filter setting is set by running this command
1
2
194proxy:~ # lvm config | grep filter
        filter=["r|/dev/s.*|","r|/dev/disk.*|","a/.*/"]

才使得不再报错/dev/mapper/centos 不存在。

Licensed under CC BY-NC-SA 4.0
最后更新于 Jan 06, 2025 05:52 UTC
comments powered by Disqus
Built with Hugo
主题 StackJimmy 设计
Caret Up