On 02/17/13 10:36, fsy wrote:
> Hi,
>
> i want to backup to usb disks every day, so i decided to install vchanger and
> use one usb disk for every day.
>
> my problem is that vchanger/bacula sometimes doesn't recognize my disks.
>
> My vchanger config is:
>
> changer_name = vchanger
> virtual_drives = 1
> slots_per_magazine = 6
> magazine_bays = 1
> automount_dir = /mnt/vchanger
> magazine = UUID:c6aa86dc-0a2b-4386-81ae-79f8a6fd21d3
> magazine = UUID:ab3266ac-12f1-4dc6-9448-3b144ee9ba08
> magazine = UUID:047d3f77-b761-41d7-ab7a-0b98b9540ae3
> magazine = UUID:b7391bf8-2f50-431e-9124-d0e969af09cf
> magazine = UUID:df31b95c-5986-4f67-a754-0379d92e92bf
> magazine = UUID:2d85d8c1-c197-4d5a-b8fe-016e7c37c56d
>
> my autofs configuration:
>
> /mnt/vchanger /etc/auto.vchanger --timeout=30
>
> my autofs vchanger config:
>
> * -fstype=auto,rw,sync :/dev/disk/by-uuid/&
>
> if i try to run a backup job on the vchanger device i get the following:
>
> 17-Feb 15:59 bacula-dir JobId 5665: shell command: run BeforeJob
> "/etc/bacula/holiday.sh"
> 17-Feb 15:59 bacula-dir JobId 5665: BeforeJob: Date is not a known vacation
> day.
> 17-Feb 15:59 bacula-dir JobId 5665: Start Backup JobId 5665,
> Job=test-USB.2013-02-17_15.59.33_33
> 17-Feb 15:59 bacula-dir JobId 5665: Using Device "usb-changer-drive-0"
> 17-Feb 15:59 bacula-sd JobId 5665: 3301 Issuing autochanger "loaded? drive 0"
> command.
> 17-Feb 15:59 bacula-sd JobId 5665: 3302 Autochanger "loaded? drive 0",
> result: nothing loaded.
> 17-Feb 15:59 bacula-sd JobId 5665: 3304 Issuing autochanger "load slot 2,
> drive 0" command.
> 17-Feb 15:59 bacula-sd JobId 5665: Fatal error: 3992 Bad autochanger "load
> slot 2, drive 0": ERR=Unknown error during program execvp.
> Results=failed to convert slot 2 to valid volume file name
>
> 17-Feb 15:59 -fd JobId 5665: Fatal error: job.c:2395 Bad response to Append
> Data command. Wanted 3000 OK data
> , got 3903 Error append data
>
> the contents of my usb disk:
>
> drive0 loaded0 loaded2 loaded4 lost+found vchanger_0006_0003
> vchanger_0006_0005
> index loaded1 loaded3 loaded5 vchanger_0006_0002 vchanger_0006_0004
> vchanger_0006_0006
>
> What could be wrong with my configuration?
fsy, it looks to me that something went awry with your vchanger install/setup.
On each USB drive (or stick), you should have a drive0, index, and loaded0 -
assuming you have 1 virtual_drive defined in vchanger (which you do)
Also, when swapping USB drives out, you will need to update what volumes
Bacula thinks are available. For this you can manually issue the "update
slots" command in bconsole, or as I do:
- Create a job of type "Admin"
- Set it to run at the same time as your nightly jobs but with a higher
priority so it runs first
- In the Admin job, issue the "update slots" command in a Run Script like so:
# ----------------
# Update Slots Job
# ----------------
Job {
Name = UpdateSlots
Client = None
Type = Admin
FileSet = None
Storage = c0
Schedule = WeeklyToOffsiteDisk
Messages = Standard
Priority = 8
SpoolData = no
Pool = Default #
RunScript {
RunsWhen = Before
RunsOnClient = no
Fail Job On Error = no
Console = "update slots storage=c0 drive=0"
}
}
Also, I have seen e some strange things with DELL's non-standard RD1000 device
with regards to autofs and udev that required some special treatment.
Basically it reqired a delay before after creating the mapper device, and
before access to the autofs-controlled dir was attempted otherwise autofs
would just fail to mount the device - resulting in the same errors you are
seeing.
I don't think your errors are caused by this issue (I believe your issue may
be a simple update slots issue) but I thought I would mention this since it
was a PITA to troubleshoot and figure out, and who knows, maybe this
information will help someone else struggling with a DELL RD1000 device. :)
And finally, a couple years back I wrote a rather lengthy howto called
"Encrypted offsite backups on auto-mounted media with Bacula & vchanger" a lot
of which might be helpful to you. (just sub USB for eSATA etc, and skip the
encryption parts unless you need it :)
http://revpol.com/node/140
Hope this helps.
--
Bill Arlofski
Reverse Polarity, LLC
------------------------------------------------------------------------------
The Go Parallel Website, sponsored by Intel - in partnership with Geeknet,
is your hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials, tech docs,
whitepapers, evaluation guides, and opinion stories. Check out the most
recent posts - join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
|