[Bacula-users] bacula and database crash

2007-04-24 Thread Dave
Hi,
I've got a problem between bacula and mysql and would appreciate any 
help. Output below.
Thanks.
Dave.

24-Apr 05:51 zeus-dir: Start Backup JobId 70, 
Job=backup_wserv.2007-04-24_05.51.00
24-Apr 05:51 zeus-dir: backup_wserv.2007-04-24_05.51.00 Fatal error: 
sql_find.c:320 sql_find.c:320 query SELECT 
MediaId,VolumeName,VolJobs,VolFiles,VolBlocks,VolBytes,VolMounts,VolErrors,VolWrites,MaxVolBytes,VolCapacityBytes,VolRetention,VolUseDuration,MaxVolJobs,MaxVolFiles,Recycle,Slot,FirstWritten,LastWritten,VolStatus,InChanger,VolParts,LabelType
 
FROM Media WHERE PoolId=13 AND MediaType='File' AND Enabled=1 AND 
VolStatus='Append'  ORDER BY LastWritten IS NULL,LastWritten DESC,MediaId 
LIMI
 1 failed:
Table 'Media' is marked as crashed and should be repaired
24-Apr 05:51 zeus-dir: sql_find.c:320 SELECT 
MediaId,VolumeName,VolJobs,VolFiles,VolBlocks,VolBytes,VolMounts,VolErrors,VolWrites,MaxVolBytes,VolCapacityBytes,VolRetention,VolUseDuration,MaxVolJobs,MaxVolFiles,Recycle,Slot,FirstWritten,LastWritten,VolStatus,InChanger,VolParts,LabelType
 
FROM Media WHERE PoolId=13 AND MediaType='File' AND Enabled=1 AND 
VolStatus='Append'  ORDER BY LastWritten IS NULL,LastWritten DESC,MediaId 
LIMIT 1
24-Apr 05:51 zeus-dir: backup_wserv.2007-04-24_05.51.00 Fatal error: 
sql_find.c:320 sql_find.c:320 query SELECT 
MediaId,VolumeName,VolJobs,VolFiles,VolBlocks,VolBytes,VolMounts,VolErrors,VolWrites,MaxVolBytes,VolCapacityBytes,VolRetention,VolUseDuration,MaxVolJobs,MaxVolFiles,Recycle,Slot,FirstWritten,LastWritten,VolStatus,InChanger,VolParts,LabelType
 
FROM Media WHERE PoolId=13 AND MediaType='File' AND Enabled=1 AND 
VolStatus='Recycle'  ORDER BY LastWritten IS NULL,LastWritten DESC,MediaId 
LIM
T 1 failed:
Table 'Media' is marked as crashed and should be repaired
24-Apr 05:51 zeus-dir: sql_find.c:320 SELECT 
MediaId,VolumeName,VolJobs,VolFiles,VolBlocks,VolBytes,VolMounts,VolErrors,VolWrites,MaxVolBytes,VolCapacityBytes,VolRetention,VolUseDuration,MaxVolJobs,MaxVolFiles,Recycle,Slot,FirstWritten,LastWritten,VolStatus,InChanger,VolParts,LabelType
 
FROM Media WHERE PoolId=13 AND MediaType='File' AND Enabled=1 AND 
VolStatus='Recycle'  ORDER BY LastWritten IS NULL,LastWritten DESC,MediaId 
LIMIT 1
24-Apr 05:51 zeus-dir: backup_wserv.2007-04-24_05.51.00 Error: Query failed: 
SELECT MediaId,LastWritten FROM Media WHERE PoolId=13 AND Recycle=1 AND 
VolStatus='Purged' AND Enabled=1 AND MediaType='File' ORDER BY LastWritten 
ASC,MediaId LIMIT 1: ERR=Table 'Media' is marked as crashed and should be 
repaired
24-Apr 05:51 zeus-dir: backup_wserv.2007-04-24_05.51.00 Error: Media id 
select failed: ERR=Table 'Media' is marked as crashed and should be repaired
24-Apr 05:51 zeus-dir: backup_wserv.2007-04-24_05.51.00 Error: Media id 
select failed: ERR=Table 'Media' is marked as crashed and should be repaired
24-Apr 05:51 zeus-dir: backup_wserv.2007-04-24_05.51.00 Error: Query failed: 
SELECT MediaId,LastWritten FROM Media WHERE PoolId=13 AND Recycle=1 AND 
VolStatus='Purged' AND Enabled=1 AND MediaType='File' ORDER BY LastWritten 
ASC,MediaId LIMIT 1: ERR=Table 'Media' is marked as crashed and should be 
repaired
24-Apr 05:51 zeus-dir: Created new Volume wserv-incremental0006 in 
catalog.
24-Apr 05:51 zeus-dir: backup_wserv.2007-04-24_05.51.00 Warning: Error 
getting Media record for Volume wserv-incremental0006: ERR=Media record 
for Vol=wserv-incremental0006 not found in Catalog.
24-Apr 05:51 zeus-dir: backup_wserv.2007-04-24_05.51.00 Error: Bacula 2.0.3 
(06Mar07): 24-Apr-2007 05:51:04
  JobId:  70
  Job:backup_wserv.2007-04-24_05.51.00
  Backup Level:   Incremental, since=2007-04-21 05:51:06
  Client: wserv-fd 2.0.3 (06Mar07) 
