Friday, 14 February 2020

Log volumes are full in HDB

Log Volume is Full and the Database Doesn’t Accept any new Requests
If the log_mode is set to legacy the logvolume keeps all log segments since the last full backup in the logvolume.

If no backups are performed the logvolume can run out of space.

Solution

1. Stop the database:

HDB stop

2. Change into the folder mnt00001 of the logvolume (Default: /usr/sap//global/hdb/log):

cd /usr/sap//global/hdb/log/mnt00001

3. You have to move one of the logvolumes temporarily to another volume where enough space is available.

You should free at least 2 GB of space to ensure that the database has enough space to start.

To find out the space consumption of each volume execute:

du -sh

4. Move a volume which consumes at least 2 GB of space (e.g. hdb00003)

to a volume with enough free space,

e.g. to the data volume (Default: /usr/sap//global/hdb/data):

mv hdb00003 /usr/sap//global/hdb/data

5. Create a symbolic link to the new folder in the old location:

ln -s /usr/sap//global/hdb/data/hdb00003 /usr/sap//global/hdb/log/mnt00001/hdb00003

6. Start the database (HDB start) and perform a backup

7. Use the following SQL-Statement to clean up the logvolume:

ALTER SYSTEM RECLAIM LOG;

8. Stop the database again and remove the symbolic link:

rm -f /usr/sap//global/hdb/log/mnt00001/hdb00003

9. Move the log volume back to its original location:

mv /usr/sap//global/hdb/data/hdb00003 /usr/sap//global/hdb/log/mnt00001

10. Start the database (HDB start)

ref: 1679938 – Log Volume is full (log mode = legacy)

2 comments:

  1. Why not trigger the full backup or log backup ?
    Anyways u are using altersystem reclaim log so u can trigger a backup first from studio,it will clear the log files.

    ReplyDelete
  2. If Log volume gets full you will not able to connect System DB and tenant DB, Hana system will be in Hung state. So we can't trigger backups.

    ReplyDelete