Operating System - HP-UX
1834780 Members
2979 Online
110070 Solutions
New Discussion

a simple question: which one is my tape driver?

 
gary_35
Advisor

a simple question: which one is my tape driver?

i installed a tape driver in L2000,and i use ioscan -fnCtape to check it ,but there are 3 files :ioscan -fnCtape
Class I H/W Path Driver S/W State H/W Type Description
=====================================================================
tape 0 0/0/1/0.3.0 stape CLAIMED DEVICE HP C1537A
/dev/rmt/0m /dev/rmt/0mnb /dev/rmt/c0t3d0BESTn /dev/rmt/c0t3d0DDSb
/dev/rmt/0mb /dev/rmt/c0t3d0BEST /dev/rmt/c0t3d0BESTnb /dev/rmt/c0t3d0DDSn
/dev/rmt/0mn /dev/rmt/c0t3d0BESTb /dev/rmt/c0t3d0DDS /dev/rmt/c0t3d0DDSnb

which one is tape driver?

27 REPLIES 27
Steve Steel
Honored Contributor

Re: a simple question: which one is my tape driver?

Hi

stape is the driver

If you mean the device files do

lssf /dev/rmt/*

And you will see that all of the files do something.

/dev/rmt/0m will be the best to use for tar and fbackup


Steve steel
If you want truly to understand something, try to change it. (Kurt Lewin)
SM_3
Super Advisor

Re: a simple question: which one is my tape driver?

stape is the tape driver
Vincent Farrugia
Honored Contributor

Re: a simple question: which one is my tape driver?

Hello,

All of them are.

/dev/rmt/0m is the most commonly used. It rewinds the tap automatically after each usage.

/dev/rmt/0mb is the same as the first, but writes in Berkley style and rewinds the media after usage.

/dev/rmt/0mn is the same as 0m, but it does not rewind the media after usage.

/dev/rmt/0mnb is the same as /dev/rmt/0mb, but it does not rewind the media after usage.

HTH,
Vince
Tape Drives RULE!!!
SM_3
Super Advisor

Re: a simple question: which one is my tape driver?

everything ok gary?
Robin Wakefield
Honored Contributor

Re: a simple question: which one is my tape driver?

Hi Gary,

Pages 9-11 of the following explain the different formats:

http://www.hp.com/cposupport/manual_set/lpg28833.pdf

rgds, Robin
gary_35
Advisor

Re: a simple question: which one is my tape driver?

i used ioscan -fnCstape

but there is nothing show ,does it means that i didnt install it well ?

what should i do?
SM_3
Super Advisor

Re: a simple question: which one is my tape driver?

ioscan -fnC stape ????

why did you do that?

what are you scanning for?

a tape device??
a disk??
use
#ioscan -fnC tape
#ioscan -fnC disk
not
#ioscan -fnC stape
stape is not a device
it's a driver


tell us EXACTLY what you want to do

we well be glad to help you!
gary_35
Advisor

Re: a simple question: which one is my tape driver?

i wanna know which device file is my tape driver,cause i wanna put some files into one tape for backup

its my first time use tape driver.
SM_3
Super Advisor

Re: a simple question: which one is my tape driver?

all the others have told you which ones are your tape devce files

/dev/rmt/0m etc etc

what backup command are you using?

tar
fbackup
???
gary_35
Advisor

Re: a simple question: which one is my tape driver?

i use tar cmd, for example , i wanna backup a.txt

i use tar -cvf /dev/rmt/0m a.txt

is it right?
Robin Wakefield
Honored Contributor

Re: a simple question: which one is my tape driver?

Hi Gary,

Yes that is the correct command. The tape will backup the file, then automatically rewind (since you didn't use /dev/rmt/0mn).

rgds, Robin
gary_35
Advisor

Re: a simple question: which one is my tape driver?

but how can i know does this operaion has successed ?

i wanna see what is now in may tape,i use tar -xvf /dev/rmt/0m ,but it has stopped and show nothing at all ,like that :
#tar -xvf /dev/rmt/0m



i have to use kill cmd to kill it ,whats wrong?


Armin Feller
Honored Contributor

Re: a simple question: which one is my tape driver?

After backuping datas to /dev/rmt/0m you can have a look on the tape with:

# tar tvf /dev/rmt/0m

Please try this.
SM_3
Super Advisor

Re: a simple question: which one is my tape driver?

lots of people have helped you

I hope you assign them points
monasingh_1
Trusted Contributor

Re: a simple question: which one is my tape driver?

Okay, your driver from OS stand point is "stape"

the /dev/rmt/cxxxxxxx files are the device file for your tape drive.

It has well been explained what the difference between them is.

you always run tar command against the device files, not the tape driver.

do
man 7 mt
for more explanation for various device files for tape drive.


hope this helps...
gary_35
Advisor

Re: a simple question: which one is my tape driver?

thank for answer my question ,however ,i didnt solve the problem, i use:
#tar tvf /dev/rmt/0m


Tar: tape read error

i cant tell for sure what the problem it is , the tape problem? or i didnt install the tape driver in the right way ?
Michael Tully
Honored Contributor

Re: a simple question: which one is my tape driver?

Hi,

Do you have the correct tape in the drive ?

If so let's try something else.

insert another tape and run these commands as a test.

Create a test file
# touch /tmp/test1
# tar cvf /dev/rmt/0m /tmp/test1
# mt -t /dev/rmt/0m rew
# tar tvf /dev/rmt/0m

Let us know the result.

Michael
Anyone for a Mutiny ?
thebeatlesguru
Regular Advisor

Re: a simple question: which one is my tape driver?

hi ,


[root@raddb-lc:/]#cd /tmp
[root@raddb-lc:/tmp]#touch test1
[root@raddb-lc:/tmp]#tar cvf /dev/rmt/0m /tmp/test1
a /tmp/test1 0 blocks
[root@raddb-lc:/tmp]#mt -t /dev/rmt/0m rew
[root@raddb-lc:/tmp]#tar tvf /dev/rmt/0m

Tar: tape read error



[root@raddb-lc:/tmp]#

hihi
gary_35
Advisor

Re: a simple question: which one is my tape driver?

hello ,my workmate had tried it ,the result is :

[root@raddb-lc:/]#cd /tmp
[root@raddb-lc:/tmp]#touch test1
[root@raddb-lc:/tmp]#tar cvf /dev/rmt/0m /tmp/test1
a /tmp/test1 0 blocks
[root@raddb-lc:/tmp]#mt -t /dev/rmt/0m rew
[root@raddb-lc:/tmp]#tar tvf /dev/rmt/0m

Tar: tape read error



[root@raddb-lc:/tmp]#



Michael Tully
Honored Contributor

Re: a simple question: which one is my tape driver?

Let's try something a little more substantial so we can see if there are any errors writing to the tape.

Clean the drive before we begin.

# mt -t /dev/rmt/0m rew
# tar cvf /dev/rmt/0m /usr
# mt -t /dev/rmt/0m rew
# tar tvf /dev/rmt/0m

Please let us know the result of this.

Cheers
Michael
Anyone for a Mutiny ?
Michael Steele_2
Honored Contributor

Re: a simple question: which one is my tape driver?

To begin with, all of these are logical names for the same device just a different way of formatting the written data into the tape. They are Berkeley or AT&T format with compression or with(out) automatic rewind. Anything with BEST is compression.

Use this proceedure to check if your tape backup is working.

NOTE: Clean tape drive

a) ioscan -fknC tape (* Note everything is CLAIMED, right? *)

b) Check power LED on tape drive

c) insert the tape (*note the LEDs *)

d) mt -t /dev/rmt/0m rew (*
This command will cause the LED for rewind to light. Watch close. DOESN'T HANG A LONG TIME, RIGHT? *)

e) The cursor will hang a few seconds but return to the command line.

f) tar -cvf file /dev/rmt/0m
(* note the LED lights up when writting to tape *)

g) when done the tape will auto rewind

h) mt -t /dev/rmt/0m rew (* comes back OK right? Doesn't hang a long time, right?

i) tar -tvf /dev/rmt/0m (* This is the final step that will read the table of contents off of your successfull backup - control c to break *)
Support Fatherhood - Stop Family Law
gary_35
Advisor

Re: a simple question: which one is my tape driver?

hi, thanks for so patient, i have retried the cmd again ,but the result is the same :[root@raddb-lc:/tmp]#mt -t /dev/rmt/0m rew
[root@raddb-lc:/tmp]#tar cvf /dev/rmt/0m /usr
a /usr/bin/mediainit 128 blocks
a /usr/bin/chgrp 48 blocks
a /usr/bin/cmp 40 blocks
a /usr/bin/cp 64 blocks
a /usr/bin/cut 40 blocks
a /usr/bin/dd 56 blocks
a /usr/bin/egrep 56 blocks
a /usr/bin/expr 40 blocks
a /usr/bin/false 1 blocks
a /usr/bin/fgrep link to /usr/bin/egrep
a /usr/bin/getopts 1 blocks
a /usr/bin/grep link to /usr/bin/egrep
a /usr/bin/hostname 32 blocks
a /usr/bin/kill 32 blocks
a /usr/bin/ln 40 blocks
a /usr/bin/model 48 blocks
a /usr/bin/ps 72 blocks
a /usr/bin/pwd 32 blocks
a /usr/bin/rm 56 blocks
a /usr/bin/rmdir link to /usr/bin/rm
a /usr/bin/sed 80 blocks
a /usr/bin/sort 96 blocks
a /usr/bin/tar 96 blocks
a /usr/bin/touch 40 blocks
a /usr/bin/true 1 blocks
a /usr/bin/uname 40 blocks
a /usr/bin/wc 40 blocks
a /usr/bin/compress 56 blocks
a /usr/bin/ed 112 blocks
a /usr/bin/find 104 blocks
a /usr/bin/getopt 32 blocks
a /usr/bin/id 40 blocks
a /usr/bin/more 120 blocks
a /usr/bin/tail 48 blocks
a /usr/bin/uncompress link to /usr/bin/compress
a /usr/bin/zcat link to /usr/bin/compress
a /usr/bin/bdf 48 blocks
a /usr/bin/diff 80 blocks
a /usr/bin/lifcp 80 blocks
a /usr/bin/lifls 56 blocks
a /usr/bin/lifrm 48 blocks
a /usr/bin/mt 40 blocks
a /usr/bin/ex 488 blocks
a /usr/bin/vi link to /usr/bin/ex
a /usr/bin/ftp 224 blocks
a /usr/bin/rcp 96 blocks
a /usr/bin/remsh 64 blocks
a /usr/bin/hp9000s800 link to /usr/bin/true
a /usr/bin/hp9000s700 symbolic link to /sbin/hp9000s700
a /usr/bin/lifinit 56 blocks
a /usr/bin/lifrename 56 blocks
a /usr/bin/adb 384 blocks
a /usr/bin/adb64 864 blocks
a /usr/bin/at 96 blocks
a /usr/bin/batch 1 blocks
a /usr/bin/chacl 40 blocks
a /usr/bin/clear 32 blocks
a /usr/bin/compressdir 1 blocks
a /usr/bin/crontab 56 blocks
a /usr/bin/dc 88 blocks
a /usr/bin/csh 304 blocks
a /usr/bin/cue 3072 blocks
Tar: end of tape
Tar: to continue, enter device/file name when ready or null string to quit.

User entered a null name for next device file.
[root@raddb-lc:/tmp]#mt -t /dev/rmt/0m rew


[root@raddb-lc:/tmp]#
[root@raddb-lc:/tmp]#
[root@raddb-lc:/tmp]#tar tvf /dev/rmt/0m

Tar: tape read error


does it mean the tape is something wrong ? but the tape is a new one

Michael Tully
Honored Contributor

Re: a simple question: which one is my tape driver?

I think that there could be something wrong with your drive. Let's try something just a little smaller.

# mt -t /dev/rmt/0m rew
# tar cvf /dev/rmt/0m /usr/bin/c*
# mt -t /dev/rmt/0m rew
# tar tvf /dev/rmt/0m

Your using a DDS3 tape drive, but what type of tape are you using? (DDS2 120 metre)
Anyone for a Mutiny ?
gary_35
Advisor

Re: a simple question: which one is my tape driver?

i use a DD3 tape, and i tried :

# mt -t /dev/rmt/0m rew
# tar cvf /dev/rmt/0m /usr/bin/c*
# mt -t /dev/rmt/0m rew
# tar tvf /dev/rmt/0m

the result is the same to the last time ,

Tar: tape read error