Hello, On 2/23/2006 8:19 AM, Ross Boylan wrote:
I got the error in the subject line while doing backups. I'm running bacula 1.36.3-2 on Debian with postgresql 7.4.9. This happened around the time my /var partition may have filled up, though it did have a reasonable looking amount of free space when I checked in the morning (/var holds the postgres dataset, the spool area to which bacula is writing, and it was the partition being backed up by one of the failed jobs!).
:-)
Is this consistent with running out of room, or is someting else going on? In particular, I'm a little surprised by the constraint failure reports, and wonder if they could indicate some other problem.
Now, I'm not an experienced PostgreSQL user, but the Bacula log seems to indicate that the disk space really was full. See below:
Here's more of the logs: 22-Feb 02:21 wheat-dir: Start Backup JobId 963, Job=MSD.2006-02-22_01.05.03 22-Feb 02:21 wheat-sd: Volume "Inc2006-02-22_0197" previously written, moving to end of data. 22-Feb 02:22 wheat-sd: End of Volume "Inc2006-02-22_0197" at 0:312 on device /var/spool/bacula. Write of 64512 bytes got 45209.
Here, only part of a block could be written, and...
22-Feb 02:22 wheat-sd: End of medium on Volume "Inc2006-02-22_0197" Bytes=54,509,211 Blocks=845 at 22-Feb-2006 02:22. 22-Feb 02:22 wheat-dir: Created new Volume "Inc2006-02-22_0198" in catalog. 22-Feb 02:22 wheat-sd: End of Volume "Inc2006-02-22_0198" at 0:0 on device /var/spool/bacula. Write of 205 bytes got -1.
... even a small amount could not be written to the next volume.
22-Feb 02:22 wheat-dir: MSD.2006-02-22_01.05.03 Error: sql_update.c:327 sql_update.c:327 update UPDATE Media SET VolJobs=0,VolFiles=0,VolBlocks=0,VolBytes=0,VolMounts=0,VolErrors=0,VolWrites=1,MaxVolBytes=681574400,LastWritten='2006-02-22 02:22:39',VolStatus='',Slot=0,InChanger=0,VolReadTime=0,VolWriteTime=0 WHERE VolumeName='Inc2006-02-22_0198' failed: ERROR: new row for relation "media" violates check constraint "media_volstatus" 22-Feb 02:22 wheat-dir: MSD.2006-02-22_01.05.03 Error: Catalog error updating Media record. sql_update.c:327 update UPDATE Media SET VolJobs=0,VolFiles=0,VolBlocks=0,VolBytes=0,VolMounts=0,VolErrors=0,VolWrites=1,MaxVolBytes=681574400,LastWritten='2006-02-22 02:22:39',VolStatus='',Slot=0,InChanger=0,VolReadTime=0,VolWriteTime=0 WHERE VolumeName='Inc2006-02-22_0198' failed:
Trying to insert an empty string for VolStatus might be a bug. I'd report this as a bug.
This followed several successful backups, and was in turn followed by another successful backup (!), which included
Probably because the spool space wasn't full then.
22-Feb 02:24 wheat-sd: Labeled new Volume "Inc2006-02-22_0198" on device /var/spool/bacula. 22-Feb 02:24 wheat-sd: Wrote label to prelabeled Volume "Inc2006-02-22_0198" on device "/var/spool/bacula" It apparently succeeded in making a new volume though the previous attempt failed. However, the log does not show the usual job status report for either of the two preceding jobs.
Might also be because the disk was full, so Bacula couldn't write the log. As far as I recall (I've had similar problems once) there is no error reporting in this case. Which is reasonable, because there's hardly any way to report an error if Bacula can't use its temporary disk space.
The final part of the log shows the attempt to backup /var itself: 22-Feb 02:30 wheat-sd: Volume "Inc2006-02-22_0198" previously written, moving to end of data. 22-Feb 02:30 wheat-sd: End of Volume "Inc2006-02-22_0198" at 0:0 on device /var/spool/bacula. Write of 64512 bytes got -1. 22-Feb 02:30 wheat-sd: End of medium on Volume "Inc2006-02-22_0198" Bytes=383 Blocks=1 at 22-Feb-2006 02:30. 22-Feb 02:30 wheat-dir: Created new Volume "Inc2006-02-22_0199" in catalog. 22-Feb 02:30 wheat-sd: End of Volume "Inc2006-02-22_0199" at 0:0 on device /var/spool/bacula. Write of 205 bytes got -1. 22-Feb 02:30 wheat-dir: LinSysVar.2006-02-22_01.05.06 Error: sql_update.c:327 sql_update.c:327 update UPDATE Media SET VolJobs=0,VolFiles=0,VolBlocks=0,VolBytes=0,VolMounts=0,VolErrors=0,VolWrites=1,MaxVolBytes=681574400,LastWritten='2006-02-22 02:30:19',VolStatus='',Slot=0,InChanger=0,VolReadTime=0,VolWriteTime=0 WHERE VolumeName='Inc2006-02-22_0199' failed: ERROR: new row for relation "media" violates check constraint "media_volstatus" 22-Feb 02:30 wheat-dir: LinSysVar.2006-02-22_01.05.06 Error: Catalog error updating Media record. sql_update.c:327 update UPDATE Media SET VolJobs=0,VolFiles=0,VolBlocks=0,VolBytes=0,VolMounts=0,VolErrors=0,VolWrites=1,MaxVolBytes=681574400,LastWritten='2006-02-22 02:30:19',VolStatus='',Slot=0,InChanger=0,VolReadTime=0,VolWriteTime=0 WHERE VolumeName='Inc2006-02-22_0199' failed: ERROR: new row for rel It ends in mid line.
Probably this was the moment the disk was full and the write to the log couldn't aquire more file system space.
Arno -- IT-Service Lehmann [EMAIL PROTECTED] Arno Lehmann http://www.its-lehmann.de ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users