You observe that the log volume has reached its capacity, causing the database to reject any new incoming requests.And the SAP ERP system or S/4 HANA system is hanging.
To determine whether the operating system path is full, you can use commands such as df -h or bdf to check the disk space usage.👀
Reason:
Due to an architectural limitation, SAP HANA cannot perform a log backup when the log area is completely full, leading to potential system unresponsiveness or failure to start.
Affected Releases:
SAP HANA 1: All revisions.
SAP HANA 2: Revisions from SPS00 to SPS05.
Prerequisites:
The log volume is full, causing the database to become unresponsive or fail to start.
Solution:
Upgrade to one of the following SAP HANA revisions:
SAP HANA 2: Revisions >= 060.00 (SPS06) or higher.
Workaround:
If upgrading is not immediately possible, follow these steps to resolve the issue:
Log in as
<SID>adm
User:
Ensure you are logged in as the<SID>adm
user on the host experiencing the log volume full issue.Stop the Database:
Execute the following command to stop the database:/usr/sap/hostctrl/exe/sapcontrol -nr <instance_number> -function StopSystem HDB
Wait until the database on all hosts is completely stopped.
Navigate to the Log Volume Directory:
Change to themnt00001
directory of the log volume (default path:/hana/log/<SID>/
):cd /hana/log/<SID>/mnt00001
Free Up Space in the Log Volume:
Identify a log volume consuming at least 2 GB of space using:
du -sh *
Move the identified log volume (e.g.,
hdb00003
) to a location with sufficient space, such as the data volume (default:/hana/data/<SID>
):mkdir /hana/data/<SID>/logs_temporary mv hdb00003 /hana/data/<SID>/logs_temporary
Create a Symbolic Link:
Create a symbolic link to the moved log volume in its original location:ln -s /hana/data/<SID>/logs_temporary/hdb00003 /hana/log/<SID>/mnt00001/hdb00003
Start the Database:
Start the database using:/usr/sap/hostctrl/exe/sapcontrol -nr <instance_number> -function StartSystem HDB
Wait for log backups to complete.
Reclaim Log Space:
Execute the following SQL statement on both the SYSTEMDB and tenant level to clean up the log volume:ALTER SYSTEM RECLAIM LOG;
Stop the Database Again:
Stop the database once more:/usr/sap/hostctrl/exe/sapcontrol -nr <instance_number> -function StopSystem HDB
Ensure the database is fully stopped on all hosts.
Remove the Symbolic Link and Restore the Log Volume:
Remove the symbolic link:
rm -f /hana/log/<SID>/mnt00001/hdb00003
Move the log volume back to its original location:
mv /hana/data/<SID>/logs_temporary/hdb00003 /hana/log/<SID>/mnt00001
Delete the temporary log folder:
rmdir /hana/data/<SID>/logs_temporary
Restart the Database:
Start the database again:/usr/sap/hostctrl/exe/sapcontrol -nr <instance_number> -function StartSystem HDB
Summary:
This workaround temporarily frees up space in the log volume by relocating a portion of it, allowing the database to start and perform log backups. After reclaiming log space, the log volume is restored to its original state. However, upgrading to SAP HANA 2 SPS06 or higher is the recommended long-term solution to avoid this issue.
Comments
Post a Comment