Database maintenance
PowerVC performs
soft deletion while deleting a record from its database. You might occasionally want to remove such
soft deleted table rows. This operation is called purging the database. You can use the
powervc-manage
tool to accomplish purging activities. PowerVC supports purging Nova, Cinder, and Glance
databases.
PowerVC has a cron job (daily) that purges database records that are older than 90 days.
User can perform the following steps
to modify the cron job, which deletes the data older than 90 days by default.
- Open /etc/cron.daily/powervc_purge_deleted_records file.
- Change
/opt/ibm/powervc/bin/powervc-manage -o dbpurge -y
to/opt/ibm/powervc/bin/powervc-manage -o dbpurge -d <days> -y
- Restart cron service.
For example, if you want to delete records older than 60 days instead of 90 days, edit
the file as shown
below.
/opt/ibm/powervc/bin/powervc-manage -o dbpurge -d 60 -y
Purging the database
Follow these steps to purge the soft-deleted rows from the tables:
Run the /opt/ibm/powervc/bin/powervc-manage -o dbpurge command.
You can use the following optional parameters:
- --older-than-days DAYS: Purge the rows that have been deleted for longer than
DAYS
days. The default is 90 days. - --noprompt: Specifies whether to suppress the warning message when purging deleted records.
Example:
/opt/ibm/powervc/bin/powervc-manage -o dbpurge --older-than-days 7 -y
Running this command purges the rows, which are older than 7 days, from the Nova, Cinder, and Glance databases.