- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- check the dat tape or dlt tape
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2002 06:22 AM
02-04-2002 06:22 AM
check the dat tape or dlt tape
I need to check if a DAT TAPE or DLT TAPE is ready to write o read.
Is there a ux command that returned me the state of the tape ???
Thank you
Matteo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2002 06:25 AM
02-04-2002 06:25 AM
Re: check the dat tape or dlt tape
Try,
# mt -f /dev/rmt/0m status
Hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2002 06:27 AM
02-04-2002 06:27 AM
Re: check the dat tape or dlt tape
if /usr/bin/mt -t /dev/rmt/0m rew 2>/dev/null ; then
echo "tape is mounted ..."
else
echo "tape is > > NOT < < mounted ..."
exit
fi
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2002 06:34 AM
02-04-2002 06:34 AM
Re: check the dat tape or dlt tape
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2002 06:49 AM
02-04-2002 06:49 AM
Re: check the dat tape or dlt tape
Try instead
mt -f /dem/rnt/0mnb status
If -f doesnot work then use -t. Look for the man pages of mt for more information on -f -t.
Some of my server doesn't support -f but works with -t.
Goodluck,
-USA..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2002 06:52 AM
02-04-2002 06:52 AM
Re: check the dat tape or dlt tape
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2002 06:56 AM
02-04-2002 06:56 AM
Re: check the dat tape or dlt tape
do a "ioscan -fnC tape" and check the device file for the tape drive and then use it with the mt command.
Hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2002 06:56 AM
02-04-2002 06:56 AM
Re: check the dat tape or dlt tape
HP does not support the status option.
The rewind is the best supported solution
Steve Steel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2002 07:20 AM
02-04-2002 07:20 AM
Re: check the dat tape or dlt tape
echo " testing write tape ..." | dd of=/dev/rmt/Xmn
if [ $? -ne 0 ] ; then
echo " tape is write protected .."
else
echo " tape is overwrite ..... :(("
fi
C code way :
#incluse
#include
main ()
{
int dat;
dat=open ("/dev/rmt/0mn", O_RDWR);
if ( dat == -1 )
{
printf (" no tape or tape protected\n");
exit (1);
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2002 07:31 AM
02-04-2002 07:31 AM
Re: check the dat tape or dlt tape
Try
ioscan -fnKc tape
This would display results similar to this:
Class I H/W Path Driver S/W State H/W Type Description
=====================================================================
tape 0 1/4/0/0.0.0 stape CLAIMED DEVICE QUANTUM DLT7000
/dev/rmt/0m /dev/rmt/0mnb /dev/rmt/c16t0d0BESTn
/dev/rmt/0mb /dev/rmt/c16t0d0BEST /dev/rmt/c16t0d0BESTnb
/dev/rmt/0mn /dev/rmt/c16t0d0BESTb
Then run mt -f /dev/rmt/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2002 07:32 AM
02-04-2002 07:32 AM
Re: check the dat tape or dlt tape
It should be
ioscan -fnkC tape
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2002 07:42 AM
02-04-2002 07:42 AM
Re: check the dat tape or dlt tape
Also, the '-f ' option is only supported at 11.x, 10.x used the '-t ' option.
So, if you are at HP-UX 10.20 do something like:
# mt -t /dev/rmt/?m rew
where the ? is the appropriate number for your tape drive.
At 11.0 you can do:
# mt -f /dev/rmt/?m status
again, where ? is the appropriate number for you tape drive.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2002 07:56 AM
02-04-2002 07:56 AM
Re: check the dat tape or dlt tape
i resolved my problem with a csh script.