cancel
Showing results for 
Search instead for 
Did you mean: 

regarding log relocation in HANA

Former Member
0 Kudos


Hi

I have upgraded HANA SPS4 and confirmed HANA studio, but System is still yellow
Says "DB Connection is not available" error.

I checked the nameserver_xxx_30001.log. it says DISK is full for log directory.
Can i relocate all the log files to another directory and restart the HANA? will it be problem?

Can you please tell me what should be the procedure to safely restart HANA


11560][0] 2012-06-19 10:26:08.533699 i PersistenceM PersistenceManagerImpl.cpp(01366) : Preparing log recovery handler, start position 0x30d342
[11560][0] 2012-06-19 10:26:08.586158 e Logger       LogSegment.cpp(00197) : Found not matching segments prevGUID:67C708B6-684A-20120615-032149-2AC000003E myPrevGUID: 67C708B6-684A-20120615-032149-2AC000003F
prev: LogSegment[0/58:0x30cf40-0x30d380[0x11000B] CurrentGuid: 67C708B6-684A-20120615-032149-2AC000003E PrevGuid: 67C708B6-684A-20120615-032149-2AC000003D/Closed/0x0]@0x00007fe90fcd4800 info: LogSegment[0:0x30cf40-0x30d380[0x11000B]/Closed]/LogSegmentGUID=67C708B6-684A-20120615-032149-2AC000003E/PrevLogSegmentGUID=67C708B6-684A-20120615-032149-2AC000003D/PersGUID=67C708B6-684A-20120530-230725-0CD0000001/LastRestoreGUID=00000000-0000-19720306-084436-2E00000000]
cur : LogSegment[0/60:0x30d380 CurrentGuid: 67C708B6-684A-20120619-005124-2E00000001 PrevGuid: 67C708B6-684A-20120615-032149-2AC000003F/Writing/0x0]@0x00007fe90fcd4a00 info: LogSegment[0:0x30d380/Writing]/LogSegmentGUID=67C708B6-684A-20120619-005124-2E00000001/PrevLogSegmentGUID=67C708B6-684A-20120615-032149-2AC000003F/PersGUID=67C708B6-684A-20120530-230725-0CD0000001/LastRestoreGUID=00000000-0000-19720306-084436-2E00000000]
[11560][0] 2012-06-19 10:26:08.586271 i PersistenceM PersistenceManagerImpl.cpp(02377) : BACKUP DATA seems to have been executed, database should be recoverable from backup
[11560][0] 2012-06-19 10:26:08.586285 i Logger       PersistenceManagerImpl.cpp(02493) : Deactivating REDO logging for log replay
[11560][0] 2012-06-19 10:26:08.586912 i Logger       PersistenceManagerImpl.cpp(02526) : Expecting savepoint 58470 log record as first log record at 0x30d342
[11560][0] 2012-06-19 10:26:08.587028 i Logger       RecoveryHandlerImpl.cpp(00630) : RecoveryQueueCount used: 48
[11555][0] 2012-06-19 10:26:08.590198 i Logger       RecoveryHandlerImpl.cpp(00333) : Stopping parsing of open segment LogSegment[0:0x30d380/Writing]/LogSegmentGUID=67C708B6-684A-20120619-005124-2E00000001/PrevLogSegmentGUID=67C708B6-684A-20120615-032149-2AC000003F/PersGUID=67C708B6-684A-20120530-230725-0CD0000001/LastRestoreGUID=00000000-0000-19720306-084436-2E00000000] at file position 0, unused rest 0B
[11560][0] 2012-06-19 10:26:08.627333 i Logger       PersistenceManagerImpl.cpp(02590) : Starting log replay at position 0x30d342
[11560][0] 2012-06-19 10:26:08.627342 i Logger       RecoveryHandlerImpl.cpp(01092) : Triggering recovery of remaining log
[11560][0] 2012-06-19 10:26:08.628047 i Logger       RecoveryHandlerImpl.cpp(01134) : Finishing log recovery, waiting for in-process and in-load segments
[11623][0] 2012-06-19 10:26:08.628089 i Logger       PersistenceManagerImpl.cpp(01997) : Found savepoint 58470 log record
[11623][0] 2012-06-19 10:26:08.628176 i Logger       RecoveryHandlerImpl.cpp(01414) : Log recovery cannot expect any more data at position 0x30d380, load states:
  - LogPartition[/usr/sap/H01/SYS/global/hdb/log/hdb00001/:0]: #segments 2/2 processed, 2/2 loaded, 2 total, last loaded LogSegment[0:0x30d380/Writing]/LogSegmentGUID=67C708B6-684A-20120619-005124-2E00000001/PrevLogSegmentGUID=67C708B6-684A-20120615-032149-2AC000003F/PersGUID=67C708B6-684A-20120530-230725-0CD0000001/LastRestoreGUID=00000000-0000-19720306-084436-2E00000000]
