Dear List,

In the docs and sample configs of Bacula one can find information about 
the alert command and how it can be used
http://bacula.org/en/rel-manual/Storage_Daemon_Configuratio.html#9296
Relevant external docs:
http://smartmontools.sourceforge.net/smartmontools_scsi.html#tapes
http://www.tapealert.org/

Issue is as follows:
we have a single slot drive which supports tapealert through smartctl. 
This works fine from commandline. And should be ok according to the 
Bacula manual.
I was hoping I could use this feature to detect the need for cleaning 
the tapedrive and send an email to the tape-operator if so.
However I run into problems when  trying to use it from within Bacula.

Device section of sd.conf :
Changer Device = /dev/nst0
#Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
Alert Command = "sh -c 'smartctl -H -l error %c'"


Just as in this thread on the mailinglist: 
http://www.mail-archive.com/bacula-users@lists.sourceforge.net/msg23093.html
I found out that regardless if one runs smartctl as user bacula or sudo 
it from with bacula through the "alert" command directive in the device 
stanza in bacula-sd.conf
One can run into the following problems:
- Changer Device was not defined : resulting in an exit code unequal to 
0 from smartctl resulting in abnormal termination of job
- Changer Device was defined: device is locked resulting an exit code 
unequal to 0 from smartcrl resulting in the current volume going into an 
"Used" state and therefor Bacula wants an new volume to continue with 
the job. The new volume is not available and thus the job stalls.

My Questions:
Can this be resolved in some way so I can still use the Alert command?
If not, what is the best way to implement this feature? An external 
script checking stuff after everything is backuped and then grepping the 
operator's email-address from the config file?
If multiple people have issues with this command (with single slot 
drives) shouldn't there be an adjustment/warning in the manual?

Regards,
Olaf


------------------------------------------------------------------------------
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to