Operating System - HP-UX
1830508 Members
2505 Online
110006 Solutions
New Discussion

tar command says "No such device or address

 
Amit Kureel
Advisor

tar command says "No such device or address

I apologize to everybody that a typo in my previous post wasted a lot of your time.... I am well aware of the syntax of the "tar" command, but even after the correct command ( tar -cvf /dev/rmt/0m /home/amit ), I am getting this error message !

So now can anybody offer some help ?

I also repeat the second part of my question...

Can anybody indicate what could be the error, and how to re-create the device file /dev/rmt/0m that tar refers to by default...? because my "mksf" only creates the file /dev/rmt/c#t#dBEST

I even tried to re-build the device file in /dev/rmt/c#t#dBEST and I can see all the usual files /dev/rmt/0m
/dev/rmt/0mn
/dev/rmt/0mnb
etc.,


Thanks in advance....

Amit Kureel
6 REPLIES 6
Sridhar Bhaskarla
Honored Contributor

Re: tar command says "No such device or address

Hi Amit,

I feel the device associated with /dev/rmt/0m is not matching to that of C#t#dBEST.

Try doing this

rmsf -a /dev/rmt/0*
rmsf -a /dev/rmt/c0*

ioscan -f

insf

This should create /dev/rmt/0* files.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Sridhar Bhaskarla
Honored Contributor

Re: tar command says "No such device or address

Amit,

You may also get this message if the tape is bad. Try cleaning up or with a new tape. Once you refreshed the device files, you can verify them using the mt command

mt -t /dev/rmt/0m rew

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
linuxfan
Honored Contributor

Re: tar command says "No such device or address

Hi Ameet,

You may have to clean the tape drive couple of times. Also try using a new tape.
Try doing a dd and try reading from the tape.

Also try ioscan -fnC tape
If you want to recreate the device files (insf should work but if not try
mksf -H

-Ramesh
They think they know but don't. At least I know I don't know - Socrates
Christopher McCray
Occasional Contributor

Re: tar command says "No such device or address

Do you have other device files for tapes, such as /dev/rmt/1m , 2m, etc? If so, have you tried them? Just a thought because I have a server where is I want to tar something , I have to use 3m. Let me know and good luck.

Chris
Christopher McCray
Bill Hassell
Honored Contributor

Re: tar command says "No such device or address

It's really important to know about the lssf command. Device files are not decipherable without this decoder. Use the command as in:

lssf /dev/rmt/*

Now there is no question as to what the device files are. Also, use the ioscan command with -k for speed:

ioscan -knfC tape

And rather than using tar, use the simple mt command to rewind the tape. If that doesn't work, no other program will either. Are there multiple instances shown with ioscan such 0m, 1m, 2m and so on? This probably means you have been moving devices around. Make sure the tape drive you need matches the ioscan output and use one of those device files.


Bill Hassell, sysadmin
Sanjay_6
Honored Contributor

Re: tar command says "No such device or address

Hi amit,

Seems liek there might be some problem with you tape device. Can you reboot the box and see if it workd. Sometimes once the tar command fails it may hung up the device.

You can try

mt reset
mt status

This may work. Else see if you can reboot the box. Otherwise you may have to replace the Drive and see.

Thanks