Re: [Bacula-users] backup to multiple disks

2013-05-12 Thread Kern Sibbald
Hello,

In the context I was using the word mount, you can replace it
with open.

Concerning your other points, I think the best response is simply
to try testing and find out what works and what does not work. How
Autochangers (whether physical or virtual) work is fairly well
documented.

Best regardss,
Kern

On 05/11/2013 11:01 PM, Dimitri Maziuk wrote:
 On 05/11/2013 12:32 AM, Kern Sibbald wrote:
 Yes, Media Type is very important.  It must
 be in the Storage resources on the Director
 side, and notice that as I mentioned before, on
 the SD side, Autochanger really just groups a
 number of Devices.  The Media Type must be
 in each Device, because each one can be different
 so it is not in the Autochanger resource.

 There is no restriction for multiple devices to have
 the same Media Type, but if they are disk devices
 and don't have the same Archive Device, Bacula
 won't be able to mount them.  So, use the same
 Media Type only in Devices that have the same Archive
 Device.
 OK, please define mount in the context of your autochanger example:
 here's the config writing to actual multiple disks (mounted at OS level)
 rather then /tmp:

 Autochanger {
 Name = FileChgr1
 Device = FileChgr1-Dev1, FileChgr1-Dev2
 Changer Command = 
 Changer Device = /dev/null
 }

 Device {
 Name = FileChgr1-Dev1
 Media Type = File1
 Archive Device = /mnt/bacula01
 LabelMedia = yes  # lets Bacula label unlabeled media
 Random Access = Yes
 AutomaticMount = yes  # when device opened, read it
 RemovableMedia = no
 AlwaysOpen = no
 Maximum Concurrent Jobs = 5
 }

 Device {
 Name = FileChgr1-Dev2
 Media Type = File1
 Archive Device = /mnt/bacula02
 LabelMedia = yes  # lets Bacula label unlabeled media
 Random Access = Yes
 AutomaticMount = yes  # when device opened, read it
 RemovableMedia = no
 AlwaysOpen = no
 Maximum Concurrent Jobs = 5
 }

 So bacula won't be able to mount FileChgr* devices because they have
 the same Media Type and different Archive Device. Does it matter -- i.e.
 does bacula mount the Autochanger device and not the FileChgr*
 devices, so that's moot? Or does it mount the FileChger* device
 somewhere under the hood, so I do have to give them different Media
 Types? In which case what do I specify as Media Type in the bacula-dir.conf?

 This is where I get lost: the way I read it they have to have Media Type
 File1 and File2, but then I can't put both in the director config.

 Thanks again

 (As an aside, I can write a BDR_sized_file to any suitable device, so
 having to name media types BDR_sized_file_on_disk_1,
 BDR_sized_file_on_disk_2, etc. is a bit counter-intuitive.)


--
Learn Graph Databases - Download FREE O'Reilly Book
Graph Databases is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] re-initizialize old tapes

2013-05-12 Thread Iban Cabrillo
Hi Pedro,
  I think there is no error, bacula is showing the volume occupied in the
tape now, no the total capacity.
  In my case for example :

*list volume pool=XXX
pool: XXX
+-++---+-+---+--+--+-+--+---+---+-+
| MediaId | VolumeName | VolStatus | Enabled | VolBytes  | VolFiles
| VolRetention | Recycle | Slot | InChanger | MediaType |
LastWritten |
+-++---+-+---+--+--+-+--+---+---+-+
|  31 | M50136L5   | Full  |   1 | 1,512,679,827,456 |1,519
|7,776,000 |   1 |   24 | 1 | LTO-5 | 2013-01-19
04:07:19 |
|  33 | M50138L5   | Append|   1 |   143,192,159,232 |  146
|7,776,000 |   1 |   26 | 1 | LTO-5 | 2013-04-18
05:18:39 |
| * 34 | M50139L5   | Append|   1 |64,512 |
0 |7,776,000 |   1 |   27 | 1 | LTO-5 | -00-00
00:00:00 |*

As you see the M50139L5 is an empty tape
Regards, Iban



