Operating System - HP-UX
1834144 Members
2388 Online
110064 Solutions
New Discussion

load-command with Dat-Exchanger

 
SOLVED
Go to solution
Thomas Greig
Regular Advisor

load-command with Dat-Exchanger

HP-UX 11i

we have a couple of hp DAT-exchangers, and I was wondering if there's a command I can type to insert/load the tape?

One can ofcourse do this manually, but I would like to be able to do it through the command-line too. sometimes the tape is not loaded, or say I need tape 6 and tape1 is loaded I will have to go through all the tapes before I get to the tape I need.

I'm sure there's a "quick" solution for this.



cheers
Thomas G.
6 REPLIES 6
Thayanidhi
Honored Contributor

Re: load-command with Dat-Exchanger

Hi,

Use "mc" Command.

See the man page for "mc"

If you are using HP's Omniback,
then there are some sommand line utilitis.

TT
Attitude (not aptitude) determines altitude.
Elmar P. Kolkman
Honored Contributor

Re: load-command with Dat-Exchanger

For this you will need a /dev entry for the changer. This device is something you will need to create yourself with mknod. On 11i it will be something like:
mknod /dev/datchgr c 203 0xcs0000
where:
c=controler number
s=SCSI ID of changer

If you have this, you can use:
mc -p /dev/datchgr [...]
Every problem has at least one solution. Only some solutions are harder to find.
Thomas Greig
Regular Advisor

Re: load-command with Dat-Exchanger

I have already created "nod's" with the mknod-comamnd. the address to that is
/dev/rmt/dat

¤ll /dev/rmt/dat
crw-rw-rw- 1 bin bin 205 0x0030c0 ... /dev/rmt/dat


Even as I do it as root, I get a Permission-error when I try to run the mc-command:

#mc -p /dev/rmt/dat -r DS
ERROR: Permission denied

#mc -p /dev/rmt/dat -s S2 -d D1
ERROR: Permission denied

#mc -p /dev/rmt/dat -c DS
ERROR: Permission denied

Thom
Elmar P. Kolkman
Honored Contributor
Solution

Re: load-command with Dat-Exchanger

Your node is not for the changer but for a tape unit... You need the changer to have its own device node.

Check out the major number you used (205) with lsdev and you'll see it is using the stape driver instead of a spt or sctl driver, which is needed for the changer to work.
Every problem has at least one solution. Only some solutions are harder to find.
Thomas Greig
Regular Advisor

Re: load-command with Dat-Exchanger

thank you very much!..this is now working perfect. the node for the exchanger was created for omniback.. but after creating a node for the tapedrive too it's working as a dream.

cheers
Thomas
Thomas Greig
Regular Advisor

Re: load-command with Dat-Exchanger

one last question: is it possible to tell the 'mc' to return the tape from it's original slot?..

say we insert the third tape (out of six) into the drive, -when this tape is beeing ejected, we want it to return to slot 3.

If this is possible it's much easier to make a alias/script for this.

cheers
Thomas Greig