Operating System - HP-UX
1831636 Members
1715 Online
110027 Solutions
New Discussion

Cannot use /dev/rmt/* tape devices with tar

 

Cannot use /dev/rmt/* tape devices with tar

We use DataProtector for backups to fiber-connected tape drives. These have no problems. Today while trying to debug an issue with a backup, I tried to use tar with the device /dev/rmt/5mn. It gives me the error message "cannot open /dev/rmt/5mn". I can use this same tape drive with the same device file in DataProtector, so I know it isn't a hardware issue. I tried removing the device file and using insf to recreate it, but I get the same error.

I have also tested with fbackup, dd, and cpio. They all failed. dd and cpio give the error message "permission denied". When I look in the syslog, I see these error messages:
May 20 14:07:35 myhost vmunix: SCSI TAPE: dev = 0xcd5f1000 Failed open - st_san_safe enabled
May 20 14:14:52 myhost vmunix: SCSI TAPE: dev = 0xcd612000 Failed open - st_san_safe enabled

It is correct that I have the kernel parameter st_san_safe enabled, but I am using the no-rewind device files and they always worked before now.

I have been able to use tar, fbackup, cio, and dd with these drives in the past. The only thing that has changed recently is that I installed the December 2007 Gold patch bundle B.11.11.0712.475.

Does anyone have any ideas? Thanks.
8 REPLIES 8
Jeeshan
Honored Contributor

Re: Cannot use /dev/rmt/* tape devices with tar

Hi Karl

Before that check the staus of the tape drive

#mt -t /dev/rmt/5mn status
a warrior never quits
Kapil Jha
Honored Contributor

Re: Cannot use /dev/rmt/* tape devices with tar

see
forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1192187

this may help you.

BR,
Kapil
I am in this small bowl, I wane see the real world......

Re: Cannot use /dev/rmt/* tape devices with tar

I have checked the status of the drives with mt -f /dev/rmt/* status, and they show OK. I have checked permissions on the device files and the output from ioscan -C tape, and they are both OK.

I have also taken into account the st_san_safe kernel parameter. That has been set to 1 for the last 4 years, and we've never seen this before.

Since DataProtector can still use the drives (using the same device files I'm trying), the hardware, stape driver, and the device files are all working. But something is preventing tar, cpio, etc from using them.

MarkSyder
Honored Contributor

Re: Cannot use /dev/rmt/* tape devices with tar

You are trying to tar to a no-rewind device. Omit the n from the end of the device name.

Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing
MarkSyder
Honored Contributor

Re: Cannot use /dev/rmt/* tape devices with tar

Immediately after clicking submit, I noticed that you already knew that. But I still think it's worth a try.

Mark
The triumph of evil requires only that good men do nothing

Re: Cannot use /dev/rmt/* tape devices with tar

Sorry, I didn't make that clear. I have tried both rewind and no-rewind devices. They fail with the same error.

Re: Cannot use /dev/rmt/* tape devices with tar

Thanks all for your comments. Turns out we had a misbehaving tape drive that was causing the issue. I thought I had tested the tar, etc commands against more than one of the drives, but either I didn't or it magically recovered overnight. (I'm voting for "I forgot to test".)

FYI, it is the no-rewind devices that tar, etc are supposed to be used with when you have the st_san_safe parameter set.

Re: Cannot use /dev/rmt/* tape devices with tar

Solution found--bad tape drive.