Fix File System Errors When fsck Fails on vCenter
search cancel

Fix File System Errors When fsck Fails on vCenter

book

Article ID: 369557

calendar_today

Updated On:

Products

VMware vCenter Server 7.0 VMware vCenter Server 8.0

Issue/Introduction

This issue is primarily caused by unexpected reboots or the temporary unavailability of storage.

When `fsck` runs during startup on a vCenter VM, it encounters an error that prevents vCenter from fully booting. 

Environment

 fsck fails when the vCenter boots and an error message says to run fsck manually, you can troubleshoot by restarting the VM, altering the GRUB edit menu to enter emergency mode before Photon OS fully boots, and running fsck

Resolution

To resolve this, you need to manually run `fsck` and fix the issue. 

Perform the following steps:

  1. Take a snapshot of the virtual machine.

  2. Restart the virtual machine running Photon OS.

    When the Photon OS splash screen appears as it restarts, type the letter e quickly to go to the GNU GRUB edit menu.

    Note: You must type e quickly as Photon OS reboots quickly. Also, in VMware vSphere or VMware Workstation Pro, you might have to give the console focus by clicking in its window before it will register input from the keyboard.

  3. In the GNU GRUB edit menu, go to the end of the line that starts with linux, add a space, and then add the following code exactly as it appears below:

    systemd.unit=emergency.target

  4. Type F10.

  5. In the bash shell, run one of the following commands to fix the file system errors, depending on whether sda1 or sda2 represents the root file system:

    `e2fsck -y /dev/sda1`
    
    or
    
    `e2fsck -y /dev/sda2`
    
  6. Restart the virtual machine.