1

I'm on CentOS 5.

[root@newjanux spooldb]# uname -a
Linux newjanux 2.6.18-164.el5 #1 SMP Thu Sep 3 03:28:30 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux

and SGE 6.2u2

I already have copies of the original database just in case ... berkeley db won't start for corruption. The tool which supposedly fixes this comes with the package but it fails (in the same way):

[root@newjanux spooldb]# /opt/sge/utilbin/lx24-amd64/db_recover -v -c 
Finding last valid log LSN: file: 2136 offset 2719640
db_recover: Log file corrupt at LSN: [399][10485626]
db_recover: PANIC: Invalid argument
db_recover: DB_ENV->open: DB_RUNRECOVERY: Fatal error, run database recovery

Well, I thought I was running the database recovery!

Now what?

longneck
  • 22,793
  • 4
  • 50
  • 84
Henry N6HCM
  • 111
  • 1
  • 3
  • What happens when you try without `-c`? – longneck Jul 10 '13 at 18:39
  • good question; answer is "same thing." [root@newjanux spooldb]# /opt/sge/utilbin/lx24-amd64/db_recover -v Finding last valid log LSN: file: 2136 offset 2719640 db_recover: Log file corrupt at LSN: [399][10485626] db_recover: PANIC: Invalid argument db_recover: DB_ENV->open: DB_RUNRECOVERY: Fatal error, run database recovery – Henry N6HCM Jul 10 '13 at 19:05
  • At this point I'd rather just have the dateabase with the queues established. there are no jobs running so no data to preserve. – Henry N6HCM Jul 10 '13 at 21:15
  • I seem to have wound the errors down to this: 07/10/2013 15:50:56| main|sol|E|couldn't open berkeley database "sge": (13) Permission denied 07/10/2013 15:50:56| main|sol|E|startup of rule "default rule" in context "berkeleydb spooling" failed 07/10/2013 15:50:56| main|sol|C|setup failed – Henry N6HCM Jul 10 '13 at 22:54

1 Answers1

1

When you use the -c option, you have to restore a clean copy of the database, along with all of the logs generated after that backup copy was made. The -c option then uses the logs to apply the missing transactions.

See http://docs.oracle.com/cd/E17275_01/html/programmer_reference/transapp_recovery.html

longneck
  • 22,793
  • 4
  • 50
  • 84