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 |