Resize the Persistent Volume Claim (PVC) that you use for SOAR by moving the PVC data to
a temporary PVC and then back again to the resized one.
Before you begin
- Install Red Hat® OpenShift® CLI 4.16 or 4.18.
- Back up your QRadar® Suite Software data before you
follow this procedure. For more information about backups, see Backing up QRadar Suite Software.
- Gather the following information.
- The namespace in which QRadar Suite Software is
installed.
- The storageClass used for the QRadar Suite Software
deployment.
- The new size of the PVC to create. The new size must be larger than the current PVC size.
- The repository URL, if your QRadar Suite Software
deployment is in an air-gapped environment.
- This procedure is for deployments where the storage class used does not support volume
expansion, such as VMware thin storage. Check whether your storage class supports volume expansion
by typing the following
command:
oc describe sc <storage_class> | grep AllowVolumeExpansion
If
the value is set to True, follow the Modifying QRadar Suite Software deployment resource specifications procedure to resize the PVC.
If the value is set to False,
follow this procedure to resize the PVC.
Procedure
- Log in to your Red Hat OpenShift Container Platform cluster as a cluster administrator by
typing one of the following commands, where <openshift_url>
is the URL for your Red Hat OpenShift Container Platform
environment.
- Switch to your QRadar Suite Software namespace by typing the following command.
oc project <cp4s_namespace>
For example, if your QRadar Suite Software namespace
is cp4sexample, type the following command.
oc project cp4sexample
The following example output shows that you switched to the cp4sexample
namespace.
Now using project "cp4sexample" on server "https://example.com:6443".
- Clone the cp4s-configuration repository in your working
directory.
- If you don't already have one, create a working directory by typing
the following command.
mkdir <working_directory>
- Go to your working directory by typing the following command.
- Clone the cp4s-configuration repository by typing the following
command.
git clone https://github.com/cp4sec/cp4s-configuration.git
- Go to the resize-pvc/soar-postgres directory by typing the
following command.
cd cp4s-configuration/resize-pvc/soar-postgres
- Create temporary PVCs.
- Edit temp-pvcs.yaml to set the
namespace and storageClassName parameters that are
required for your deployment.
- Create temporary PVCs by typing the following command.
oc apply -f temp-pvcs.yaml
The expected output of this command is:
persistentvolumeclaim/temp-pvc-keeper-0 created
persistentvolumeclaim/temp-pvc-keeper-1 created
- Scale down applications that use the Postgres instance by typing the
following command.
oc scale --replicas=0 deployment/isc-cases-activemq deployment/isc-cases-application deployment/isc-cases-email deployment/isc-cases-event-handler
- Scale down the Postgres instance by typing the following
commands.
oc scale --replicas=0 deployment/soar-postgres-proxy deployment/soar-postgres-sentinel
oc scale --replicas=0 statefulset/soar-postgres-keeper
- Move the PVC data within a temporary
pod.
- If your QRadar Suite Software deployment is in an air-gapped environment,
update the image parameter in busybox-swap-pvc-0.yaml.
- Start the busybox pods by typing the following command.
oc apply -f busybox-swap-pvc-0.yaml -f busybox-swap-pvc-1.yaml
- Confirm that the pods are in the
Running state by typing the following command.
oc get pods | grep busybox-swap-pvc
The expected output of this command is
busybox-swap-pvc-0 1/1 Running 0 14s
busybox-swap-pvc-1 1/1 Running 0 18s
- Copy the content from the busybox pods into the temporary PVCs by typing the following
commands.
oc exec busybox-swap-pvc-0 -- /bin/sh -c "cp -rp data-source/* data-destination"
oc exec busybox-swap-pvc-1 -- /bin/sh -c "cp -rp data-source/* data-destination"
- Delete the busybox pod by typing the following command.
oc delete pod busybox-swap-pvc-0 busybox-swap-pvc-1
- Delete the original PVCs by typing the following command.
oc delete pvc soar-postgres-data-soar-postgres-keeper-0 soar-postgres-data-soar-postgres-keeper-1
The expected output of this command is:
persistentvolumeclaim "soar-postgres-data-soar-postgres-keeper-0" deleted
persistentvolumeclaim "soar-postgres-data-soar-postgres-keeper-1" deleted
- Create new PVCs with the required size.
- Edit new-pvcs.yaml to set the namespace and storageClassName
parameters that are required for your deployment.
- Create temporary PVCs by typing the following command.
oc apply -f new-pvcs.yaml
The expected output of this command is:
persistentvolumeclaim/soar-postgres-data-soar-postgres-keeper-0 created
persistentvolumeclaim/soar-postgres-data-soar-postgres-keeper-1 created
- Copy the PVC data from the temporary PVCs to the new
PVCs.
- If your QRadar Suite Software deployment
is in an air-gapped environment, update the image parameter in
busybox-swap-pvc-0.yaml.
- Start the busybox pod by typing the following command.
oc apply -f busybox-swap-pvc-0.yaml -f busybox-swap-pvc-1.yaml
- Confirm that the pods are in the
Running state by typing the following command.
oc get pods | grep busybox-swap-pvc
The expected output of this command is
busybox-swap-pvc-0 1/1 Running 0 14s
busybox-swap-pvc-1 1/1 Running 0 18s
- Copy the content from the busybox pods into the new PVCs by typing the following
command.
oc exec busybox-swap-pvc-0 -- /bin/sh -c "cp -rp data-destination/* data-source"
oc exec busybox-swap-pvc-1 -- /bin/sh -c "cp -rp data-destination/* data-source"
- Delete the busybox pod by typing the following command.
oc delete pod busybox-swap-pvc-0 busybox-swap-pvc-1
- Scale up the Postgres instance by typing the following commands.
oc scale --replicas=2 deployment/soar-postgres-proxy
oc scale --replicas=3 deployment/soar-postgres-sentinel
oc scale --replicas=2 statefulset/soar-postgres-keeper
- Scale up the applications that use the Postgres instance by typing the following
command.
oc scale --replicas=1 deployment/isc-cases-activemq deployment/isc-cases-application deployment/isc-cases-email deployment/isc-cases-event-handler
- Validate the QRadar Suite Software application, then delete the temporary PVC
by typing the following command.
oc delete pvc temp-pvc-keeper-0 temp-pvc-keeper-1