Hello,

On 12/13/2006 10:34 AM, Alessio Mineni wrote:
> Thanks Arno, you are a Saint :)

It's christmas time :-)

> Alle 20:50, martedì 12 dicembre 2006, Arno Lehmann ha scritto:
> 
>>Hello,
>>
>>On 12/12/2006 11:59 AM, Alessio Mineni wrote:
>>
>>>Hi all,
>>>
>>>     I have 3 DAT drives and I want to group this drives into one autochenger
>>>virtual device via multitape-changer script.
>>
>>There was some discussion about multitape-changer recently. Use some of
>>the list archives to see if there is relevant information for you...
>>
>>>[...]
>>
>>I don't think this is how multitape-changer works. I never actually used
>>it, but I think it simulates a one-drive autochanger with a number of
>>slots equal to the number of drives you have.
> 
> 
> Me silly! You are right! I correct it leaving only one tape device named 
> changer0. I've found the thread you are talking about but, it use a 
> configuration like old mine (with one autochanger and three tape device 
> configured in sd.conf).
> 
> This is the new:
> 
> bacula-sd.conf
> 
> AutoChanger {
>   Name = "multitape0"
>   Device = vtape0
>   Changer Command = "/usr/libexec/bacula/multitape-changer %c %o %S %a %d"
>   Changer Device = /dev/sg0
> }
> 
> Device {
>   Name = vtape0
>   Drive Index = 0
>   Media Type = 4mm
>   Archive Device = /dev/changer0
>   AutomaticMount = yes
>   AlwaysOpen = no
>   RemovableMedia = yes
>   RandomAccess = no
>   AutoChanger = yes
>   LabelMedia = no
> }
> 
> and bacula-dir.conf
> 
> Storage {
>   Name = changer0
>   Address = 192.168.0.20
>   SDPort = 9103
>   Password = "P00io9"
>   Device = multitape0
>   AutoChanger = yes
>   Media Type = 4mm
>   Maximum Concurrent Jobs = 1
> }
> 
> 
>>>[...]
> 
> 
>>>[...]
>>>
>>>1 - no automatic startup link has done by bacula, I have to link
>>>/dev/nstx to /dev/changer0 manually
>>
>>Sure, Bacula doesn't create device nodes for you.
>>
>>
>>>2 - no automatic change has done by bacula
>>
>>So the autochanger setup didn't work. What does btapes test command tell
>>you?
> 
> 
> Why not? Using multitape-changer in command line it create the right 
> simlink /dev/changer0 --> /dev/nst1|2|3.

Well, that's something the multitape-changer script does, not the Bacula 
core itself.

> If I tell bacula to "update slots" it will virtually change the tapes in the 
> library changing the simlink, and read, one by one, the tapes header.

I understand, though, that this command does work.

> 
>>So the multitape-changer setup is not correct. See that thread I
>>mentioned for more information.
>>
>>Or hope to find someone who actually uses that... (or pay me :-)
>>seriously, I didn't get the impression that the suggested multichanger
>>script is easy to use).
>>
>>Arno
> 
> 
> Take a look at this output:
> 
> chronos dev # bconsole
> Connecting to Director chronos:9101
> 1000 OK: chronos-dir Version: 1.38.5 (18 January 2006)
> Enter a period to cancel a command.
> *update slots
> Using default Catalog name=MyCatalog DB=bacula
> The defined Storage resources are:
> [...]
>      3: changer0
> [...]
> Select Storage resource (1-10): 3
> Connecting to Storage daemon changer0 at 192.168.0.20:9103 ...
> Connecting to Storage daemon changer0 at 192.168.0.20:9103 ...
> 3306 Issuing autochanger "slots" command.
> Device "multitape0" has 3 slots.
> Connecting to Storage daemon changer0 at 192.168.0.20:9103 ...
> 3301 Issuing autochanger "loaded drive 0" command.
> 3302 Autochanger "loaded drive 0", result: nothing loaded.
> 3306 Issuing autochanger "list" command.
> Volume "1" not found in catalog. Slot=1 InChanger set to zero.
> Volume "2" not found in catalog. Slot=2 InChanger set to zero.
> Volume "3" not found in catalog. Slot=3 InChanger set to zero.

This seems to indicate the volumes you have in your drives (i.e. virtual 
slots) are labeled by Bacula, but there are no catalog entries. As a 
result, Bacula will refuse using them. This is intentional, by the way :-)

> *label

Using the 'label' command will not help you much, here... to add the 
existing volumes to the catalog, use the 'add' command. Or, to try 
labeling from bacula, erase the existing tape labels, which is easily 
done with 'mtx -f ... weof'. Not that this will render any existing data 
on the tapes useless.

> The defined Storage resources are:
> [...]
>      3: changer0
> [...]
> Select Storage resource (1-10): 3
> Enter new Volume name: extra01-0001
> Enter slot (0 or Enter for none): 0

Hmm, it's a long time that I tried labeling with slot=0, but IIRC that 
will label the tape currently loaded in the drive.

In your situation, that means that the link to the tape drive to 
actually use has to be set up already.

You might try to use a command like 'label volume=extra01-0001 
storage=changer0 pool=extra01 slot=1' or similar and see if that works.

At least it might trigger the needed call of multitape-changer to set up 
the link to the drive.

> Defined Pools:
> [...]
>     13: extra01
> [...]
> Select the Pool (1-13): 13
> Connecting to Storage daemon changer0 at 192.168.0.20:9103 ...
> Sending label command for Volume "extra01-0001" Slot 0 ...
> 3301 Issuing autochanger "loaded drive 0" command.
> 3302 Autochanger "loaded drive 0", result: nothing loaded.
> 3301 Issuing autochanger "loaded drive 0" command.
> 3302 Autochanger "loaded drive 0", result: nothing loaded.
> 3912 Failed to label Volume: ERR=dev.c:672 Rewind error on "vtape0" 
> (/dev/changer0). ERR=Inappropriate ioctl for device.
> 
> It call the loaded command but I'v found in docs that it will have to call 
> the 
> load command! Why?

Because it first checks if there already is a tape in the drive. Only if 
there is no tape loaded, a load call will be issued. And since you 
didn't explicitly demand a certain tape to be loaded, Bacula doesn't. 
Try giving the slot to label and see what happens.

Arno

> --  
> Alessio Mineni
> 
> WaveGroup
> Via Benaco 34/b
> 25081 Bedizzole BS
> 
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Bacula-users mailing list
> Bacula-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bacula-users

-- 
IT-Service Lehmann                    [EMAIL PROTECTED]
Arno Lehmann                  http://www.its-lehmann.de


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to