From: Alan B. <aj...@ms...> - 2003-12-16 23:17:49
|
On 16 Dec 2003, Kern Sibbald wrote: > Your "trick" might well work. However, I caution you to put some sort of > mutual exclusion or semaphore in your mtx-changer script so that it > doesn't get called twice at the same time. It is very unlikely that mtx > knows how to handle two copies running at the same time on the same > control channel (/dev/sg3). This worried me too, however some quick tests shows that mtx blocks and the second command simply waits until the first completes - and it doesn't have to wait for the drive to spool the tape, just to get the tape out of the robot. > PS: If someone can explain to me how dual drive changers work Exactly the same way as single changers, honestly. Mtx can already handle all this natively (and it's covered in man page) The single drive changer just uses element 0, while extra drives are simple given higher numbers. >, and the > exact data that is returned with mtx for each of the primitive mtx calls > used in mtx-changer, I'll be more than happy to add dual drive > autochanger support to Bacula so you don't have to kludge things. From the mtx point of view it's simple: (in my case it's sg12) mtx -f /dev/sg12 load 15 0 mtx -f /dev/sg12 load 16 1 Will load slot 15 to drive 0 and slot 16 to drive 1 Unloading is a bit trickier, but only because you have to give a slot number in order to be able to provide a drive number: mtx -f /dev/sg12 unload 16 1 mtx -f /dev/sg12 unload 15 0 I'm using a HP MSL6000, which is a OEM Overland Neo 4100 dual LTO2 changer (capable of 4 drives, and being stacked 4 high, which still gives one robot, but 16 drives.) It's kind of strange that slots are 1-based but drives are 0-based. Has anyone else seen this kind of result? |