On 05/19/14 21:11, Steven Haigh wrote:> On 20/05/14 01:28, Bill Arlofski wrote: >> On 05/19/14 03:56, Steven Haigh wrote: >>> On 18/05/14 12:50, Steven Haigh wrote: >>>> Hi Vizo, >>>> >>>> If I use the UUID:blah format, vchanger can't find the drives. >>>> >>>> I found on another post to this list in the archives (via google) that >>>> the following method worked - but I'm unsure if any further problems >>>> were encountered. >>>> >>>> It seems to be a problem with libuuid or similar? >>> >>> Hi all, >>> >>> Following on from this, I've had a problem with every restore with >>> Bacula throwing an error because it thinks the volume is online (when >>> the drive may be ejected). >>> >>> I wrote a perl script that can be used with udev to automatically start >>> / eject volumes. It makes a few assumptions, such as that you'll only >>> add to the END of magazines = blah in the vchanger config. >>> >>> I've attached it for reference. >>> >>> Looking at the structure of the SQL for volumes, would it be better to >>> set the 'InChanger' to 0 instead of Enabled = 0 when a volume is >>> removed? Then set InChanger = 1 when the volume is added back? >>> >> >> Hi Steve, I have not looked at your script yet, but this is something >> that I did a about a year back to solve what I think is a similar, or >> the same problem you are experiencing. It does it by setting the >> 'Enabled' field for a volume depending on its current availability. >> >> >> http://www.revpol.com/node/146 >> >> Hope it helps. > > Hi Bill, > > I did find that script and used it as my inspiration. There were a few > issues I had when running it however. Firstly, it doesn't recognise > UUIDs in the format /mnt/vchanger/<uuid> which causes issues.
That's interesting, since my system udev/autofs auto-mounts my encrypted drives as: /mnt/eSATA-1_Backups/<UUID> And my magazines are each defined in vchanger.conf as: magazine = "UUID:<UUID>" > The script I wrote was designed to be run via udev on a hot insert / > remove of drives. This allows the script to run as soon as a disk is > started. It also uses /dev/disk/by-uuid to match UUIDs found in the > vchanger config. See: http://revpol.com/offsitebackups I do udev/autofs auto-mounted encrypted drives so besides the encryption it seem like you are trying to do exactly what I have posted there. (note: there was a lot of udev and autofs development activity during and just after I wrote that so some things are not exact - for example some outputs, and some commands) > The other difference is that I set InChanger=(0|1) instead of disabling > the volume. In theory, this will cause bacula to send a "Need > intervention" email instead of failing (but I'm yet to try this). I think that was initially considered, but the Enabled field turned out to be the fool-proof method for us. Hope this helps! Bill -- Bill Arlofski Reverse Polarity, LLC http://www.revpol.com/ -- Not responsible for anything below this line -- ------------------------------------------------------------------------------ "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users