Never delete log files, reclaim them.

Do you have information on SAP HANA Technology (Suse Linux, HANA Patches, DMIS and so on) then post it here.
Post Reply
User avatar
Hay Bouten
Posts: 131
Joined: Mon Dec 24, 2012 10:11 am
Location: Eindhoven, The Netherlands
Contact:

Never delete log files, reclaim them.

Post by Hay Bouten » Mon Jun 03, 2013 4:52 pm

A high number log segments can occur when for example the automatic log backup is down or the log savepoint is blocked for an extended time. During this period the filesystem accumulates the full log segments. These log segments use a lot of disk space so after the automatic log backup has been fixed you want to free the disk.

The log segment are stored in the location /hana/log/<SID>/mnt00001/hdb00002/logsegment_*. Never delete these files because they form a chain and are all still allocated by the database. In HANA looking at the table SYS.M_LOG_SEGMENTS you can see this.
BeforeReclaimLogs.png
BeforeReclaimLogs.png (295.72 KiB) Viewed 23671 times
In my test system the filesystem is 84% filled.

Code: Select all

HTBTHANA01:~ # df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda2            138305832 109346556  21933652  84% /
devtmpfs              31457280        88  31457192   1% /dev
tmpfs                 12371864        88  12371776   1% /dev/shm
To free the unneeded log segments execute the SQL command: ALTER SYSTEM RECLAIM LOG After execution the table SYS.M_LOG_SEGMENTS only holds 6 log segments.
AfterReclainLogs.png
AfterReclainLogs.png (107.67 KiB) Viewed 23671 times
On filesystem level everything was also cleaned.

Code: Select all

HTBTHANA01:~ # df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda2            138305832  82495444  48784764  63% /
devtmpfs              31457280        88  31457192   1% /dev
tmpfs                 12371864        88  12371776   1% /dev/shm

More information on the reclaim logs can be found on the SAP Service Marketplace.



Post Reply