1834163 Members
2586 Online
110064 Solutions
New Discussion

tar

 
Jeffrey F. Goldsmith
Super Advisor

tar

I am trying to do a tar command to write to a tape but i keep getting an error:

root: /root ==> tar -cvf /dev/rmt/1mn *
tar: cannot open /dev/rmt/1mn

What could I be doing wrong? Here is my ioscan.

root: /root ==> ioscan -fnC tape
Class I H/W Path Driver S/W State H/W Type Description
=====================================================================
tape 1 0/3/1/0.1.0 stape CLAIMED DEVICE COMPAQ SDLT320
/dev/rmt/1m /dev/rmt/c4t1d0BEST
/dev/rmt/1mb /dev/rmt/c4t1d0BESTb
/dev/rmt/1mn /dev/rmt/c4t1d0BESTn
/dev/rmt/1mnb /dev/rmt/c4t1d0BESTnb

My backups seem to be working. I am using Data Protector to do the backups.
9 REPLIES 9
Michael Steele_2
Honored Contributor

Re: tar

releative path uses a '.' instead of a '*' otherwise its an absolute restore and only the /dir specified can be restored into. So :

cd /dir
tar -cvf /dev/rmt/1mn .

Do you have a spare backup tape you can play with?

tar -tvf /dev/rmt/1mn (* list contents *)
dd if=/dev/rmt/1mn > /tmp/tapecontents

Do you have any robots / tape lib.s. If so how do they show up in ioscan?

ioscan -funC autoch

Verify the tape unit has a green light on it.
Support Fatherhood - Stop Family Law
Jeffrey F. Goldsmith
Super Advisor

Re: tar

root: /root ==> ioscan -fnC autoch
Class I H/W Path Driver S/W State H/W Type Description
=====================================================================
autoch 0 0/3/1/0.0.0 schgr CLAIMED DEVICE HP MSL5000 Series
/dev/rac/c4t0d0

root: /root ==> tar -cvf /dev/rmt/1mn
tar: cannot open /dev/rmt/1mn

root: /root ==> tar -tvf /dev/rmt/1mn
tar: cannot open /dev/rmt/1mn


Everything looks like the tape drive is there and working but for some reason I can not do a tar or do an inventory of files that were tared there.
Michael Steele_2
Honored Contributor

Re: tar

Please paste the error report from logtool for me mon ami.

STM > TOOLS > UTILITY > RUN > LOGTOOL > FILE > RAW SUMMARY
Support Fatherhood - Stop Family Law
MarkSyder
Honored Contributor

Re: tar

I am surprised to see you're using 1mn, the no rewind device. I wonder if this is the cause of the problem? Perhaps tar is failing because it needs to rewind the tape. Try:

tar cvf /dev/rmt/1m *

Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing
H.Merijn Brand (procura
Honored Contributor

Re: tar

first rewind it

# mt rewind /dev/rmt/1m

Is the tape write protected?
Does dd work?

# dd if=/dev/rmt/1m ibs=5120 | tar tvf -

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
rariasn
Honored Contributor

Re: tar

Hi Jeffrey,

Verify phisycal tape protection (off)

# mt -t /dev/rmt/1mn rew
# dd if=/dev/null of=/dev/rmt/1mn
# mt -t /dev/rmt/1mn rew
# cd dirtocopy
# tar cvf /dev/rmt/1mn ./*

rgs,
ran


Enzo Genuardi
Advisor

Re: tar

Hi Jeffrey,

I hope you are checking in the false direction! I am quite sure that you have some Data Protector process working at the same time that you try the tar?
Check with:# ps -ef | grep omni
If they are any I will sugest to stop Data Protector, but you need to be shure of your backups schedule, then do your tar and then start your Data Protector.

Hope that help, cheers,
Enzo.
Rajesh SB
Esteemed Contributor

Re: tar

Hi,

You use rewindable tape device instead non-rewindable /dev/rmt/1m.
If it Omniback initiated, from OmniBack recycle it and try to use in UX Tar.

Good luck,

Regards
Rajesh
Tom Henning
Trusted Contributor

Re: tar

Check the really obvious one also. Do you have a writtable tape mounted in the drive, ready for use?
What is it that possesses otherwise sane individuals to change something just because it has not been changed in a while?