Bacula-users

Re: [Bacula-users] sg device node stickyness

2014-10-22 04:56:09
Subject: Re: [Bacula-users] sg device node stickyness
From: Giuseppe Vitillaro <giuseppe AT vitillaro DOT org>
To: bacula-users AT lists.sourceforge DOT net
Date: Wed, 22 Oct 2014 10:52:59 +0200

On Wednesday 22 October 2014 10:24:53 Robert Oschwald wrote:

> Using Bacula Server 7.0.4 on CentOS6_64.

>

> One thing which annoys me is that the sg device node for TapeAlert changes with every reboot from /dev/sg4 to /dev/sg6 and vice versa.

> Is there any setting I can set in udev to get sticky device nodes for my tape device changer device node?

>

> System has a LSI 3Ware 9650SE controller installed which is the one fighting for sg device node with my HP Ultrium 4 SCA tape device.

>

> Thanks,

> Robert

>

>

>

This is my autochg.sh script under gentoo stable

 

#!/bin/sh

sgdev=$(sg_map26 $1)

 

if [ -z "${sgdev}" ]; then

echo "TapeAlert: no sgdev for $1"

exit 0

fi

 

The command "sg_map26" come from the sg3_utils

package that should be available under CentOS6

and make a good job for me converting the tape

device into the sg device.

 

Then, in the bacula-sd.conf stanza of your tape

or changer, you may use something like this

 

Alert Command = "sh -c '/etc/bacula/autochg.sh /dev/nlto0 | grep TapeAlert|cat'"

 

Seems to work correctly for me.

 

Hope it helps, G. Vitillaro

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
<Prev in Thread] Current Thread [Next in Thread>