Never delete log files, reclaim them.
Posted: 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. In my test system the filesystem is 84% filled.
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.
On filesystem level everything was also cleaned.
More information on the reclaim logs can be found on the SAP Service Marketplace.
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. 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
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.