2013/5/10 Pedro Serotto pedro.sero...@yahoo.es

 Dear all,
 I'm trying to reinitzialize my old tapes, but I think i miss some step.

 Plese, can someone point me in the right direction ?

 This is what I do:

 root@llo ~]# bconsole
 Connecting to Director porcello.cdlan.net:9101
 1000 OK: bacula-dir Version: 2.4.4 (28 December 2008)
 Enter a period to cancel a command.
 *purge volume=Vol15

 This command is can be DANGEROUS!!!

 It purges (deletes) all Files from a Job,
 JobId, Client or Volume; or it purges (deletes)
 all Jobs from a Client or Volume without regard
 for retention periods. Normally you should use the
 PRUNE command, which respects retention periods.
 1 File on Volume Vol15 purged from catalog.
 There are no more Jobs associated with Volume Vol15. Marking it purged.
 *quit
 [root@llo ~]#
 [root@llo ~]# /usr/libexec/bacula/mtx-changer /dev/sg1 load 15 /dev/st0 0
 [root@llo ~]# mt -f /dev/st0 rewind
 [root@llo ~]# mt -f /dev/st0 weof
 [root@llo ~]# btape -c bacula-sd.conf /dev/nst0
 Tape block granularity is 1024 bytes.
 btape: butil.c:285 Using device: /dev/nst0 for writing.
 10-mag 16:02 btape JobId 0: 3301 Issuing autochanger loaded? drive 0
 command.
 10-mag 16:02 btape JobId 0: 3302 Autochanger loaded? drive 0, result is
 Slot 15.
 btape: btape.c:372 open device DDS-4 (/dev/nst0): OK
 *quit
 [root@llo ~]# /usr/libexec/bacula/mtx-changer /dev/sg1 unload 15 /dev/st0
 0
 Unloading Data Transfer Element into Storage Element 15...
 [root@llo ~]# bconsole
 *relabel
 Automatically selected Storage: DDS-4
 Defined Pools:
  1: Scratch
  2: Default
 Select the Pool (1-2): 2

 ### bconsole show me all volumes

 Enter MediaId or Volume name: 19
 Enter new Volume name: vol15
 Enter slot (0 or Enter for none): 15
 Defined Pools:
  1: Scratch
  2: Default
 Select the Pool (1-2): 2
 Connecting to Storage daemon DDS-4 at porcello.cdlan.net:9103 ...
 Sending relabel command from Vol15 to vol15 ...
 3000 OK label. VolBytes=64512 DVD=0 Volume=vol15 Device=DDS-4
 (/dev/nst0)
 Catalog record for Volume vol15, Slot 15  successfully created.
 Old volume Vol15 deleted from catalog.
 Requesting to mount DDS-4 ...
 3001 Device DDS-4 (/dev/nst0) is mounted with Volume vol15
 *list volume
 Pool: Scratch
 No results to list.
 Pool: Default


 ### bconsole show me all volumes

 ...
 |  30 | vol15  | Append|   1 |   64,512 |0 |
 31,536,000 |   1 |   15 | 1 | DDS-4 | |
 ...



 now, as you can see, the fourth field is the volbytes and it show only
 64,512 bytes, but the tabe is 800 giga size.

 What I do wrong ?

 Please help me

 BR

 Pedro


 --
 Learn Graph Databases - Download FREE O'Reilly Book
 Graph Databases is the definitive new guide to graph databases and
 their applications. This 200-page book is written by three acclaimed
 leaders in the field. The early access version is available now.
 Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
 ___
 Bacula-users mailing list
 Bacula-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/bacula-users




-- 

Iban Cabrillo Bartolome
Instituto de Fisica de Cantabria (IFCA)
Santander, Spain
Tel: +34942200969

Bertrand Russell:
*El problema con el mundo es que los estúpidos están seguros de todo y los
inteligentes están llenos de dudas*
--
Learn Graph Databases - Download FREE O'Reilly Book
Graph Databases is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 

Re: [Bacula-users] re-initizialize old tapes

2013-05-12 Thread Radosław Korzeniewski
Hello,

2013/5/12 Iban Cabrillo cabri...@ifca.unican.es

 Hi Pedro,
   I think there is no error, bacula is showing the volume occupied in the
 tape now, no the total capacity.


If you use hardware compression then total capacity is unknown, because it
depends on data written to the tape.
I have 2,5TB Full and even 8TB Full tapes (LTO-5).

best regards
-- 
Radosław Korzeniewski
rados...@korzeniewski.net
--
Learn Graph Databases - Download FREE O'Reilly Book
Graph Databases is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users