i686-redhat-linux-gnu,redhat,
  FileSet:fbsd_wserv 2007-04-15 11:11:06
  Pool:   Wserv_Incremental (From Job IncPool override)
  Storage:WservStorage (From Job resource)
  Scheduled time: 24-Apr-2007 05:51:00
  Start time: 24-Apr-2007 05:51:02
  End time:   24-Apr-2007 05:51:04
  Elapsed time:   2 secs
  Priority:   10
  FD Files Written:   0
  SD Files Written:   0
  FD Bytes Written:   0 (0 B)
  SD Bytes Written:   0 (0 B)
  Rate:   0.0 KB/s
  Software Compression:   None
  VSS:no
  Encryption: no
  Volume name(s):
  Volume Session Id:  5
  Volume Session Time:1177357669
  Last Volume Bytes:  0 (0 B)
  Non-fatal FD errors:4
  SD Errors:  0
  FD termination status:
  SD termination status:
  Termination:*** Backup Error ***


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

Re: [Bacula-users] bacula and database crash

2007-04-24 Thread Ryan Novosielski
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dave wrote:
 Hi,
 I've got a problem between bacula and mysql and would appreciate any 
 help. Output below.
 Thanks.
 Dave.
 
 24-Apr 05:51 zeus-dir: Start Backup JobId 70, 
 Job=backup_wserv.2007-04-24_05.51.00
 24-Apr 05:51 zeus-dir: backup_wserv.2007-04-24_05.51.00 Fatal error: 
 sql_find.c:320 sql_find.c:320 query SELECT 
 MediaId,VolumeName,VolJobs,VolFiles,VolBlocks,VolBytes,VolMounts,VolErrors,VolWrites,MaxVolBytes,VolCapacityBytes,VolRetention,VolUseDuration,MaxVolJobs,MaxVolFiles,Recycle,Slot,FirstWritten,LastWritten,VolStatus,InChanger,VolParts,LabelType
  
 FROM Media WHERE PoolId=13 AND MediaType='File' AND Enabled=1 AND 
 VolStatus='Append'  ORDER BY LastWritten IS NULL,LastWritten DESC,MediaId 
 LIMI
  1 failed:
 Table 'Media' is marked as crashed and should be repaired
 24-Apr 05:51 zeus-dir: sql_find.c:320 SELECT 
 MediaId,VolumeName,VolJobs,VolFiles,VolBlocks,VolBytes,VolMounts,VolErrors,VolWrites,MaxVolBytes,VolCapacityBytes,VolRetention,VolUseDuration,MaxVolJobs,MaxVolFiles,Recycle,Slot,FirstWritten,LastWritten,VolStatus,InChanger,VolParts,LabelType
  
 FROM Media WHERE PoolId=13 AND MediaType='File' AND Enabled=1 AND 
 VolStatus='Append'  ORDER BY LastWritten IS NULL,LastWritten DESC,MediaId 
 LIMIT 1
 24-Apr 05:51 zeus-dir: backup_wserv.2007-04-24_05.51.00 Fatal error: 
 sql_find.c:320 sql_find.c:320 query SELECT 
 MediaId,VolumeName,VolJobs,VolFiles,VolBlocks,VolBytes,VolMounts,VolErrors,VolWrites,MaxVolBytes,VolCapacityBytes,VolRetention,VolUseDuration,MaxVolJobs,MaxVolFiles,Recycle,Slot,FirstWritten,LastWritten,VolStatus,InChanger,VolParts,LabelType
  
 FROM Media WHERE PoolId=13 AND MediaType='File' AND Enabled=1 AND 
 VolStatus='Recycle'  ORDER BY LastWritten IS NULL,LastWritten DESC,MediaId 
 LIM
 T 1 failed:
 Table 'Media' is marked as crashed and should be repaired
 24-Apr 05:51 zeus-dir: sql_find.c:320 SELECT 
 MediaId,VolumeName,VolJobs,VolFiles,VolBlocks,VolBytes,VolMounts,VolErrors,VolWrites,MaxVolBytes,VolCapacityBytes,VolRetention,VolUseDuration,MaxVolJobs,MaxVolFiles,Recycle,Slot,FirstWritten,LastWritten,VolStatus,InChanger,VolParts,LabelType
  
 FROM Media WHERE PoolId=13 AND MediaType='File' AND Enabled=1 AND 
 VolStatus='Recycle'  ORDER BY LastWritten IS NULL,LastWritten DESC,MediaId 
 LIMIT 1
 24-Apr 05:51 zeus-dir: backup_wserv.2007-04-24_05.51.00 Error: Query failed: 
 SELECT MediaId,LastWritten FROM Media WHERE PoolId=13 AND Recycle=1 AND 
 VolStatus='Purged' AND Enabled=1 AND MediaType='File' ORDER BY LastWritten 
 ASC,MediaId LIMIT 1: ERR=Table 'Media' is marked as crashed and should be 
 repaired
 24-Apr 05:51 zeus-dir: backup_wserv.2007-04-24_05.51.00 Error: Media id 
 select failed: ERR=Table 'Media' is marked as crashed and should be repaired
 24-Apr 05:51 zeus-dir: backup_wserv.2007-04-24_05.51.00 Error: Media id 
 select failed: ERR=Table 'Media' is marked as crashed and should be repaired
 24-Apr 05:51 zeus-dir: backup_wserv.2007-04-24_05.51.00 Error: Query failed: 
 SELECT MediaId,LastWritten FROM Media WHERE PoolId=13 AND Recycle=1 AND 
 VolStatus='Purged' AND Enabled=1 AND MediaType='File' ORDER BY LastWritten 
 ASC,MediaId LIMIT 1: ERR=Table 'Media' is marked as crashed and should be 
 repaired
 24-Apr 05:51 zeus-dir: Created new Volume wserv-incremental0006 in 
 catalog.
 24-Apr 05:51 zeus-dir: backup_wserv.2007-04-24_05.51.00 Warning: Error 
 getting Media record for Volume wserv-incremental0006: ERR=Media record 
 for Vol=wserv-incremental0006 not found in Catalog.
 24-Apr 05:51 zeus-dir: backup_wserv.2007-04-24_05.51.00 Error: Bacula 2.0.3 
 (06Mar07): 24-Apr-2007 05:51:04
   JobId:  70
   Job:backup_wserv.2007-04-24_05.51.00
   Backup Level:   Incremental, since=2007-04-21 05:51:06
   Client: wserv-fd 2.0.3 (06Mar07) 
 i686-redhat-linux-gnu,redhat,
   FileSet:fbsd_wserv 2007-04-15 11:11:06
   Pool:   Wserv_Incremental (From Job IncPool override)
   Storage:WservStorage (From Job resource)
   Scheduled time: 24-Apr-2007 05:51:00
   Start time: 24-Apr-2007 05:51:02
   End time:   24-Apr-2007 05:51:04
   Elapsed time:   2 secs
   Priority:   10
   FD Files Written:   0
   SD Files Written:   0
   FD Bytes Written:   0 (0 B)
   SD Bytes Written:   0 (0 B)
   Rate:   0.0 KB/s
   Software Compression:   None
   VSS:no
   Encryption: no
   Volume name(s):
   Volume Session Id:  5
   Volume Session Time:1177357669
   Last Volume Bytes:  0 (0 B)
   Non-fatal FD errors:4
   SD Errors:  0
   FD termination status:
   SD termination status:
   Termination:*** Backup Error ***

