Thanks for explaining how to check the ATTRS value! The rules file works
well now. Awesome!
On Tue, Jan 29, 2019 at 6:50 PM Adam Nielsen wrote:
> > I ended up figuring out on accident my udev rules file did work, I had
> just
> > been trying to test it by restarting the service but it took a
> I ended up figuring out on accident my udev rules file did work, I had just
> been trying to test it by restarting the service but it took a full reboot
> for the new rules to get loaded.
Normally you do something like this[1]:
# udevadm control --reload-rules && udevadm trigger
>
I ended up figuring out on accident my udev rules file did work, I had just
been trying to test it by restarting the service but it took a full reboot
for the new rules to get loaded. This was what I did:
*> cat /etc/udev/rules.d/70-scsictrldev.rules*
*SUBSYSTEM=="scsi_generic",
I tried creating a new rules file based on the existing tape rules but I
didn't have any luck making it work and I didn't know how to debug what I'd
done. I ended up creating this bash script to create the symlinks and it
worked so I think I'll call it good:
*#!/bin/bash*
*#create persistent
This is the rules file, I will have to spend some time going through it.
Thanks.
*> cat /lib/udev/rules.d/60-persistent-storage-tape.rules*
*# do not edit this file, it will be overwritten on update*
*# persistent storage links: /dev/tape/{by-id,by-path}*
*ACTION=="remove",
> There are symlinks for the archive devices but not the tape drive control
> devices which is what the tape alert commands need.
Ah I see, you need the /dev/sg* equivalent for the /dev/st* in use.
Can you copy the udev rules that produce symlinks for the autochangers
(see link in my last post)
There are symlinks for the archive devices but not the tape drive control
devices which is what the tape alert commands need. I did already have it
set to use the symlink for the autochanger at least so that won't jump
around.
*> ls -l /dev/tape/by-id*
*total 0lrwxrwxrwx 1 root root 9
> I'm using Ubuntu 18.04.1 with Bacula 9.0.6 from the main repo. I'd like to
> enable the above alerts from the sample bacula-sd.conf but can't because my
> system is assigning random device names after each reboot so that
> /dev/nst0, /dev/nst1, etc. can be any /dev/sg* number. I looked into
>
*# ## # New alert command in Bacula 9.0.0# # Note: you must have the
sg3_utils (rpms) or the# #sg3-utils (deb) installed on your
system.# #and you must set the correct control device that#
#corresponds to the Archive Device# Control Device = /dev/sg?? #
must be SCSI