Bacula-users

Re: [Bacula-users] sg device node stickyness

2014-10-22 08:41:37
Subject: Re: [Bacula-users] sg device node stickyness
From: "Clark, Patricia A." <clarkpa AT ornl DOT gov>
To: Robert Oschwald <robertoschwald AT gmail DOT com>, "bacula-users AT lists.sourceforge DOT net" <bacula-users AT lists.sourceforge DOT net>
Date: Wed, 22 Oct 2014 12:38:41 +0000
Cut -n- paste from my 9/22/14 post:

lsscsi shows what you currently have.
scsi_id -whitelisted -device=/dev/st0   <-- repeat for each tape device and 
your autochanger device (use /dev/sg#) - this gets you the unique scsi id to be 
used in the udev rules

In your udev rules make sure that you use the nst* reference for tape, it is 
the no-rewind device.  Generally the rules file goes in /etc/udev/rules.d (may 
be different for your distro).  Name it something meaningful to you.  Use 
unique names, not generic ones like "Drive1".  Here are a couple of examples 
for entries - substitute your scsi id output where RESULT==, I like to use * as 
a catchall for the scsi id:

KERNEL=="sg*", SUBSYSTEM=="scsi_generic", PROGRAM="/sbin/scsi_id
--whitelisted --replace-whitespace /dev/$name",
RESULT=="3221f0090a5004532", ATTRS{type}=="8", SYMLINK+="mychanger"  <-- your 
unique changer name

KERNEL=="nst*[0-9]", SUBSYSTEM=="scsi_tape", PROGRAM="/sbin/scsi_id
--whitelisted --replace-whitespace /dev/$name",
RESULT=="*321110090a5004532*", SYMLINK+="mytape-0"  <-- your unique tape drive 
name for your first drive - repeat for remaining drives

There are commands to play with when manipulating the rules and testing, 
however, I recommend rebooting - it's the final verification.  Once you use the 
command line commands (mtx and mt) and find they behave consistently, then get 
Bacula involved.

Patti Clark
Linux System Administrator
R&D Systems Support Oak Ridge National Laboratory

From: Robert Oschwald <robertoschwald AT gmail DOT com<mailto:robertoschwald AT 
gmail DOT com>>
Date: Wednesday, October 22, 2014 at 4:24 AM
To: "bacula-users AT lists.sourceforge DOT net<mailto:bacula-users AT 
lists.sourceforge DOT net>" <bacula-users AT lists.sourceforge DOT 
net<mailto:bacula-users AT lists.sourceforge DOT net>>
Subject: [Bacula-users] sg device node stickyness

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




------------------------------------------------------------------------------
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>