Re: [Bacula-users] Need advice on adapting mtx-changer for Exabyte Magnum 224

2007-06-28 Thread Shon Stephens

I was able to get the mtx-changer script working correctly. I used the
solaris-mtx-changer from the examples as a starting point. Then to work with
the Magnum 224 and Solaris make a few changes

-added a correct PATH statement for my system
-Solaris doesn't have "seq" command, replaced seq in the wait_for_drive
function with a perl statement
-there are some commands that won't work (unload), unless the tape device is
specified. I set this to a default, but still allow it to be set on command
line too
-changed the awk/sed statements for the list command to be compatible with a
slot that is of type IMPORT/EXPORT

Everything seems cool now. I do have one very important question:

In the statement for the "unload" command, there is the following:
mt -f $device rewoffl

If I am using tapes to perform incremental backups, should I be rewinding
the tape in the drive before unloading it to load another tape. If its
loaded again, will it being rewound previously cause bacula to overwrite
files on the tape? I don't believe so, but hopefully someone can answer that
for sure.

Thanks
Shon

On 6/28/07, John Drescher <[EMAIL PROTECTED]> wrote:


I have a Magnum224 with 24 slots and 2 LTO2 drives but I am using linux
and not Solaris.  For that I did not have to change anything in the default
mtx scripts as it works correctly. I believe the numbering is one slot off
though but it does not matter. When I do a manual unload I verify the slot
from the screen on the changer itself. I will try to answer the questions I
can. One thing I would like to mention is that I am using bacula 2.X now.
I mention that because I had a serious problems with 1.38.X and my
changer.


> So everything is back to normal, but I still have a few questions
>
> How can I get mtx-changer to display the status of all my slots
> correctly?
> Is the format that mtx-changer is displaying the status of a loaded
> drive correct?
> Does it matter to bacula that I had to use the full command to unload
> the drive?
> Will Bacula know what storage element is in the drive and to move it
> back to the correct slot?


For me bacula always puts the tape back into the stot it took it from. I
have never tried manuall loading a tape there and seeing what would happen
for an unload.

How do I change tapes and update inventory?


Use the release command in bacula to release any tape from the drive. Then
change the tapes manually on the changer. I recommend doing that by
unloading the magazines. Then after you are done with the manual stuff. type
update slots in a bacula console.


I was considering keeping a cleaning tape in slot 12, will this interfere
> with Bacula at all? Can I schedule cleaning operations with Bacula?


This is fine. I have a CLN_ barcode on my cleaning tape and in my
pools I have

Cleaning Prefix = "CLN"

so that bacula recognizes that as a cleaning tape.

Any responses, or wilingness to share some mtx-changer magic is very
> appreciated. Also if you've used any replacement for mtx or mtx-changer and
> want to share the experience that would be great!



John



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Need advice on adapting mtx-changer for Exabyte Magnum 224

2007-06-28 Thread Shon Stephens

Hey Ryan,
I used an sgen.conf provided by Tandeberg support. I'm not sure if its
in their Knowledge Base. Here is what I've got

# Exabyte Magnum 224 tape library
#
sgen-diag=3;
#
device-type-config-list="changer";
#
inquiry-config-list="EXABYTE",  "Magnum 224";
#inquiry-config-list=   "EXABYTE",  "*";
#inquiry-config-list=   "EXABYTE";
#
name="sgen" class="scsi" target=0 lun=1;
name="sgen" class="scsi" target=1 lun=1;
name="sgen" class="scsi" target=2 lun=1;
name="sgen" class="scsi" target=3 lun=1;
name="sgen" class="scsi" target=4 lun=1;
name="sgen" class="scsi" target=5 lun=1;
name="sgen" class="scsi" target=6 lun=1;
name="sgen" class="scsi" target=7 lun=1;
name="sgen" class="scsi" target=8 lun=1;
name="sgen" class="scsi" target=9 lun=1;
name="sgen" class="scsi" target=10 lun=1;
name="sgen" class="scsi" target=11 lun=1;
name="sgen" class="scsi" target=12 lun=1;
name="sgen" class="scsi" target=13 lun=1;
name="sgen" class="scsi" target=14 lun=1;
name="sgen" class="scsi" target=15 lun=1;
# end Exabyte Magnum 224

Then I ran "add_drv sgen" and "devfsadm". That created
/dev/scsi/changer/c5t4d1.

Let me know if you get a working mtx-changer script.

-Shon

On 6/28/07, Ryan Novosielski <[EMAIL PROTECTED]> wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Not to distract folks from your question, but I'm looking for a way to
do this for a single tape drive so I can use smartmontools on it... do
you have a pointer for a resource on setting up the sgen.conf file? I've
been looking and not finding much (though I only suspected sgen was
involved until this e-mail).

Shon Stephens wrote:
> All,
>  I was able to get the changer recognzied as
> /dev/scsi/changer/c5t4d1 on my Solaris 10_x86 system. Setup
> /kernel/drv/sgen.conf, loaded the driver, created the devlinks, and
> we're off. My Magnum 224 has 1 robot, and 1 LTO-3 drive. It holds can
> hold up to 24 tapes in 2 magazines. I currently have 1 fully loaded, 12
> tape magazine installed.
>
>  I'm now trying to get mtx-changer script working correctly by
> following the "Autochanger Resource" ,
> http://www.bacula.org/rel-manual/Autochanger_Resource1.html, chapter of
> the User Guide. Some commands work, others don't. I tested all functions
> directly with mtx, and with the mtx-changer script. Mtx does perform all
> the operations correctly. It can load, unload, list, transfer, etc...
> However, as I said, some of the mtx-changer script functions aren't
> working correctly. I am unsure whether or not they need to work with the
> exact syntax described in the chapter, or if the commands will work, but
> with an expanded syntax (like the Changer Command) and bacula will
> function correctly.
>
>  I peformed the mtx-changer tests in the same order as the guide,
> using its sytax. I also use a full command line to test if that works.
> In cases where the output isn't what I expected, I tried using mtx
> directly.
>
> First the mtx-changer "list" command
> ./mtx-changer /dev/scsi/changer/c5t4d1 list 0 /dev/rmt/0 0
> 1:Full:VolumeTag=A1
> 2:Full:VolumeTag=A2
> 3:Full:VolumeTag=A3
> 4:Full:VolumeTag=A4
> 5:Full:VolumeTag=A5
> 6:Full:VolumeTag=A6
> 7:Full:VolumeTag=A7
> 8:Full:VolumeTag=A8
> 9:Full:VolumeTag=A9
> 10:Full:VolumeTag=A00010
> 11:Full:VolumeTag=A00011
>
> I know I have a fully loaded magazine in the library, so I check with
mtx.
> [EMAIL PROTECTED]: mtx -f /dev/scsi/changer/c5t4d1 status
>   Storage Changer /dev/scsi/changer/c5t4d1:1 Drives, 12 Slots ( 1
> Import/Export )
> Data Transfer Element 0:Empty
>   Storage Element 1:Full :VolumeTag=A1
>   Storage Element 2:Full :VolumeTag=A2
>   Storage Element 3:Full :VolumeTag=A3
>   Storage Element 4:Full :VolumeTag=A4
>   Storage Element 5:Full :VolumeTag=A5
>   Storage Element 6:Full :VolumeTag=A6
>   Storage Element 7:Full :VolumeTag=A7
>   Storage Element 8:Full :VolumeTag=A8
>   Storage Element 9:Full :VolumeTag=A9
>   Storage Element 10:Full
> :VolumeTag=A00010
>   Storage Element 11:Full
> :VolumeTag=A00011
>   Storage Element 12 IMPORT/EXPORT:Full :VolumeTag=A00012
>
> I checked the mtx-changer script and can see whats happening, but am not
> quite sure what the best way to remedy this is...
>
> Next the slots command, which works with the syntax from the guide.
> ./mtx-changer /dev/scsi/changer/c5t4d1 slots 0 /dev/rmt/0 0
> 12
>
> Testing unload with the syntax of the guide produced:
> ./mtx-changer /dev/scsi/changer/c5t4d1 unload
> usage: mtx-changer ctl-device command [slot archive-device drive-index]
> Insufficient number of arguments arguments given.
>   Command expected 5 arguments
>
> So I tried with a full command:
> ./mtx-changer /dev/scsi/changer/c5t4d1 unload 0 /dev/rmt/0 0
> Unloading Data Transfer Element into Storage Element 0...mtx: Request
> Sense: Long Report=yes
>
> This makes sense as there is no tape in the drive.
>
> The load 

Re: [Bacula-users] Need advice on adapting mtx-changer for Exabyte Magnum 224

2007-06-28 Thread Ryan Novosielski
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Not to distract folks from your question, but I'm looking for a way to
do this for a single tape drive so I can use smartmontools on it... do
you have a pointer for a resource on setting up the sgen.conf file? I've
been looking and not finding much (though I only suspected sgen was
involved until this e-mail).

Shon Stephens wrote:
> All,
>  I was able to get the changer recognzied as
> /dev/scsi/changer/c5t4d1 on my Solaris 10_x86 system. Setup
> /kernel/drv/sgen.conf, loaded the driver, created the devlinks, and
> we're off. My Magnum 224 has 1 robot, and 1 LTO-3 drive. It holds can
> hold up to 24 tapes in 2 magazines. I currently have 1 fully loaded, 12
> tape magazine installed.
> 
>  I'm now trying to get mtx-changer script working correctly by
> following the "Autochanger Resource" ,
> http://www.bacula.org/rel-manual/Autochanger_Resource1.html, chapter of
> the User Guide. Some commands work, others don't. I tested all functions
> directly with mtx, and with the mtx-changer script. Mtx does perform all
> the operations correctly. It can load, unload, list, transfer, etc...
> However, as I said, some of the mtx-changer script functions aren't
> working correctly. I am unsure whether or not they need to work with the
> exact syntax described in the chapter, or if the commands will work, but
> with an expanded syntax (like the Changer Command) and bacula will
> function correctly.
> 
>  I peformed the mtx-changer tests in the same order as the guide,
> using its sytax. I also use a full command line to test if that works.
> In cases where the output isn't what I expected, I tried using mtx
> directly.
> 
> First the mtx-changer "list" command
> ./mtx-changer /dev/scsi/changer/c5t4d1 list 0 /dev/rmt/0 0
> 1:Full:VolumeTag=A1
> 2:Full:VolumeTag=A2
> 3:Full:VolumeTag=A3
> 4:Full:VolumeTag=A4
> 5:Full:VolumeTag=A5
> 6:Full:VolumeTag=A6
> 7:Full:VolumeTag=A7
> 8:Full:VolumeTag=A8
> 9:Full:VolumeTag=A9
> 10:Full:VolumeTag=A00010
> 11:Full:VolumeTag=A00011
> 
> I know I have a fully loaded magazine in the library, so I check with mtx.
> [EMAIL PROTECTED]: mtx -f /dev/scsi/changer/c5t4d1 status
>   Storage Changer /dev/scsi/changer/c5t4d1:1 Drives, 12 Slots ( 1
> Import/Export )
> Data Transfer Element 0:Empty
>   Storage Element 1:Full :VolumeTag=A1 
>   Storage Element 2:Full :VolumeTag=A2 
>   Storage Element 3:Full :VolumeTag=A3 
>   Storage Element 4:Full :VolumeTag=A4 
>   Storage Element 5:Full :VolumeTag=A5 
>   Storage Element 6:Full :VolumeTag=A6 
>   Storage Element 7:Full :VolumeTag=A7 
>   Storage Element 8:Full :VolumeTag=A8 
>   Storage Element 9:Full :VolumeTag=A9 
>   Storage Element 10:Full
> :VolumeTag=A00010 
>   Storage Element 11:Full
> :VolumeTag=A00011 
>   Storage Element 12 IMPORT/EXPORT:Full :VolumeTag=A00012
> 
> I checked the mtx-changer script and can see whats happening, but am not
> quite sure what the best way to remedy this is...
> 
> Next the slots command, which works with the syntax from the guide.
> ./mtx-changer /dev/scsi/changer/c5t4d1 slots 0 /dev/rmt/0 0
> 12
> 
> Testing unload with the syntax of the guide produced:
> ./mtx-changer /dev/scsi/changer/c5t4d1 unload
> usage: mtx-changer ctl-device command [slot archive-device drive-index]
> Insufficient number of arguments arguments given.
>   Command expected 5 arguments
> 
> So I tried with a full command:
> ./mtx-changer /dev/scsi/changer/c5t4d1 unload 0 /dev/rmt/0 0
> Unloading Data Transfer Element into Storage Element 0...mtx: Request
> Sense: Long Report=yes
> 
> This makes sense as there is no tape in the drive.
> 
> The load command appears to work:
> ./mtx-changer /dev/scsi/changer/c5t4d1 load 3 /dev/rmt/0 0
> 
> And loaded proves so:
> ./mtx-changer /dev/scsi/changer/c5t4d1 loaded 0 /dev/rmt/0 0
> 3
> 
> Before I ran the next mtx-changer test in the guide, I wanted to see
> what the list command and mtx status output showed.
> ./mtx-changer /dev/scsi/changer/c5t4d1 list 0 /dev/rmt/0 0
> 1:Full:VolumeTag=A1
> 2:Full:VolumeTag=A2
> 4:Full:VolumeTag=A4
> 5:Full:VolumeTag=A5
> 6:Full:VolumeTag=A6
> 7:Full:VolumeTag=A7
> 8:Full:VolumeTag=A8
> 9:Full:VolumeTag=A9
> 10:Full:VolumeTag=A00010
> 11:Full:VolumeTag=A00011
> 3:A3
> 
> Now in this case, from what I can tell of mtx-changer script, its
> correct in not displaying slot 12, as there isn't a tape in that slot.
> Is the drive status being shown correctly though? What format should a
> loaded tape drive be displayed as by mtx-changer?
> 
> Mt

Re: [Bacula-users] Need advice on adapting mtx-changer for Exabyte Magnum 224

2007-06-28 Thread Shon Stephens

Thanks for the reply and info on cleaning tapes. I'm using v2.0.3 of Bacula.
I think if I have my Changer Command correct that I'll be alright. Going to
test it out and see what happens.

Thanks,
Shon

On 6/28/07, John Drescher <[EMAIL PROTECTED]> wrote:


I have a Magnum224 with 24 slots and 2 LTO2 drives but I am using linux
and not Solaris.  For that I did not have to change anything in the default
mtx scripts as it works correctly. I believe the numbering is one slot off
though but it does not matter. When I do a manual unload I verify the slot
from the screen on the changer itself. I will try to answer the questions I
can. One thing I would like to mention is that I am using bacula 2.X now.
I mention that because I had a serious problems with 1.38.X and my
changer.


> So everything is back to normal, but I still have a few questions
>
> How can I get mtx-changer to display the status of all my slots
> correctly?
> Is the format that mtx-changer is displaying the status of a loaded
> drive correct?
> Does it matter to bacula that I had to use the full command to unload
> the drive?
> Will Bacula know what storage element is in the drive and to move it
> back to the correct slot?


For me bacula always puts the tape back into the stot it took it from. I
have never tried manuall loading a tape there and seeing what would happen
for an unload.

How do I change tapes and update inventory?


Use the release command in bacula to release any tape from the drive. Then
change the tapes manually on the changer. I recommend doing that by
unloading the magazines. Then after you are done with the manual stuff. type
update slots in a bacula console.


I was considering keeping a cleaning tape in slot 12, will this interfere
> with Bacula at all? Can I schedule cleaning operations with Bacula?


This is fine. I have a CLN_ barcode on my cleaning tape and in my
pools I have

Cleaning Prefix = "CLN"

so that bacula recognizes that as a cleaning tape.

Any responses, or wilingness to share some mtx-changer magic is very
> appreciated. Also if you've used any replacement for mtx or mtx-changer and
> want to share the experience that would be great!



John



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Need advice on adapting mtx-changer for Exabyte Magnum 224

2007-06-28 Thread John Drescher

I have a Magnum224 with 24 slots and 2 LTO2 drives but I am using linux and
not Solaris.  For that I did not have to change anything in the default mtx
scripts as it works correctly. I believe the numbering is one slot off
though but it does not matter. When I do a manual unload I verify the slot
from the screen on the changer itself. I will try to answer the questions I
can. One thing I would like to mention is that I am using bacula 2.X now. I
mention that because I had a serious problems with 1.38.X and my changer.



So everything is back to normal, but I still have a few questions

How can I get mtx-changer to display the status of all my slots correctly?
Is the format that mtx-changer is displaying the status of a loaded drive
correct?
Does it matter to bacula that I had to use the full command to unload the
drive?
Will Bacula know what storage element is in the drive and to move it back
to the correct slot?



For me bacula always puts the tape back into the stot it took it from. I
have never tried manuall loading a tape there and seeing what would happen
for an unload.

How do I change tapes and update inventory?


Use the release command in bacula to release any tape from the drive. Then
change the tapes manually on the changer. I recommend doing that by
unloading the magazines. Then after you are done with the manual stuff. type
update slots in a bacula console.


I was considering keeping a cleaning tape in slot 12, will this interfere

with Bacula at all? Can I schedule cleaning operations with Bacula?



This is fine. I have a CLN_ barcode on my cleaning tape and in my pools
I have

Cleaning Prefix = "CLN"

so that bacula recognizes that as a cleaning tape.

Any responses, or wilingness to share some mtx-changer magic is very

appreciated. Also if you've used any replacement for mtx or mtx-changer and
want to share the experience that would be great!




John
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] Need advice on adapting mtx-changer for Exabyte Magnum 224

2007-06-28 Thread Shon Stephens

All,
I was able to get the changer recognzied as /dev/scsi/changer/c5t4d1 on
my Solaris 10_x86 system. Setup /kernel/drv/sgen.conf, loaded the driver,
created the devlinks, and we're off. My Magnum 224 has 1 robot, and 1 LTO-3
drive. It holds can hold up to 24 tapes in 2 magazines. I currently have 1
fully loaded, 12 tape magazine installed.

I'm now trying to get mtx-changer script working correctly by following
the "Autochanger Resource" ,
http://www.bacula.org/rel-manual/Autochanger_Resource1.html, chapter of the
User Guide. Some commands work, others don't. I tested all functions
directly with mtx, and with the mtx-changer script. Mtx does perform all the
operations correctly. It can load, unload, list, transfer, etc... However,
as I said, some of the mtx-changer script functions aren't working
correctly. I am unsure whether or not they need to work with the exact
syntax described in the chapter, or if the commands will work, but with an
expanded syntax (like the Changer Command) and bacula will function
correctly.

I peformed the mtx-changer tests in the same order as the guide, using
its sytax. I also use a full command line to test if that works. In cases
where the output isn't what I expected, I tried using mtx directly.

First the mtx-changer "list" command
./mtx-changer /dev/scsi/changer/c5t4d1 list 0 /dev/rmt/0 0
1:Full:VolumeTag=A1
2:Full:VolumeTag=A2
3:Full:VolumeTag=A3
4:Full:VolumeTag=A4
5:Full:VolumeTag=A5
6:Full:VolumeTag=A6
7:Full:VolumeTag=A7
8:Full:VolumeTag=A8
9:Full:VolumeTag=A9
10:Full:VolumeTag=A00010
11:Full:VolumeTag=A00011

I know I have a fully loaded magazine in the library, so I check with mtx.
[EMAIL PROTECTED]: mtx -f /dev/scsi/changer/c5t4d1 status
 Storage Changer /dev/scsi/changer/c5t4d1:1 Drives, 12 Slots ( 1
Import/Export )
Data Transfer Element 0:Empty
 Storage Element 1:Full :VolumeTag=A1
 Storage Element 2:Full :VolumeTag=A2
 Storage Element 3:Full :VolumeTag=A3
 Storage Element 4:Full :VolumeTag=A4
 Storage Element 5:Full :VolumeTag=A5
 Storage Element 6:Full :VolumeTag=A6
 Storage Element 7:Full :VolumeTag=A7
 Storage Element 8:Full :VolumeTag=A8
 Storage Element 9:Full :VolumeTag=A9
 Storage Element 10:Full :VolumeTag=A00010

 Storage Element 11:Full :VolumeTag=A00011

 Storage Element 12 IMPORT/EXPORT:Full :VolumeTag=A00012

I checked the mtx-changer script and can see whats happening, but am not
quite sure what the best way to remedy this is...

Next the slots command, which works with the syntax from the guide.
./mtx-changer /dev/scsi/changer/c5t4d1 slots 0 /dev/rmt/0 0
12

Testing unload with the syntax of the guide produced:
./mtx-changer /dev/scsi/changer/c5t4d1 unload
usage: mtx-changer ctl-device command [slot archive-device drive-index]
   Insufficient number of arguments arguments given.
 Command expected 5 arguments

So I tried with a full command:
./mtx-changer /dev/scsi/changer/c5t4d1 unload 0 /dev/rmt/0 0
Unloading Data Transfer Element into Storage Element 0...mtx: Request Sense:
Long Report=yes

This makes sense as there is no tape in the drive.

The load command appears to work:
./mtx-changer /dev/scsi/changer/c5t4d1 load 3 /dev/rmt/0 0

And loaded proves so:
./mtx-changer /dev/scsi/changer/c5t4d1 loaded 0 /dev/rmt/0 0
3

Before I ran the next mtx-changer test in the guide, I wanted to see what
the list command and mtx status output showed.
./mtx-changer /dev/scsi/changer/c5t4d1 list 0 /dev/rmt/0 0
1:Full:VolumeTag=A1
2:Full:VolumeTag=A2
4:Full:VolumeTag=A4
5:Full:VolumeTag=A5
6:Full:VolumeTag=A6
7:Full:VolumeTag=A7
8:Full:VolumeTag=A8
9:Full:VolumeTag=A9
10:Full:VolumeTag=A00010
11:Full:VolumeTag=A00011
3:A3

Now in this case, from what I can tell of mtx-changer script, its correct in
not displaying slot 12, as there isn't a tape in that slot.
Is the drive status being shown correctly though? What format should a
loaded tape drive be displayed as by mtx-changer?

Mtx status looks like I'd expect
mtx -f /dev/scsi/changer/c5t4d1 status
 Storage Changer /dev/scsi/changer/c5t4d1:1 Drives, 12 Slots ( 1
Import/Export )
Data Transfer Element 0:Full (Storage Element 3 Loaded):VolumeTag =
A3
 Storage Element 1:Full :VolumeTag=A1
 Storage Element 2:Full :VolumeTag=A2
 Storage Element 3:Empty:VolumeTag=
 Storage Element 4:Full :VolumeTag=A4
 Storage Element 5:Full :VolumeTag=A5
 Storage Element 6:Full :VolumeTag=A6
 Storage Element 7:Full :VolumeTag=A7
 Storage Element 8:Full :VolumeTag=A8
 Storage Element 9:Full :VolumeTag=A9
 Storage Element 10:Full :VolumeTag=A00010

 Storage Element 11:Full :VolumeTag=A00011

 Storage Element 12 IMPORT/EXPORT:Full :VolumeTag=A00012

Now back to the guide commands. I try to unload the tape:
./mtx-changer /dev/scsi/changer/c5t4d1 unload
usage: mtx-changer ctl-device com