Unix Technical Forum

LTO Tape Drive query

This is a discussion on LTO Tape Drive query within the AIX Operating System forums, part of the Unix Operating Systems category; --> Runninx AIX 4.3.3.0 I have 2 IBM Ultrium LTO tape drives and do a double backup of the entire ...


Go Back   Unix Technical Forum > Unix Operating Systems > AIX Operating System

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-04-2008, 08:31 PM
sengstock3
 
Posts: n/a
Default LTO Tape Drive query


Runninx AIX 4.3.3.0

I have 2 IBM Ultrium LTO tape drives and do a double backup of the
entire system each night.



I am having problems with the assistant S.A not swapping out the tapes
each day. Other than beating him into submission, is there a way to
query the tape drives to see if they are ready for use so I can tell if
he has put in new tapes? We are using CPIO to copy files.


--
Posted via http://dbforums.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-04-2008, 08:31 PM
Raviz
 
Posts: n/a
Default Re: LTO Tape Drive query


what we do is after every backup we make sure that the tape is
rewinded and ejected. as we scheduled the jobs using crontab, we run a
script which checks if the tape is ready in the tapedrive, if its not
the user would be sent a email saying that he needs to take care of
the tape. this script is triggered couple of hours before the backup,
may be you can write a script which mails the operator informing to
take care of the tape.


--
Posted via http://dbforums.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-04-2008, 08:31 PM
sengstock3
 
Posts: n/a
Default Re: LTO Tape Drive query


what command do you use to check if the tape is in the drive and the
drive is ready? That is what I'm looking for.


--
Posted via http://dbforums.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-04-2008, 08:31 PM
Steve Greatbanks
 
Posts: n/a
Default Re: LTO Tape Drive query


"sengstock3" <member25238@dbforums.com> wrote in message
news:3495268.1066422630@dbforums.com...
>
> what command do you use to check if the tape is in the drive and the
> drive is ready? That is what I'm looking for.


Just do a rewind and check the shell return status. If it is 0, there is a
tape in the drive, if not, there isn't.

mt -f /dev/rmt? rewind
REWSTATUS=$?

then check $REWSTATUS


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-04-2008, 08:33 PM
F. Michael Orr
 
Posts: n/a
Default Re: LTO Tape Drive query

On Fri, 17 Oct 2003 08:58:48 -0400, sengstock3 wrote:

>
> Runninx AIX 4.3.3.0
>
> I have 2 IBM Ultrium LTO tape drives and do a double backup of the
> entire system each night.
>
>
>
> I am having problems with the assistant S.A not swapping out the tapes
> each day. Other than beating him into submission, is there a way to
> query the tape drives to see if they are ready for use so I can tell if
> he has put in new tapes? We are using CPIO to copy files.
>
>
> --
> Posted via http://dbforums.com


If you have the ATape drivers installed, you could use 'tapeutil.' Or,
if you know anything about C coding, download GC35-0346, which documents
the ioctl() functions for the tape libraries.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 01-04-2008, 08:34 PM
Raviz
 
Posts: n/a
Default Re: LTO Tape Drive query


sengstock3, try to look into tapechk command. One way is to check the
first two files of the tape using tapechk 2, this command rewinds the
tape and checks the first two files available on the tape. So you can
write a script so that tapechk command after rewinding could check the
first two files it returns error and you can send an email to your
operator saying to load tapes, thats my take on this issue. Hope that
will help you out



the output will be



# tapechk 2

118-008 The tapechk command is rewinding the tape. Please wait.

/dev/rmt0: The device is not ready for operation.

118-009 The tapechk command could not rewind the tape. Please refer

to the messages reference book.


--
Posted via http://dbforums.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 01-04-2008, 08:35 PM
sengstock3
 
Posts: n/a
Default Re: LTO Tape Drive query


if the tape IS in the drive, does it get reset after tapechk is done?
In other words, will the tape still be ready to back up if tapechk is
done on it?


--
Posted via http://dbforums.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 01-04-2008, 08:37 PM
Raviz
 
Posts: n/a
Default Re: LTO Tape Drive query


sengstock3 tapechk just rewinds the tape and checks for the file
constitency. it doesn't eject the tape.take a look at man tapechk for
further help.


--
Posted via http://dbforums.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:18 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com