VCSA 6.0 prompting for a manual fsck
One of my VCSA deployments, the only one running 6.0 experienced a switch failure and in result a network outage of roughly 5 minutes the other day. Not a big deal, but unfortunately this was a very “cost effective” solution and the switch that hosted the production network also hosted the VLANs carrying all of the NFS traffic to the datastores the VCSA resided on as well! In short, VCSA done got grumpy – after fixing the issues with the switch I ended up at the screen shown below…
Not an overly complicated error – just stating that we need to run a file system check on the /dev/mapper/log_vg-log volume manually. In the past, say with 5.5 I’d just drop to a bash shell and do so – however the default appliance shell in the 6.0 version of VCSA presents a few challenges in doing the same thing. First off, if I went ahead and gave the root password to the VCSA I was presented with the default menu – the same menu you would receive if you ssh’d to the box under normal circumstances – that said, in the maintenance mode, the shell.set and shell.enable commands don’t work. So in order to get to a point where we can actually execute fsck we need to do a couple of things…
Grub to bash
So the first thing we need to do is get our VCSA booting into a bash prompt. To do so, hit CTRL+D at the presented screen and get the box to reboot. When the boot loader appears we will need to hit the space bar or up/down keys to stop the auto boot process. Once stopped we can selected ‘p’ to unlock the menu and enter the root password for the box. We then want to select “e” to edit our boot sequence – highlight the second line, the one that displays the kernel parameters and select “e” once again. At the end of that line we will want to append “init=/bin/bash” as shown below – this will boot our system into a bash shell. Once done, hit “enter” to save and “b” to boot.
After the system has booted you should now be sitting at a bash prompt. On a normal day we would simply run our fsck command here however the file system we are looking to check is still not mounted at this point. I tried numerous commands and options to try and get it mounted but came up short. That said running the following command and rebooting our vCenter will switch the login shell for root back to the ‘normal bash’ and allow us to continue
chsh -s /bin/bash root
Once the command has been run and the server rebooted we will be brought back to the same error prompting us to enter the root password. Go ahead and do that. This time we will be brought directly to a bash prompt with log_vg-log being available to us! So, without further ado go ahead and run the following command to complete the file system check.
More than likely you will get numerous prompts asking you whether or not to fix any errors that occur. Use your discretion here, however I didn’t have much of a choice and needed to say ‘Yes’ to all. After it’s done give the VCSA another reboot and everything should come back up normally (at least it did for me). Hopefully this helps push someone in the right direction if they are experiencing similar issues 🙂