Recovering from vCenter Appliance Disk Errors on LVM Devices
Let's say you have a ghetto vSphere home lab.
And let's say that you are running a vCenter Appliance to manage that home lab because you didn't want to devote a whole physical machine to that task because you are cheap.
And let's say you are running a small storage server for that home lab that is hosting the disks for that vCenter Appliance.
And let's say that that home storage server is running on a UPS, but _sometimes_ the power goes out for a little bit longer than your UPS can handle and you haven't had the time to configure that file server to shutdown the vSphere hosts before it shuts itself down.
Everything comes back up after the power failure, but your vCenter Appliance VM is complaining about file system errors and won't boot. How do you fix that?
Well, the good news is that there are some great guides out there to get you part of the way to a solution. I followed http://www.opvizor.com/blog/vmware-vcenter-server-appliance-vcsa-filesystem-is-damaged/ to get out to a BASH prompt, but the filesystems that I was getting errors for were on LVM volume groups. And when I went to look for those devices, they weren't showing up under /dev/mapper.
The problem was that those LVM volume groups were not being marked active when I booted up using the method in the procedure above. Luckily, the commands below allow you to make sure the device nodes get created under /dev/mapper, and then you can run fsck against the failing LVM devices.
And let's say that you are running a vCenter Appliance to manage that home lab because you didn't want to devote a whole physical machine to that task because you are cheap.
And let's say you are running a small storage server for that home lab that is hosting the disks for that vCenter Appliance.
And let's say that that home storage server is running on a UPS, but _sometimes_ the power goes out for a little bit longer than your UPS can handle and you haven't had the time to configure that file server to shutdown the vSphere hosts before it shuts itself down.
Everything comes back up after the power failure, but your vCenter Appliance VM is complaining about file system errors and won't boot. How do you fix that?
Well, the good news is that there are some great guides out there to get you part of the way to a solution. I followed http://www.opvizor.com/blog/vmware-vcenter-server-appliance-vcsa-filesystem-is-damaged/ to get out to a BASH prompt, but the filesystems that I was getting errors for were on LVM volume groups. And when I went to look for those devices, they weren't showing up under /dev/mapper.
The problem was that those LVM volume groups were not being marked active when I booted up using the method in the procedure above. Luckily, the commands below allow you to make sure the device nodes get created under /dev/mapper, and then you can run fsck against the failing LVM devices.
(none):/ # modprobe dm_mod (none):/ # vgscan Failed to find sysfs mount point Reading all physical volumes. This may take a while... Found volume group "invsvc_vg" using metadata type lvm2 Found volume group "autodeploy_vg" using metadata type lvm2 Found volume group "netdump_vg" using metadata type lvm2 Found volume group "seat_vg" using metadata type lvm2 Found volume group "dblog_vg" using metadata type lvm2 Found volume group "db_vg" using metadata type lvm2 Found volume group "log_vg" using metadata type lvm2 Found volume group "core_vg" using metadata type lvm2 Found volume group "invsvc_vg" using metadata type lvm2 (none):/ # vgchange -ay Failed to find sysfs mount point 1 logical volume(s) found in volume group "invsvc_vg" now active 1 logical volume(s) found in volume group "autodeploy_vg" now active 1 logical volume(s) found in volume group "netdump_vg" now active 1 logical volume(s) found in volume group "seat_vg" now active 1 logical volume(s) found in volume group "dblog_vg" now active 1 logical volume(s) found in volume group "db_vg" now active 1 logical volume(s) found in volume group "log_vg" now active 1 logical volume(s) found in volume group "core_vg" now active 1 logical volume(s) found in volume group "invsvc_vg" now active (none):/ # fsck /dev/mapper/log_vg-log fsck from util-linux 2.19.1 e2fsck 1.41.9 (22-Aug-2009) ...
Comments