Operating System - HP-UX
1847718 Members
6108 Online
110265 Solutions
New Discussion

Tape Drives Don't Rewind with mt?

 
Jeanine Kone
Trusted Contributor

Tape Drives Don't Rewind with mt?

I just got new Ultrium tape drives installed on my servers. I am having trouble getting all of my backup commands to work.

If I write to the tape using the /dev/rmt/0mn device and then use mt -f /dev/rmt/0m rewind to rewind the tape, I get error messages when I try to list the contents of the tape (it's like it did not actually rewind).

If I use the /dev/rmt/0m device when writing to the tape (and thus can skip the rewind), I can read the contents just fine. I unfortunately, need to use the no rewind device b/c I am writing new files to the tape every hour.

Any idea why the mt -f device rewind command does not work?

While I am at it, I am having trouble getting fbackup to use the device as well. I get an error that output file /dev/rmt/0m (or 0mn) is not a valid device file for backup. Any ideas?
7 REPLIES 7
Vincenzo Restuccia
Honored Contributor

Re: Tape Drives Don't Rewind with mt?

Try mt -t /dev/rmt/0m rewind
melvyn burnard
Honored Contributor

Re: Tape Drives Don't Rewind with mt?

Hmm,. a man mt shows no -f option, only the -t.

SO I guess you should try :
mt -t /dev/rmt/0m rew


as per the man page
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Jeanine Kone
Trusted Contributor

Re: Tape Drives Don't Rewind with mt?

I am using HP-UNIX 11. My man page says
"mt [-f tapename] command [count]"
It shows the -t option as obsolete.

Jeanine
James R. Ferguson
Acclaimed Contributor

Re: Tape Drives Don't Rewind with mt?

Hi Jeanine:

# mt -t /dev/rmt/0m rew

...should rewind the tape on 10.x or 11.x.

The '-t' flag is considered obsolete as of 11.x. The preferred flag for 11.x is '-f'.

...JRF...
A. Clay Stephenson
Acclaimed Contributor

Re: Tape Drives Don't Rewind with mt?

Hi Jeanine:

I would check the minor device numbers of the device nodes to see if they are correct. Also,
you may have better success using the 'Berkeley' style device 0mnb

e.g. mt -f /dev/rmt/0mnb rew
If it ain't broke, I can fix that.
Jeanine Kone
Trusted Contributor

Re: Tape Drives Don't Rewind with mt?

I have eight (four rew, for norew) possible device names for the one tape drive - how do I know which to use and what are the differences?

They are:
/dev/rmt/0m(n)
/dev/rmt/0m(n)b
/dev/rmt/c0t3d0BEST(n)
/dev/rmt/c0t3d0BEST(n)b

Thanks!
A. Clay Stephenson
Acclaimed Contributor

Re: Tape Drives Don't Rewind with mt?

Hi Jeanine,

If you compare the major and minor device numbers of the nodes you mentioned, you will find that they come in pairs, e.g.
/dev/rmt/0mnb
/dev/rmt/c0t3d0BESTnb

These are the Berkley-style (as opposed to the AT&T style tapemark conventions) no rewind devices are you can use either of them interchangably.

The major/minor device numbers are all that are important. The 0mnb is just a shorthand convention to make typing easier, the longer name is more descriptive (e.g. Controller 0, SCSI ID 3, LUN 0, BESTnb refer to the low-order bits of the minor device number and do thing like compression, rewind, tape marks, etc. In any event, you could call the node 'Dopey' and as long as you had the major/minor devive numbers the same, it would work just fine.


The mt(1) man page clearly states that only Berkeley style no-rewind devices should be used. For a good explanation of the device node conventions and minor device number assignments man mt(7).

Regards, Clay

If it ain't broke, I can fix that.