By default, the InCenter virtual machine will provide 40 Gbytes of storage space for storing both system and OpenSearch database node logs. This may need to be expanded and this can be done by first adding an additional storage volume to the virtual machine and then moving the InCenter logging directory to this new volume.
The detailed steps for doing this are the following:
Shutdown the InCenter virtual machine.
Add the required additional storage volume to the virtual machine.
Start the virtual machine again.
Connect to the Linux CLI using SSH via port 2222 on the InCenter management IP address.
Stop the InCenter logging service:
$ sudo service opensearch stop
Create new Linux physical volume. Note that the new Linux storage volume should be named something new like "sdb":
$ sudo pvcreate /dev/sdb
Create new volume group:
$ sudo vgcreate vg-log-data /dev/sdb
Create new logical volume:
$ sudo lvcreate -l 100%FREE -n lv01 vg-log-data
Create the file system for the new logical volume:
$ sudo mkfs -t ext4 /dev/mapper/vg--log--data-lv01
Create a temporary directory to copy the old log data into:
$ sudo mkdir -p /mnt/log-data/opensearch/
Mount the new logical volume to the temporary directory created:
$ sudo mount /dev/vg-log-data/lv01 /mnt/log-data/opensearch/
Copy the old log data to the temporary directory (in the new logical volume):
$ sudo cp -a /var/lib/opensearch/. /mnt/log-data/opensearch/
Once the copy is done, unmount the temporary directory:
$ sudo umount /dev/vg-log-data/lv01 /mnt/log-data/opensearch
Mount the InCenter log directory to the new logical volume:
$ sudo mount /dev/vg-log-data/lv01 /var/lib/opensearch
In order to maintain the mount point after restarts, add an fstab entry:
$ echo '/dev/mapper/vg--log--data-lv01 /var/lib/opensearch
ext4 defaults,comment=cloudconfig _netdev
nofail 0 0' | sudo tee -a /etc/fstab
Start the InCenter logging service again:
$ sudo service opensearch start
Reconnect with SSH to the InCenter CLI on port 22 and increase the maximum log database storage size:
admin@InCenter:/> cc Settings admin@InCenter:/Settings> set LogServer MaximumLogDatabaseSize=100
The size specified will depend on the total amount of storage space allocated in to the virtual machine. It is recommended that the MaximumLogDatabaseSize is set to no more than 75% of the available space.