Operating System - HP-UX
1833764 Members
2357 Online
110063 Solutions
New Discussion

How to make tape drive the default tape drive?

 
SOLVED
Go to solution
Joshua Goi
Frequent Advisor

How to make tape drive the default tape drive?

Hi,

I'm a newbie so don't mind the simple question. I just replaced my tape drive and I did a tar tv command but the system is telling me 'cannot open /dev/rmt/0m'. I went into the /dev/rmt directory and I found a new set of device files that goes like 1m, 1mn etc. I did a tar tvf /dev/rmt/1m and I'm able to read the contents of the tape.

My question is how do make it such that the 0m, 0mn series of device files are associated with my tape? That is, make my tape drive the default tape drive? Thanks!
6 REPLIES 6
Pete Randall
Outstanding Contributor
Solution

Re: How to make tape drive the default tape drive?

Joshua,

You need to make the new tape /dev/rmt/0m is all. Use rmsf to get rid of the existing /dev/rmt/0m device files (all of them). Then follow these instructions to create the new ones:

1. Use "ioscan" to find out what the current device files look like and what th
e instance number is:
ioscan -kfnCtape


2. Use "mksf" to create each of the four types of device files:

/sbin/mksf -d stape -I 12 -a -b BEST rmt/12m
/sbin/mksf -d stape -I 12 -u -b BEST rmt/12mb
/sbin/mksf -d stape -I 12 -a -n -b BEST rmt/12mn
/sbin/mksf -d stape -I 12 -u -n -b BEST rmt/12mnb


3. Use "ll" to compare your newly created device files with those created by the
system. Major and minor numbers should match between corresponding entries (205
0x061000 for both 12m and the equivalent c6t1d0BEST):

ll /dev/rmt |more

crw-rw-rw 1 bin bin 205 0x061000 Mar 17 08:40 12m
.
.
.
crw-rw-rw 1 bin bin 205 0x061000 Mar 17 08:40 c6t1d0BEST
.
.
.



4. repeat the ioscan to double check that your new device files are associated w
ith the correct tape drive:

ioscan -kfnCtape



I was using 12m in the example but you can use anything you want.




When you're done, again use rmsf to get rid of the /dev/rmt/1m files.


Pete

Pete
Helen French
Honored Contributor

Re: How to make tape drive the default tape drive?

Check the SCSI ID of your new tape drive and make it same as that of the old drive. Normally the commands like tar, fbackup and all will go for the default drive /dev/rmt/0mn. I think your old drive had a SCSI ID of "0" and the new one has ID "1". Change it back to "0" and try again.
Life is a promise, fulfill it!
Todd McDaniel_1
Honored Contributor

Re: How to make tape drive the default tape drive?

Josh,

Im pretty sure if you go into Sam--Peripherals--Tape drives...

You should remove both tape devices and then run insf -e again... it should recreate it with 0mn as you prefer.

If you had removed 0mn before you rebooted it would have reassigned that to the new drive, but since it was already defined, you got a new tape device number
Unix, the other white meat.
Steven E. Protter
Exalted Contributor

Re: How to make tape drive the default tape drive?


For some reason your system stopped recognized /dev/rmt/0m or it was removed, or the system thought the id changed.

Its difficult to get it to recognize again, but here is the procedure:

I had an old itrc software case with a complete solution.

As I remember

mv /etc/ioconfig /root # whereever

boot the box at the console

ioinit -c when it comes up to a prompt saying has no i/o

I will post the document link once itrc decides to cough it up.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Steven E. Protter
Exalted Contributor

Re: How to make tape drive the default tape drive?

My procedure requires a backup prior to trying it. make_tape_recovery

it also probably needs an insf -e

I like Petes better, though it wasn't available when i started the first post.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Joshua Goi
Frequent Advisor

Re: How to make tape drive the default tape drive?

Thanks guys. You guys are really efficient. I tried Pete's method and everything worked. Thanks again!