Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CHECKING TO SEE IF A TAPE IS MOUNTED

Status
Not open for further replies.

johngiggs

Technical User
Oct 30, 2002
492
US
I want to add a few lines to my mksysb script to check to see if a tape is mounted, and if it is not, I would like to send out an e-mail and have the CRON job retry in 10 minutes. What is the best way of doing this?

tapeutil -f /dev/rmt0 audit ??

Any help would be greatly appreciated.

Thanks,

John
 
i know tctl from previous use but the theory should hold. maybe do `tctl rewind` and if it errors i would expect that the tape is missing. i have not tested that but seems like it should work. IBM Certified -- AIX 4.3 Obfuscation
 
Hi John,
the best way to see tape drive is ready and writable is mksysb uses itsetf
# 2>/dev/null>/dev/rmt0
and then check the value of $?
Regards Boris.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top