on 2024 Sep 26 4:12 PM
Hello everyone,
after a hang log_backup, our logsegments on the HDB under /hana/log/SID/mnt00001/hdb00003.00003 were no longer backed up for about 14 days.
Now the backup is running correctly again, but there are now 2265 logsegments (files) with the status FREE and we had to enlarge the affected volume several times.
The individual log segments are now being overwritten/reused step by step, but there are no fewer of them, so the volume is still nearly full.
hdblogdiag seglist /hana/log/SID/mnt00001/hdb00003.00003 | grep -i '\bFree\b' | wc -l
2765 (number of files in state free)
According to sapnote 2083715, we can do this with "ALTER SYSTEM RECLAIM LOG;"
"You can free the space on your file system occupied by the allocated log segments by executing the following SQL statement: ALTER SYSTEM RECLAIM LOG;"
https://me.sap.com/notes/2083715/D
What general conditions apply to the command?
Does the SAP Application have to be offline for this?
I'm looking forward to your feedback.
Kind regards, Martin
Request clarification before answering.
You can safely release log segments anytime using the SQL statement below. There is no need to stop the application. (You must not use OS commands, like rm, to remove log segments. This would make your instance unusable.).
The SQL will just remove log segments in status FREE, which are neither required for crash recovery nor any other purpose (HSR, to be backed up, etc.).
The only drawback is, that HANA has to format new log segments next time there are no log segments in status FREE. Usually, formatting log segments is not an issue unless you suffer from slow disk I/O.
On the other hand there is no need to remove any log segments unless you want to free the disk space. Keep in mind that XFS file system does not support reducing the file system size at all, even not offline (just in case you use XFS).
Regards,
Alexander
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
96 | |
15 | |
10 | |
8 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.