Operating System - HP-UX
1832351 Members
2486 Online
110041 Solutions
New Discussion

tar: cannot open /dev/rmt/0m

 
SOLVED
Go to solution

tar: cannot open /dev/rmt/0m

Hi all,

I am having trouble with a tape drive and was wondering if anyone might have some ideas.

when I execute a tar (or cpio or dd) I get an error:
# tar cvf /dev/rmt/0m /prd_db1/oracle/prd
tar: cannot open /dev/rmt/0m
dd returns
/dev/rmt/0m: Permission denied
and cpio returns:
cannot write in

I have already checked ioscan, the device is claimed:
# ioscan -funC tape
Class I H/W Path Driver S/W State H/W Type Description
=====================================================================
tape 0 0/1/1/1.1.0 stape CLAIMED DEVICE HP Ultrium 2-SCSI
/dev/rmt/0m /dev/rmt/c3t1d0BEST
/dev/rmt/0mb /dev/rmt/c3t1d0BESTb
/dev/rmt/0mn /dev/rmt/c3t1d0BESTn
/dev/rmt/0mnb /dev/rmt/c3t1d0BESTnb


I tried an
# rmsf -H 0/1/1/1.1.0
# insf -H 0/1/1/1.1.0

But this didn't fix the issue.

Also, there is a Data Protector 5.5 media agent on this server. I have checked that Data Protector is able to read and write to tapes in this device, which is strange since no other command works. I have disabled the device in DP, but even after doing that, none of the tar, dd or cpio commands work on the device.

I have also tried using /dev/rmt/0mn instead, but no change, that didn't work either.

Does anyone have any other ideas to fix this problem?

Thanks all!
5 REPLIES 5

Re: tar: cannot open /dev/rmt/0m

Also, I don't know if this helps...

# mt -t /dev/rmt/0m fsf 1
fsf 1 failed: I/O error
Warren_9
Honored Contributor
Solution

Re: tar: cannot open /dev/rmt/0m

Hi,

did u check on the tape media? write protect? or replace a new tape for testing.....

GOOD LUCK!!

Re: tar: cannot open /dev/rmt/0m

Hi all,

Looks like I found the reason for the errors, simple really. The tape operator inserted a tape that was write protected, and I just 'assumed' that it would be writable:

# mt -t /dev/rmt/0m status
Drive: HP Ultrium 2-SCSI
Format:
Status: [45114200] BOT write-protected online compression immediate-report-mode
File: 0
Block: 0

That's all it was. Will change write-protect tab and it should work after that.

Thanks.
Dennis Handly
Acclaimed Contributor

Re: tar: cannot open /dev/rmt/0m

/dev/rmt/0m: Permission denied

Do you have permission to open the device?
$ ll /dev/rmt/0m

Re: tar: cannot open /dev/rmt/0m

see above