If the tokens have been deleted using deletion web-service request, it would delete the data related to the specific token from encryption_requests table but it would not free up the disk space.
Please find below the steps to reclaim the disk space for deleted data from encryption_requests table.
NOTE: This process would lock the encryption_requests table while performing the optimization. So, please pull the node being optimized out of the LoadBalancer to avoid any performance issues.
|
- Log into the appliance as strongauth user.
- Check the current file size of the encryption_requests table.
shell> ls -lh /usr/local/strongauth/mariadb-<latest-version>/ibdata/strongkeylite/encryption_requests.*
- Stop Glassfish.
shell> sudo service glassfishd stop
- Optimize encryption_requests table to reclaim the unused disk space.
shell> nohup mysql -u skles -p`dbpass 2> /dev/null` strongkeylite -e "optimize table encryption_requests;" &
NOTE: This command will run in the background and would not time out even if the terminal gets disconnected. It took ~10 minutes to finish optimization after 60M tokens were deleted.
|
- Check periodically if the process is complete.
shell> ps -efww | grep -i encryption
NOTE: After successful completion of process, the optimize table process should not show up in the command output and the nohup.out file should have the output similar to below.
|
- Double check the file size of the encryption_requests table.
shell> ls -lh /usr/local/strongauth/mariadb-<latest-version>/ibdata/strongkeylite/encryption_requests.*
- Start Glassfish.
shell> sudo service glassfishd start
- Set KC-PINs and run 'pingsaka.sh 1' to confirm the appliance is activated.