Bacula-users

[Bacula-users] Tapes not in autochanger are being recycled

2012-01-19 10:29:44
Subject: [Bacula-users] Tapes not in autochanger are being recycled
From: Michael Triska <Michael.Triska AT duf DOT de>
To: "'bacula-users AT lists.sourceforge DOT net'" <bacula-users AT lists.sourceforge DOT net>
Date: Thu, 19 Jan 2012 16:02:51 +0100
Hallo bacula-users,

we are running bacula 5.2.3 on centos with an Adic Scalar 100 Autochanger. Two 
times a week the tapes with volstatus full are changed with new and/or expired 
tapes. New tapes are labeled via "label barcodes" and added to the scratch 
pool, then "update slots" is run in bconsole.

Everytime a job starts and no appendable volumes are available in the 
corresponding pool, bacula purges the oldest expired volume and requests it to 
mount, although InChanger=0 is set. Our expectation would be that bacula uses a 
volume from Scratch pool if no expired media is online within the corresponding 
pool the job uses, but instead it requests the oldest expired volume, 
regardless of its InChanger flag set to 0.

pool "CUS_MT_R-1":
+---------+------------+-----------+---------+-------------+----------+--------------+---------+------+-----------+-----------+---------------------+
| mediaid | volumename | volstatus | enabled | volbytes    | volfiles | 
volretention | recycle | slot | inchanger | mediatype | lastwritten |
+---------+------------+-----------+---------+-------------+----------+--------------+---------+------+-----------+-----------+---------------------+
|     236 | 003039L3   | Used      |       1 | 757,822,464 |        1 |        
1,800 |       1 |    4 |         0 | LTO-3     | 2012-01-19 15:05:16 |
+---------+------------+-----------+---------+-------------+----------+--------------+---------+------+-----------+-----------+---------------------+

the media 003039L3 is not online in the autochanger.

pool "Scratch":
+---------+------------+-----------+---------+-----------------+----------+--------------+---------+------+-----------+-----------+---------------------+
| mediaid | volumename | volstatus | enabled | volbytes        | volfiles | 
volretention | recycle | slot | inchanger | mediatype | lastwritten         |
+---------+------------+-----------+---------+-----------------+----------+--------------+---------+------+-----------+-----------+---------------------+
|      99 | 003006L3   | Purged    |       1 |     757,822,464 |        1 |     
   1,800 |       1 |    1 |         1 | LTO-3     | 2012-01-19 10:50:01 |

A expire and purge media is in the "Scratch" pool, but bacula is requesting the 
offline media from pool "CUS_MT_R-1".

Here is the job message output from bacula. 

backup-dir JobId 19314: Start Backup JobId 19314, 
Job=wntpsm2-System-Test.2012-01-19_14.54.31_57
backup-dmz JobId 19314: 3307 Issuing autochanger "unload slot 31, drive 1" 
command.
backup-dir JobId 19314: There are no more Jobs associated with Volume 
"003039L3". Marking it purged.
backup-dir JobId 19314: All records pruned from Volume "003039L3"; marking it 
"Purged"
backup-dir JobId 19314: Recycled volume "003039L3"
backup-dir JobId 19314: Using Device "ADICSCALAR_WR31_SD-2_Drive1"
backup-dir JobId 19314: FD compression disabled for this Job because 
AllowCompress=No in Storage resource.
backup-dmz JobId 19314: No slot defined in catalog (slot=0) for Volume 
"003039L3" on "ADICSCALAR_WR31_SD-2_Drive1" 
(/dev/tape/by-id/scsi-3500308c157d00364-st).
backup-dmz JobId 19314: Cartridge change or "update slots" may be required.
backup-dmz JobId 19314: 3301 Issuing autochanger "loaded? drive 1" command.
backup-dmz JobId 19314: 3302 Autochanger "loaded? drive 1", result: nothing 
loaded.
backup-dmz JobId 19314: 3301 Issuing autochanger "loaded? drive 1" command.
backup-dmz JobId 19314: 3302 Autochanger "loaded? drive 1", result: nothing 
loaded.
backup-dmz JobId 19314: Warning: mount.c:217 Open device 
"ADICSCALAR_WR31_SD-2_Drive1" (/dev/tape/by-id/scsi-3500308c157d00364-st) 
Volume "003039L3" failed: ERR=dev.c:500 Unable to open device 
"ADICSCALAR_WR31_SD-2_Drive1" (/dev/tape/by-id/scsi-3500308c157d00364-st): 
ERR=Kein Medium gefunden


If the pool "CUS_MT_R-1" is empty, bacula takes a online volume from Scratch 
pool.

The question if the tape rotation handling is correct this way ?
 


Here the bacula configurations:

# test job - manual start
#
Job {
  Name = "wntpsm2-System-Test"
  Client = "wntpsm2"
  Type = Backup
  Level = Incremental
  Storage = STOR_ADICSCALAR
  Messages = Standard
  Pool = CUS_MT_R-1
  Priority = 10
  Write Bootstrap = "/opt/bacula/working/%c_%n.bsr"
  FileSet = "wntpsm2-Test"
  SpoolData = yes
}

# tape pool
#
Pool {
  Name = CUS_MT_R-1
  Pool Type = Backup
  Recycle = yes
  AutoPrune = yes
  Use Volume Once = yes
  Recycle Pool = Recycle
  Volume Retention = 30 minutes
}

# bacula storage ressource
#
Storage {
  Name = STOR_ADICSCALAR
  Address = backup-sd.backup
  SDPort = 9103
  Password = "dummy"
  Device = DEV_ADICSCALAR
  Media Type = LTO-3
  Maximum Concurrent Jobs = 3
  AllowCompression = No
}

# bacula device ressource
# 
Autochanger {
  Name = "DEV_ ADICSCALAR"
  Device = Drive0
  Device = Drive1
  Device = Drive2
  Changer Device = /dev/tape/by-id/scsi-dummy   #Adic_Scalar Changer
  Changer Command = "/opt/bacula/scripts/mtx-changer_Adic %c %o %S %a %d"

}

Device {
  Name = " ADICSCALAR_WR31_SD-2_Drive0"
  Media Type = LTO-3
  Archive Device = /dev/tape/by-id/dummy
  DriveIndex = 0
  LabelMedia = no;
  AutoChanger = yes
  AutomaticMount = yes;
  AlwaysOpen = yes;
  RemovableMedia = yes;
  Maximum Concurrent Jobs = 1
  Maximum Network Buffer Size = 65536
  Maximum Spool Size = 286613470000             # ca. 274GB
#  Maximum Job Spool Size = 53687091200          # ca. 50GB
  Maximum Job Spool Size = 42949672960          # ca. 40GB
  Spool Directory = /backup/SPOOL
}


thanks and regards,

Michael

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
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>