Symptom(s)
1. An error occurred while applying the ESXi Motopatch.
2. VFAT corruption error was detected.
3. ESXi Motopatch quit with a return code of 1.
Issue
1. VFAT bootbank partitions were corrupted during the ESXi Motopatch application.
2. The error message displayed: "VFAT_CORRUPTION ERROR: A problem with one or more vFAT bootbank partitions was detected. Please refer to KB 91136 and run dosfsck on bootbank partitions."
Environment
Vmware/ESXi
ESXi 8.0
Resolution
1. Log in to ESXi as root.
2. Run the following command to list the file systems:
esxcli storage filesystem list
3. Identify the corrupted VFAT bootbank partitions using the output.
4. Check the partitions using the following command:
vmkfstools -P /vmfs/volumes/[Partition ID]
5. Enter maintenance mode:
vim-cmd /hostsvc/maintenance_mode_enter
6. Stop services to verify if files are open:
- Stop crond:
kill $(cat /var/run/crond.pid)
- For ESXi 6.x, stop vmsyslogd:
/usr/lib/vmware/vmsyslog/bin/shutdown.sh
- Check for daemons with open file handles on the scratch partition and stop them:
lsof | grep scratch
/etc/init.d/vmfstraced stop
lsof | grep var/run/log
/etc/init.d/vsandevicemonitord stop
7. Use dosfsck to fix the corrupted partitions:
- Run: dosfsck -Vv /dev/disks/[Partition ID]
- If a dirty bit is set, press 1 to remove the dirty bit and write changes.
- Repeat for all corrupted partitions.
8. Check for orphaned files and delete them:
- Run: dosfsck -a -w /dev/disks/[Partition ID]
- Write the changes if orphaned files are detected.
9. If dosfsck still reports failures, re-create the partition.
10. Reboot the ESXi host to restart all previously stopped daemons:
vim-cmd /hostsvc/maintenance_mode_exit