About Me

My photo
I am Suresh Chinta, working on SAP HANA Cloud & SAP BTP Cloud/ AWS/Azure cloud consultant.I have experience in SAP Basis/Netweaver , S4HANA Cloud implementations / Support. I'm certified Microsoft Azure cloud & AWS professional. I have started this blog to share my knowledge with all those who are interested to learn & enhance their career.

Thursday, May 28, 2020

Reclaim size of volume “/hana/log” when it is full

In SAP HANA there are four main basepath parameters which you find in the ‘configuration’ tab in SAP HANA Studio:
  • Basepath_databackup -> for space management the recommendation is to point it to an external mount point. As an alternative, back it up to a local disk with sufficient space and move the databackups to the external mount point (performance of the backup will be faster than to an external mount point)
  • Basepath_datavolumes -> permanent location for data volumes, never delete any datavolume files on OS.
  • Basepath_logbackup -> automatically copies of log segment every 15 minutes or if log segment segment is full, so a lot of files get created quickly. Two important items, first point it to an external mount point. Second, use the script attached to the note at the end of this blog to identify which log backup files you can delete.
  • Basepath_logvolumes -> permanent location for log volumes, never delete any logvolume files on OS. Optionally use “ALTER SYSTEM RECLAIM LOG” is for cleaning up this directory.
“ALTER SYSTEM RECLAIM LOG” before and after SAP HANA SPS3:
Before SAP HANA SPS3 it was recommended to run this command manually after every backup to ensure disk space was reclaimed. The command physically removes the log segments that are no longer needed. With SPS3 log backup functionality was introduced which automates log segment reuse and can eliminate the need to run “ALTER SYSTEM RECLAIM LOG”.
In most SAP HANA instances, especially productive systems, the log_mode is set to ‘normal’ and enable_auto_log_backup set to ‘yes’. This means that log backups are created automatically when a log segment is full or a log segment is closed after exceeding the configured time threshold. The log backup allows the log segment to be reused for new log entries, which eliminates the need to run “ALTER SYSTEM RECLAIM LOG” under normal circumstances. So after SAP HANA SPS3 “ALTER SYSTEM RECLAIM LOG” should only be used in exceptional situations, for example if there is a problem with writing the log backup and you get an alert the log volume disk/path is close to full.
This note can be helpful to schedule backups: https://service.sap.com/sap/support/notes/1651055 – if you read the attachment to the note it gives you an option to identify which log backups can be to deleted. In SAP HANA there are four main basepath parameters which you find in the ‘configuration’ tab in SAP HANA Studio:
  • Basepath_databackup -> for space management the recommendation is to point it to an external mount point. As an alternative, back it up to a local disk with sufficient space and move the databackups to the external mount point (performance of the backup will be faster than to an external mount point)
  • Basepath_datavolumes -> permanent location for data volumes, never delete any datavolume files on OS.
  • Basepath_logbackup -> automatically copies of log segment every 15 minutes or if log segment segment is full, so a lot of files get created quickly. Two important items, first point it to an external mount point. Second, use the script attached to the note at the end of this blog to identify which log backup files you can delete.
  • Basepath_logvolumes -> permanent location for log volumes, never delete any logvolume files on OS. Optionally use “ALTER SYSTEM RECLAIM LOG” is for cleaning up this directory.
“ALTER SYSTEM RECLAIM LOG” before and after SAP HANA SPS3:
Before SAP HANA SPS3 it was recommended to run this command manually after every backup to ensure disk space was reclaimed. The command physically removes the log segments that are no longer needed. With SPS3 log backup functionality was introduced which automates log segment reuse and can eliminate the need to run “ALTER SYSTEM RECLAIM LOG”.
In most SAP HANA instances, especially productive systems, the log_mode is set to ‘normal’ and enable_auto_log_backup set to ‘yes’. This means that log backups are created automatically when a log segment is full or a log segment is closed after exceeding the configured time threshold. The log backup allows the log segment to be reused for new log entries, which eliminates the need to run “ALTER SYSTEM RECLAIM LOG” under normal circumstances. So after SAP HANA SPS3 “ALTER SYSTEM RECLAIM LOG” should only be used in exceptional situations, for example if there is a problem with writing the log backup and you get an alert the log volume disk/path is close to full.
This note can be helpful to schedule backups: https://service.sap.com/sap/support/notes/1651055 – if you read the attachment to the note it gives you an option to identify which log backups can be to deleted.