[11623][0] 2012-06-19 10:26:08.628262 i Logger       RecoveryHandlerImpl.cpp(02844) : Signaling finish wait barrier
[11623][0] 2012-06-19 10:26:08.628274 i Logger       RecoveryHandlerImpl.cpp(01709) : Recovery finished at log position 0x30d380
[11560][0] 2012-06-19 10:26:08.631134 i Logger       LogSegment.cpp(00266) : Closing open log segments after log recovery completed at position 0x30d380
[11560][0] 2012-06-19 10:26:08.631296 i Logger       LogSegment.cpp(00378) : Removing empty open on-disk segment LogSegment[0/60:0x30d380 CurrentGuid: 67C708B6-684A-20120619-005124-2E00000001 PrevGuid: 67C708B6-684A-20120615-032149-2AC000003F/Writing/0x0]@0x00007fe90fcd4a00 after log recovery completed at position 0x30d380
[11560][0] 2012-06-19 10:26:08.632013 i Logger       LoggerImpl.cpp(00603) : Replayed 3968B (0MB) of log in 0.04508 seconds; 0.0839436MB/s; max known TID=62221
[11560][0] 2012-06-19 10:26:08.632146 i Logger       LoggerImpl.cpp(00402) : Starting logger with 8 log buffers per partition, 1024KB each, segment size 64MB, log mode normal
[11554][0] 2012-06-19 10:26:08.632838 i EventHandler LocalFile.cpp(00220) : [DISKFULL] new on /usr/sap/H01/SYS/global/hdb/log/hdb00001/
[11554][0] 2012-06-19 10:26:08.632958 i EventHandler EventManagerImpl.cpp(00703) : Started AutoEventHandler (0s)
[11554][0] 2012-06-19 10:26:08.632973 i EventHandler EventManagerImpl.cpp(00502) : reportEvent: DiskFullEvent[id= 1, path= /usr/sap/H01/SYS/global/hdb/log/hdb00001/, state= NEW]

Regards

Chandra

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

Sorry i revised the content to read it more easy.

As you see above log, Log volume Disk is full. hope its not Log backup disk.

Looks like we cannot delete logsegment files in OS level. Can we execute using below command.

but how to find unused log segments? currently from HANA studio executing at SQL editor gives error.

ALTER SYSTEM RECLAIM LOG

Syntax

ALTER SYSTEM RECLAIM LOG [<log_part>]

Syntax Elements

<log_part> ::= Log part number

Description

Reclaim disk space of unused log segments

How to recover from this?..currently HANA is also down.

Can Pls suggest me the steps to recover.

Regards

Former Member
0 Kudos

Is there any other way to execute below SQL statement other than using HANA Studio SQL Editor?

Below "SAP Note 1642148 - FAQ: SAP HANA Database Backup &

Recovery" Question 27 says to delete log volume from SQL not from FIle system.


Because HANA is down now and cannot connect to database to execute SQL using SQL editor.

Advice please.

Regards

0 Kudos

Hi Chandra,

you can move a log segment to a different file system and create a symbolic link to the original directory. This will allow the HANA DB to restart. Ask for help, if you don't know exactly what to do - HANA needs a recovery from backup if a log segment gets lost!

But first check why the file system ran full!

- how many files (log segments) are in /usr/sap/H01/SYS/global/hdb/log ?

- check your backup strategy! too many backup in /usr/sap/H01/HDB01/backup ?

- check for alerts in SAP HANA database studio

If everything is OK, you can issue the 'ALTER SYSTEM RECLAIM LOG' to free space in the log area, shutdown the database and move the log segment back into its origin directory if the link is still there.

kind regards,

  Henrik

Former Member
0 Kudos

Hi Henrik

Thanks for reply.

I tried as you said executing ALTER command, it deletes most of the log files under logsegment and gives more space in that directory..

Thankyou.

Chandra

Answers (0)