Re: [Bacula-users] vchanger, two drives
2010/4/28 Greg Golin : > Hello, > I am trying to configure bacula to use vchanger for offsite backups. > Basically I'd like to be able to swap USB drives every week and take them > offsite. The vchanger howto does not state whether I should run label > barcodes for each magazine. Could someone please clarify what operations > should be performed to configure two drives? > bacula-dir.conf relevant config: > Storage { > Name = OffSiteChanger > Address = mfile.merus.local-sd > Password = "snip" > Device = OffSiteChanger > Media Type = File > Autochanger = yes; > } > bacula-sd.conf relevant config: > Autochanger { > Name = OffSiteChanger > Device = OffSiteChanger-drive-0 > Device = OffSiteChanger-drive-1 > Changer Command = "/usr/local/bin/vchanger %c %o %S %a %d" > Changer Device = "/etc/bacula/removable.conf" > } > #--- drive 0 of the OffSiteChanger autochanger > Device { > Name = OffSiteChanger-drive-0 > DriveIndex = 0 > Autochanger = yes; > DeviceType = File > MediaType = File > ArchiveDevice = /var/lib/bacula/OffSiteChanger/0/drive0 > RemovableMedia = no; > RandomAccess = yes; > } > #--- drive 1 of the OffSiteChanger autochanger > Device { > Name = OffSiteChanger-drive-1 > DriveIndex = 1 > Autochanger = yes; > DeviceType = File > MediaType = File > ArchiveDevice = /var/lib/bacula/OffSiteChanger/1/drive1 > RemovableMedia = no; > RandomAccess = yes; > }# ... > vchanger config: > changer_name = "OffSiteChanger" > work_dir = "/var/lib/bacula/OffSiteChanger" > logfile = "/var/lib/bacula/OffSiteChanger/OffSiteChanger.log" > Virtual_Drives = 1 > slots_per_magazine = 4 > magazine_bays = 1 > automount_dir = /opt/bacula/removable > magazine = "UUID:1125820e-3163-41d0-b571-36818eea5a78" > magazine = "UUID:8a672f1d-9f79-4b68-8260-8285eeb6a1d8" > With this configuration when I unplug one drive, plug in the second drive, > and run update slots bacula says this: > *update slots > Automatically selected Catalog: MyCatalog > Using Catalog "MyCatalog" > The defined Storage resources are: > 1: File > 2: Archive > 3: OffSiteChanger > Select Storage resource (1-3): 3 > Enter autochanger drive[0]: 1 > Connecting to Storage daemon OffSiteChanger at mfile.merus.local-sd:9103 ... > 3306 Issuing autochanger "slots" command. > Device "OffSiteChanger" has 4 slots. > Connecting to Storage daemon OffSiteChanger at mfile.merus.local-sd:9103 ... > 3306 Issuing autochanger "list" command. > Volume "OffSiteChanger_0002_0001" not found in catalog. Slot=1 InChanger set > to zero. > Volume "OffSiteChanger_0002_0002" not found in catalog. Slot=2 InChanger set > to zero. > Volume "OffSiteChanger_0002_0003" not found in catalog. Slot=3 InChanger set > to zero. > Volume "OffSiteChanger_0002_0004" not found in catalog. Slot=4 InChanger set > to zero. > * > I expected it to link the volumes to the new slots. What am I doing wrong? > Thanks, > Greg BTW, with vchanger the two usb drives should not be devices themselves. They are represented as magazines that are swapped out when you issue update slots. The only reason to have more than 1 device is concurrency. This however does not fix your issue.. Sorry. John -- ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] vchanger, two drives
On 4/28/2010 6:43 PM, Greg Golin wrote: > Hello, > > I am trying to configure bacula to use vchanger for offsite backups. > Basically I'd like to be able to swap USB drives every week and take > them offsite. The vchanger howto does not state whether I should run > *label barcodes *for each magazine. Could someone please clarify what > operations should be performed to configure two drives? It is treated in the same way as a tape magazine in that respect. Each magazine (USB drive) has its own unique set of volumes. Therefore you must first label the volumes in each magazine using label barcodes, else there won't be any usable volumes in the slots, just "blank tapes". Once both drives have had their volumes labeled, whenever you swap drives you will have to issue an update slots command in bconsole to inform Bacula of which volume is currently "inserted" into each slot. Also note that when swapping drives it is best to manually update the status of the last volume written to in each pool from Append to Used. Otherwise, Bacula will try to select that volume when the next job runs after the drives have been swapped. That is not a bug, it is by design. I believe it eventually times out and then selects another volume, but I have found it makes more sense to mark those volumes Used anyway, particularly if you use VirtualFull or Migrate jobs. > > bacula-dir.conf relevant config: > Storage { > Name = OffSiteChanger > Address = mfile.merus.local-sd > Password = "snip" > Device = OffSiteChanger > Media Type = File > Autochanger = yes; > } > > bacula-sd.conf relevant config: > > Autochanger { > Name = OffSiteChanger > Device = OffSiteChanger-drive-0 > Device = OffSiteChanger-drive-1 > Changer Command = "/usr/local/bin/vchanger %c %o %S %a %d" > Changer Device = "/etc/bacula/removable.conf" > } > #--- drive 0 of the OffSiteChanger autochanger > Device { > Name = OffSiteChanger-drive-0 > DriveIndex = 0 > Autochanger = yes; > DeviceType = File > MediaType = File > ArchiveDevice = /var/lib/bacula/OffSiteChanger/0/drive0 > RemovableMedia = no; > RandomAccess = yes; > } > #--- drive 1 of the OffSiteChanger autochanger > Device { > Name = OffSiteChanger-drive-1 > DriveIndex = 1 > Autochanger = yes; > DeviceType = File > MediaType = File > ArchiveDevice = /var/lib/bacula/OffSiteChanger/1/drive1 > RemovableMedia = no; > RandomAccess = yes; > }# ... > > vchanger config: > > changer_name = "OffSiteChanger" > work_dir = "/var/lib/bacula/OffSiteChanger" > logfile = "/var/lib/bacula/OffSiteChanger/OffSiteChanger.log" > Virtual_Drives = 1 > slots_per_magazine = 4 > magazine_bays = 1 > automount_dir = /opt/bacula/removable > magazine = "UUID:1125820e-3163-41d0-b571-36818eea5a78" > magazine = "UUID:8a672f1d-9f79-4b68-8260-8285eeb6a1d8" > > With this configuration when I unplug one drive, plug in the second > drive, and run *update slots *bacula says this: > > *update slots > Automatically selected Catalog: MyCatalog > Using Catalog "MyCatalog" > The defined Storage resources are: > 1: File > 2: Archive > 3: OffSiteChanger > Select Storage resource (1-3): 3 > Enter autochanger drive[0]: 1 > Connecting to Storage daemon OffSiteChanger at > mfile.merus.local-sd:9103 ... > 3306 Issuing autochanger "slots" command. > Device "OffSiteChanger" has 4 slots. > Connecting to Storage daemon OffSiteChanger at > mfile.merus.local-sd:9103 ... > 3306 Issuing autochanger "list" command. > Volume "OffSiteChanger_0002_0001" not found in catalog. Slot=1 > InChanger set to zero. > Volume "OffSiteChanger_0002_0002" not found in catalog. Slot=2 > InChanger set to zero. > Volume "OffSiteChanger_0002_0003" not found in catalog. Slot=3 > InChanger set to zero. > Volume "OffSiteChanger_0002_0004" not found in catalog. Slot=4 > InChanger set to zero. > * > > I expected it to link the volumes to the new slots. What am I doing wrong? > > Thanks, > Greg > > > -- > > > > ___ > Bacula-users mailing list > Bacula-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bacula-users > -- ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
[Bacula-users] vchanger, two drives
Hello, I am trying to configure bacula to use vchanger for offsite backups. Basically I'd like to be able to swap USB drives every week and take them offsite. The vchanger howto does not state whether I should run *label barcodes *for each magazine. Could someone please clarify what operations should be performed to configure two drives? bacula-dir.conf relevant config: Storage { Name = OffSiteChanger Address = mfile.merus.local-sd Password = "snip" Device = OffSiteChanger Media Type = File Autochanger = yes; } bacula-sd.conf relevant config: Autochanger { Name = OffSiteChanger Device = OffSiteChanger-drive-0 Device = OffSiteChanger-drive-1 Changer Command = "/usr/local/bin/vchanger %c %o %S %a %d" Changer Device = "/etc/bacula/removable.conf" } #--- drive 0 of the OffSiteChanger autochanger Device { Name = OffSiteChanger-drive-0 DriveIndex = 0 Autochanger = yes; DeviceType = File MediaType = File ArchiveDevice = /var/lib/bacula/OffSiteChanger/0/drive0 RemovableMedia = no; RandomAccess = yes; } #--- drive 1 of the OffSiteChanger autochanger Device { Name = OffSiteChanger-drive-1 DriveIndex = 1 Autochanger = yes; DeviceType = File MediaType = File ArchiveDevice = /var/lib/bacula/OffSiteChanger/1/drive1 RemovableMedia = no; RandomAccess = yes; }# ... vchanger config: changer_name = "OffSiteChanger" work_dir = "/var/lib/bacula/OffSiteChanger" logfile = "/var/lib/bacula/OffSiteChanger/OffSiteChanger.log" Virtual_Drives = 1 slots_per_magazine = 4 magazine_bays = 1 automount_dir = /opt/bacula/removable magazine = "UUID:1125820e-3163-41d0-b571-36818eea5a78" magazine = "UUID:8a672f1d-9f79-4b68-8260-8285eeb6a1d8" With this configuration when I unplug one drive, plug in the second drive, and run *update slots *bacula says this: *update slots Automatically selected Catalog: MyCatalog Using Catalog "MyCatalog" The defined Storage resources are: 1: File 2: Archive 3: OffSiteChanger Select Storage resource (1-3): 3 Enter autochanger drive[0]: 1 Connecting to Storage daemon OffSiteChanger at mfile.merus.local-sd:9103 ... 3306 Issuing autochanger "slots" command. Device "OffSiteChanger" has 4 slots. Connecting to Storage daemon OffSiteChanger at mfile.merus.local-sd:9103 ... 3306 Issuing autochanger "list" command. Volume "OffSiteChanger_0002_0001" not found in catalog. Slot=1 InChanger set to zero. Volume "OffSiteChanger_0002_0002" not found in catalog. Slot=2 InChanger set to zero. Volume "OffSiteChanger_0002_0003" not found in catalog. Slot=3 InChanger set to zero. Volume "OffSiteChanger_0002_0004" not found in catalog. Slot=4 InChanger set to zero. * I expected it to link the volumes to the new slots. What am I doing wrong? Thanks, Greg -- ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users