1. 程式人生 > >vCenter宕機,重啟出現fsck failed無法啟動

vCenter宕機,重啟出現fsck failed無法啟動

現象

突然發現VC無響應,控制檯看結果如圖:

網上查資料

主要參考其中的

Option 2:

  1. Press Control+D or reboot the vCSA using the vSphere Client.
  2. When the GRUB bootloader appears, press Spacebar to disable autoboot.
  3. Select p and enter the root password
  4. Type e to edit the boot commands.
  5. Scroll to the second line displaying the kernel boot parameters. 
    You see this line:
    kernel /vmlinuz-3.0.101-0.35-default
  6. Type e to edit the boot command.
  7. Append init=/bin/bash to the kernel boot options.
  8. Press Enter. The GRUB menu re-appears.
  9. Type b to start the boot process. The system boots to a temporary BASH shell.
  10. Set the default shell to BASH by running this command:
    chsh -s /bin/bash root
  11. Reboot the vCSA using the vSphere Client.
  12. Enter the root password.
  13. At the repair filesystem prompt, type this command:
    fsck /dev/mapper/log_vg-log

    Enabling BASH shell in vCenter Server Appliance 6.0

  14. vCenter Server Appliance 6.0 does not boot to the BASH shell by default.

    To enable the BASH shell:

  15. In the GRUB boot loader press p.
  16. Enter the root credentials when prompted.
  17. Select VMware vCenter Server Appliance and press e.
  18. Select the line that begins with kernel and press e.
  19. Add init=/bin/bash to the end of the line and press Enter. This line should start with <nousb audit=1</font>.
  20. Press b.

解決過程

1.模式按照上述20個步驟操作

2.其中13步替換成我故障的路徑進行修復:分別為:fsck /dev/mapper/core_vg-core   和 fsck /dev/mapper/seat_vg-seat  

3.修復成功

注意事項

1.修復過程中各階段的重啟可以用冷啟動的方式

2.第7步新增init=/bin/bash前面要加一個空格。如: