David Champion on Mon, 02 Feb 2004 15:09:05 -0600


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [Cialug] mtx and stderr


I know I sent this after 5pm on Friday... so I thought I'd re-post in case any of you have an idea on it.

-dc

David Champion wrote:

I'm updating our backup script to accomodate working with a tape changer (HP DAT 24x6). The commands I'm using to change tapes are:

mtx -f /dev/sg1 status # displays the changer status so I can tell which tape is where...

If it's the first day in the rotation, it loads the first tape with:

mtx -f /dev/sg1 first

...otherwise, it just loads the next tape in the magazine with this :

mtx -f /dev/sg1 next

Problem is, when there's already a tape in the drive (the "data transer element" in HP speak), it produces this message to stderr (like if you do a mtx ... 2> error.txt) :

"Unloading Data Transfer Element into Storage Element 1...done"

IMHO, this message is just saying it's taking tape 1 out of the drive, putting it back in slot 1 in the magazine, then loading the next tape (2) into the drive. No error condition occurs, and it's ready to go... so it shouldn't echo anything to stderr, right?

I could alternatively have the script figure out what day of the week it is, calculate what tape slot it should load for that day, and use the mtx command "unload" and "load <x>"... that's a bit more work than this should require.

I'm thinking that this is a bug in the "mtx" command. The man page doesn't have anything to say about errors.

Anyone have any ideas about this?

-dc



_______________________________________________ Cialug mailing list Cialug@xxxxxxxxxx http://cialug.org/mailman/listinfo/cialug