There are two types of partitions on the appliance that may require manual filesystem checks:
- Standard partitions formatted as ext3 filesystems used for /boot and / (root)
These partitions are identified as /dev/sda2 (/boot) and /dev/sda4 (/)
- LVM partitions formatted as ext3 filesystems used for /storage/db, /storage/log, and /storage/core
The LVM partitions will consist of one or more /dev/sdX partition(s). LVM manages these partitions, and you cannot perform e2fsck on these partitions directly, rather you must perform the filesystem check on the LVM volume itself. The LVM volumes are identified as /dev/mapper/data-log, /dev/mapper/data-db, and /dev/mapper/data-core.
To perform e2fsck on the two standard partitions, appliance must be booted into single user mode in read-only (ro) mode. To perform e2fsck on the three LVM partitions, appliance must be booted into single user mode in read-write (rw) mode to allow device node creation on root filesystem.
The procedure below can be performed in full, or on individual filesystems on an as-needed basis
Manual filesystem check on standard partitions (/ and /boot)
- Log into the vRealize/Aria Operations admin UI as the local admin user.
- Select the desired node and click Take Node Offline/Online.
Note: If single node cluster, or non-HA/CA cluster, click Take Offline under Cluster Status.
- Take a snapshot of the affected node(s) before proceeding. How to take a Snapshot of VMware Aria Operations
- In the vSphere Client, open the console of the desired node.
- With the console open, restart or power on the virtual machine.
- Type the letter e to go to the GNU GRUB edit menu.
Notes:
- Press the up and down arrow keys even if the option appears to already be selected. Otherwise, the machine continues to boot, and you have to start over.
- The cursor appears at the end of a line of boot options near the bottom of the display.
- If you cannot reach the boot menu before it disappears, enable Force BIOS setup in the Virtual Machine's Settings > VM Options > Boot Options and reboot.
- When the GRUB loader menu appears, immediately use the up and down arrow keys to navigate to the end of the line that starts with Photon OS or Linux for new 8.x deployments.
- Add a space, then type ro init=/bin/bash which adds another option to the line.
Use 'ro' to ensure that filesystems are booted in read-only mode, as this is required to run filesystem checks on root and boot filesystems
- Press F10.
The virtual appliance starts in single-user mode.
- Type e2fsck -y /dev/sda2 to initiate filesystem check on boot (/boot) filesystem.
- Type e2fsck -y /dev/sda4 to initiate filesystem check on root (/) filesystem.
- When commands above are complete. Reboot with reboot -f to reboot to single user mode in read-write mode.
- If you also need to perform filesystem check on LVM filesystems, you can go directly to step 6 on procedure below. Please be aware that the GRUB menu will not remain on screen for very long.
Manual filesystem check on LVM partitions (/storage/db, /storage/log, and /storage/core)
- Log into the vRealize/Aria Operations admin UI as the local admin user.
- Select the desired node and click Take Node Offline/Online.
Note: If single node cluster, or non-HA/CA cluster, click Take Offline under Cluster Status.
- Take a snapshot of the affected node(s) before proceeding. How to take a Snapshot of VMware Aria Operations
- In the vSphere Client, open the console of the desired node.
- With the console open, restart or power on the virtual machine.
- Type the letter e to go to the GNU GRUB edit menu.
Notes:
- Press the up and down arrow keys even if the option appears to already be selected. Otherwise, the machine continues to boot, and you have to start over.
- The cursor appears at the end of a line of boot options near the bottom of the display.
- If you cannot reach the boot menu before it disappears, enable Force BIOS setup in the Virtual Machine's Settings > VM Options > Boot Options and reboot.
- When the GRUB loader menu appears, immediately use the up and down arrow keys to navigate to the end of the line that starts with Photon OS or Linux for new 8.x deployments.
- Add a space, then type rw init=/bin/bash which adds another option to the line.
Use 'rw' to ensure that filesystems are booted in read-write mode
- Press F10.
The virtual appliance starts in single-user mode.
- Activate LVMs using commands below:
lvchange -ay /dev/data/core
lvchange -ay /dev/data/db
lvchange -ay /dev/data/log
Ignore the warnings regarding lvmetad service. This service does not run in single user mode.
- Type lvscan to ensure that all filesystems are ACTIVE.
Example output:
ACTIVE '/dev/data/core' [20.00 GiB] inherit
ACTIVE '/dev/data/log' [20.00 GiB] inherit
ACTIVE '/dev/data/db' [<40.00 GiB] inherit
- Type vgscan --mknodes to create device nodes for /dev/mapper devices.
- Run filesystem checks on all filesystems using commands below.
e2fsck -y /dev/mapper/data-core
e2fsck -y /dev/mapper/data-db
e2fsck -y /dev/mapper/data-log
Note: Do not issue all commands simultaneously. Filesystem check on data-db may take a long time, depending on the size of this filesystem
- When all 3 commands are complete. Reboot with reboot -f