Can you include the output from when you ran dbcheck and mysqlcheck?

- --
  _  _ _  _ ___  _  _  _
 |Y#| |  | |\/| |  \ |\ |  | |Ryan Novosielski - Systems Programmer 

Re: [Bacula-users] bacula and database crash

2007-04-24 Thread Ryan Novosielski
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Please copy the list in all correspondence. This list is not for
one-on-one help, and to steal Arno's line, I only do one-on-one help for
a consulting rate. ;)

You will need to use those programs to correct your database problems,
as you clearly have some. Use the documentation for both programs to get
this taken care of.

Dave wrote:
 Hello,
Here's dbcheck and mysqlcheck. I've got some corrupted tables media
 crashed for sure. I've also noticed in output that clients were waiting
 on jobs i got status of client connections and didn't see any open
 connections to the director, but a lot of clients are having terminated
 jobs.
 Thanks.
 Dave.
 
 #dbcheck -c bacula-dir.conf
 Hello, this is the database check/correct program.
 Modify database is off. Verbose is off.
 Please select the fuction you want to perform.
 
 1) Toggle modify database flag
 2) Toggle verbose flag
 3) Check for bad Filename records
 4) Check for bad Path records
 5) Check for duplicate Filename records
 6) Check for duplicate Path records
 7) Check for orphaned Jobmedia records
 8) Check for orphaned File records
 9) Check for orphaned Path records
