4 Operator

 • 

14.4K Posts

August 28th, 2006 07:00

What is the output on AIX then? It may depend perhaps on mt package or package having mt included. You could check AIX forum for that. I know I have seen on some HPUX platforms too having mt package without support for status command, but that has been resolved by box admin installing different version of mt command.

4 Operator

 • 

14.4K Posts

August 28th, 2006 08:00

If you do mt -f device rewind I would assume that
- if tape is inside it will get rewinded and exit code will be 0
- if tape is not inside you will get an error and exit code other than 0

Use that. I find strange that there is NO difference in status output if tape is loaded and if that is not loaded in specific drive. Are you sure that is the case?

4 Operator

 • 

14.4K Posts

August 28th, 2006 08:00

What error message? That there is no tape inside? Perfect, then you can eliminate that logical path for used physical drive, right? ...or there is something else going on?

4 Operator

 • 

14.4K Posts

August 28th, 2006 08:00

Looks like mt is linked to lsattr. As I said, this is more AIX talk. You may wish to check on IBM's forum if there is alternative mt for AIX.

To check if tape is mounted on in drive you could always use sjirdtag command to verify it.

253 Posts

August 28th, 2006 08:00

mt command on Solaris, Windows ... shows if there is a mounted tape:

C:\>mt -f \\.\Tape0 status
\\.\Tape0:
Current Status: The media in the drive may have changed.

default blocksize = 8192
maximum blocksize = 131072
minimum blocksize = 1
MaximumPartitionCount = 1
EOTWarningZoneSize = 0
CompressionEnabled
Features:
Performs LONG erase operation
Performs IMMEDIATE erase operation
Support FIXED block length mode
Support VARIABLE block length mode
Returns errors on write if tape is write - protected
Supports hardware data compression
Can provide current absolute device block address
Can provide current logical block address and partition
Can physically load and / or unload tape
Support PREVENT / ALLOW Media Removal
Performs IMMEDIATE rewind operations
Allows Setting FIXED LENGTH or VARIABLE block sizes
Performs IMMEDIATE Load / Unload operations
Allows hardware data compression to be enabled / disabled
Can position tape to an absolute physical block
Can position tape to a logical block(and partition)
Can position tape to END of RECORDED DATA
Can perform tape record positioning(backwards / forwards)
Can perform tape file positioning(backwards / forwards)
Can search for sequential filemarks
Can move backwards across records or filemarks or setmarks
Can write FILEMARKS
Performs IMMEDIATE tape mark write operations
operation status on \\.\Tape0 failed: No media in drive.

In AIX, shows:

# mt -f /dev/rmt1.1 status
mode yes Use DEVICE BUFFERS during writes True
block_size 0 BLOCK size (0=variable length) True
extfm yes Use EXTENDED file marks True
res_support yes RESERVE/RELEASE support True
var_block_size 0 BLOCK SIZE for variable length support True
density_set_1 0 DENSITY setting #1 True
density_set_2 0 DENSITY setting #2 True
delay 45 Set delay after a FAILED command True
rwtimeout 144 Set timeout for the READ or WRITE command True

which is similar to:

#lsattr -El rmt1
mode yes Use DEVICE BUFFERS during writes True
block_size 0 BLOCK size (0=variable length) True
extfm yes Use EXTENDED file marks True
res_support no RESERVE/RELEASE support True
var_block_size 0 BLOCK SIZE for variable length support True
density_set_1 0 DENSITY setting #1 True
density_set_2 0 DENSITY setting #2 True
delay 45 Set delay after a FAILED command True
rwtimeout 144 Set timeout for the READ or WRITE command True

We needed to know how to obtain on AIX the same output that on Windows¿

Thanks

253 Posts

August 28th, 2006 08:00

sjirdtag shows if the tape is mounted on drive 1, 2, 3 ... We needed to know in which /dev/rmtx.x is mounted the volume.

Thanks

253 Posts

August 28th, 2006 08:00

I'm sure.

mt -f device rewind likes not work fine. It always shows the same error message after many minutes.

Thanks

4 Operator

 • 

14.4K Posts

August 28th, 2006 09:00

Well, if you get an error message no matter what status of drive is you might have some other issue to deal with. Not knowing error message won't help so I would sugget to check it out and involve IBM support too.

253 Posts

August 28th, 2006 09:00

Tthe error message appears if there is mounted tape or is not mounted. I dont't remember it.

Thanks
No Events found!

Top