From: Kern Sibbald Date: Tue, 17 Jan 2006 09:40:14 +0000 (+0000) Subject: Update query X-Git-Tag: Release-1.38.4~2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f93d4844847993513917f3c14047c92f2b9195a5;p=bacula%2Fbacula Update query git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2758 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/ChangeLog b/bacula/ChangeLog index 3f060ac0d7..5825c672d3 100644 --- a/bacula/ChangeLog +++ b/bacula/ChangeLog @@ -1,4 +1,59 @@ +Release 1.38.4 16Jan06 released 17 Jan 06: +16Jan06 +- Add two new queries to query.sql provided by Arno. One + list volumes known to the Storage device, and the other + lists volumes possibly needing replacement (error, ...). +15Jan06 +- Add periodic (every 24 hours) garbage collection of memory + pool by releasing free buffers. +14Jan06 +- Correct bug counting sized (for display only) in smartall.c +- Print FD mempool stats if debug > 0 rather than 5. +12Jan06 +- Correct bug in alist.c that re-allocated the list if the + number of items goes to zero. +- Move the reservation system thread locking to the top level + so that one job at a time tries all possible drives before + waiting. +- Implement a reservation 'fail' message queue that is built + and destroyed on each pass through the reservation system. + These messages are displayed in a 'Jobs waiting to reserve + a drive' list during a 'status storage='. Note, multiple + messages will generally print for each JobId because they + represent the different problems with either the same drive + or different drives. If this output proves too confusing + of voluminous, I will display it only when debug level 1 + or greater is enabled in the SD. +11Jan06 +- Add enable/disable job=. This command prevents + the specified job from being scheduled. Even when disabled, + the job can be manually started from the console. +- During 'update slots' clear all InChanger flags where the + StorageId is zero (old Media records). + + +Beta release 1.38.4: +09Jan06 +- Fix autochanger code to strip leading spaces from returned + slots number. Remove bc from chio-changer. +- Back port a bit of 1.39 crypto code to reduce diffs. +- Fix first call to autochanger that missed close()ing the + drive. Put close() just before each run_program(). Fixes + Arno's changer bug. +07Jan06 +- Add PoolId to Job record when updating it at job start time. +06Jan06 +- Pull in more code from 1.39 so that there are fewer file + differences (the new ua_dotcmds.c, base64.h, crypto.h + hmac.c jcr.c (dird and lib) lib.h md5.h parse_conf.c + util.c. Aside from ua_dotcmds.c these are mostly crypto + upgrades. +- Implement new method of walking the jcr chain. The + incr/dec of the use_count is done within the walking + routines. This should prevent a jcr from being freed + from under the walk routines. + Release 1.38.3 05Jan06: 04Jan06 - Move the suitable_drive flag to a better place to prevent diff --git a/bacula/kes-1.38 b/bacula/kes-1.38 index 3cb95e905a..42d03a0c27 100644 --- a/bacula/kes-1.38 +++ b/bacula/kes-1.38 @@ -3,7 +3,11 @@ General: -Release 1.38.4: +Release 1.38.4 released 17Jan06: +16Jan06 +- Add two new queries to query.sql provided by Arno. One + list volumes known to the Storage device, and the other + lists volumes possibly needing replacement (error, ...). 15Jan06 - Add periodic (every 24 hours) garbage collection of memory pool by releasing free buffers. diff --git a/bacula/src/dird/query.sql b/bacula/src/dird/query.sql index 3b1aff3e0c..13e3e05380 100644 --- a/bacula/src/dird/query.sql +++ b/bacula/src/dird/query.sql @@ -177,16 +177,19 @@ SELECT DISTINCT Job.JobId as JobId,Job.Name as Name,Job.StartTime as StartTime, AND JobMedia.JobId=Job.JobId ORDER by Job.StartTime; # 16 -:List File record for given Job and File -*Enter JobId: -*Enter Full path (no filename) with trailing slash: -*Enter Filename: -SELECT File.JobId AS JobId,FileIndex FROM File,Path,Filename - WHERE File.JobId=%1 AND - Path.Path='%2' AND Filename.Name='%3' AND - File.PathId=Path.PathId AND File.FilenameId=Filename.FilenameId; -SELECT JobId,Name,VolSessionId,VolsessionTime,JobFiles FROM Job WHERE JobId=%1; -SELECT JobId,MediaId,FirstIndex,LastIndex,StartFile,EndFile,StartBlock,EndBlock, - VolIndex FROM JobMedia WHERE JobId=%1; -SELECT VolumeName FROM Media,JobMedia WHERE JobMedia.JobId=%1 AND - Media.MediaId=JobMedia.MediaId; +:List Volumes Bacula thinks are in changer: +SELECT MediaId,VolumeName,VolBytes/(1024*1024*1024) AS GB,Storage.Name + AS Storage,Slot,Pool.Name AS Pool,MediaType,VolStatus + FROM Media,Pool,Storage + WHERE Media.PoolId=Pool.PoolId + AND Slot>0 AND InChanger=1 + AND Media.StorageId=Storage.StorageId + ORDER BY MediaType ASC, Slot ASC; +# 17 +:List Volumes likely to need replacement from age or errors +SELECT VolumeName AS Volume,VolMounts AS Mounts,VolErrors AS Errors, + VolWrites AS Writes,VolStatus AS Status + FROM Media + WHERE (VolErrors>0) OR (VolStatus='Error') OR (VolMounts>50) OR + (VolStatus='Disabled') OR (VolWrites>3999999) + ORDER BY VolStatus ASC, VolErrors,VolMounts,VolumeName DESC;