10) Check for orphaned Filename records
11) Check for orphaned FileSet records
12) Check for orphaned Client records
13) Check for orphaned Job records
14) Check for all Admin records
15) Check for all Restore records
16) All (3-15)
17) Quit
 Select function number: 16
 Checking for Filenames with a trailing slash
 Found 0 bad Filename records.
 Checking for Paths without a trailing slash
 Found 0 bad Path records.
 Checking for duplicate Filename entries.
 Query failed: SELECT Name, count(Name) as Count FROM Filename GROUP BY 
 Name HAVING count(Name)  1: ERR=Table 'Filename' is marked as crashed
 and should be repaired
 
 #mysqlcheck --databases bacula -p
 (password prompt)
 bacula.BaseFiles   OK
 bacula.CDImagesOK
 bacula.Client  OK
 bacula.CountersOK
 bacula.Device  OK
 bacula.File
 warning  : 1 client is using or hasn't closed the table properly
 error: Size of indexfile is: 14236672Should be: 14280704
 error: Size of datafile is: 36004308 Should be: 36108840
 error: Corrupt
 bacula.FileSet OK
 bacula.Filename
 warning  : 1 client is using or hasn't closed the table properly
 error: Size of indexfile is: 4316160Should be: 4334592
 error: Size of datafile is: 2840712 Should be: 2854804
 error: Corrupt
 bacula.Job
 warning  : 2 clients are using or haven't closed the table properly
 status   : OK
 bacula.JobMedia
 warning  : 1 client is using or hasn't closed the table properly
 error: Size of datafile is: 1900 Should be: 2100
 error: Corrupt
 bacula.LocationOK
 bacula.LocationLog OK
 bacula.Log OK
 bacula.Media
 warning  : 2 clients are using or haven't closed the table properly
 error: Found wrong packed record at 3964
 error: Corrupt
 bacula.MediaType
 warning  : 1 client is using or hasn't closed the table properly
 status   : OK
 bacula.Path
 warning  : 1 client is using or hasn't closed the table properly
 error: Size of datafile is: 2242132 Should be: 2242676
 error: Corrupt
 bacula.Pool
 warning  : 3 clients are using or haven't closed the table properly
 status   : OK
 bacula.Status
 warning  : 1 client is using or hasn't closed the table properly
 status   : OK
 bacula.Storage
 warning  : 1 client is using or hasn't closed the table properly
 status   : OK
 bacula.UnsavedFilesOK
 bacula.Version
 warning  : 1 client is using or hasn't closed the table properly
 status   : OK

- --
  _  _ _  _ ___  _  _  _
 |Y#| |  | |\/| |  \ |\ |  | |Ryan Novosielski - Systems Programmer III
 |$| |__| |  | |__/ | \| _| |[EMAIL PROTECTED] - 973/972.0922 (2-0922)
 \__/ Univ. of Med. and Dent.|IST/AST - NJMS Medical Science Bldg - C630
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGLjwtmb+gadEcsb4RAuGCAKDErbWFfM2SLagbLShhLNn0YQ8hbgCg0mWm
EhotJv4kHGsHUShtO9dFx9U=
=0leC
-END PGP SIGNATURE-


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users