Bacula-users

Re: [Bacula-users] Corrupted catalog on bad drive - please help!

2013-02-11 17:45:32
Subject: Re: [Bacula-users] Corrupted catalog on bad drive - please help!
From: Phil Stracchino <alaric AT metrocast DOT net>
To: bacula-users AT lists.sourceforge DOT net
Date: Mon, 11 Feb 2013 17:42:53 -0500
On 02/11/13 16:09, Michael Stauffer _g wrote:
> I'm seeing the error in bacula logs:
> 
> ERR=Duplicate entry '1828889455' for key 1
> 
> running dbcheck yields:
> 
> "Query failed: SELECT File.FileId,Job.JobId FROM File LEFT OUTER JOIN
> Job ON (File.JobId=Job.JobId) WHERE Job.JobId IS NULL LIMIT 300000:
> ERR=Table './bacula/File' is marked as crashed and should be repaired".
> 
> But running 'myisamchk -r -q File.MYI' yields:
> 
> "myisamchk: error: - check record delete-chain
> 
> Can't read delete-link at filepos: 13937713076
> 
> myisamchk: error: Quick-recover aborted; Run recovery without switch 'q'
> 
> Updating MyISAM file: File.MYI
> 
> MyISAM-table 'File.MYI' is not fixed because of errors
> 
> Try fixing it by using the --safe-recover (-o), the --force (-f) option
> or by not using the --quick (-q) flag"

Without belaboring the point too much, MyISAM is an obsolete, legacy
storage engine that does not scale to modern systems or database sizes,
is not robust, cannot be backed up without locking tables, has no crash
recovery to speak of, and should not be in use in production databases.
 Pretty much the only reason it has not been deprecated is because
Oracle has not yet been able to remove all of the dependencies in MySQL
upon MyISAM for the grant tables.  The odds are as soon as MySQL can use
InnoDB to store its grant tables (probably in 6.0), MyISAM will be
deprecated.


If you suspect hard (as in unrecoverable) disk errors, my advice would
be to replace the disk, recreate your DBs using InnoDB tables, properly
retune MySQL for InnoDB, then rebuild your catalog using bscan.

(You might also update to a current MySQL version while you're at it.
I'm guessing you probably have, at best, MySQL 5.0.95.  5.0 was EOL'd in
2011, 5.1 will be EOL'd this year, current most recent versions are
5.5.30 and 5.6.10.)


-- 
  Phil Stracchino, CDK#2     DoD#299792458     ICBM: 43.5607, -71.355
  alaric AT caerllewys DOT net   alaric AT metrocast DOT net   phil AT 
co.ordinate DOT org
  Renaissance Man, Unix ronin, Perl hacker, SQL wrangler, Free Stater
                 It's not the years, it's the mileage.

------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users