Operating System - HP-UX
1834935 Members
2148 Online
110071 Solutions
New Discussion

Need to change tape device files

 
Reindl
New Member

Need to change tape device files

We have an HP Jukebox with two DLT4000 drives. Currently, drive 1 is addressed by /dev/rmt/2m etc., and drive 2 by /dev/rmt/1m etc.

This is extremely annoying and causes both communications problems between staff members and recently, an accident whereby a system backup was overwritten.

So, I want to swap the device files over, such that I can run insf in the future without a problem. My initial idea is to change the SCSI address of each drive, remove the device files, then run insf.

Perhaps there is a more straightforward way?

Thanks in advance.

David.Poyner@ImprovedSoftware.com
4 REPLIES 4
John Palmer
Honored Contributor

Re: Need to change tape device files

David,

If you do a ll -i /dev/rmt

you will find that files with names 0m,0mn etc are actually links to the equivalent cxtxdxbest etc equivalents.

You will have no problem just removing 0m* or 1m* or whatever and then relinking them to the appropriate cxtxdxbest...

Regards,
John
Stefan Stechemesser
Honored Contributor

Re: Need to change tape device files

The simplest way would be to rename the device files, but I think this is not what you wanted.
insf uses the Instance Numbers (Column "I" in ioscan -f) of the drives to determine the default names of the devicefiles. If you want to swap the default names of the drives there are two ways:

1.) If the DLT drives are connected on seperate SCSI busses, swap the cables and SCSI Adresses.
If they are on the same bus swap only the SCSI Adresses of the drives. You do not need to reconfigure the devicefiles after that.

2.) The other way is to swap the Instance Numbers of the drives, but this is a complicated procedure with calling ioinit and moving /sbin/ioinitrc and /etc/ioconfig
which may cause corruption and should be done by software specialists in the HP response center.
Robin Conklin
New Member

Re: Need to change tape device files

You may be able to change the scsi target ID for each drive. I know HP has different types of DLT 4000 juke box units. On mine I just hit the next button until the display says ADMIN -> enter (password by default is all 0s then next until it says SCSI IDs -> enter -> next till it says SET IDs -> enter and the just swap the IDs. If Drive 1 is ID 5 and Drive 2 is ID 4 then make 1 ID 4 and 2 ID 5. You will then need to change the Drive index for whatever software you are using.

This should work as long as they are using the same SCSI cable.

Good Luck!
Patrick Wessel
Honored Contributor

Re: Need to change tape device files

The devicefiles are related to the instance numbers. If you want to change the name of your device files, you have to change the instance numbers in the /sbin/ioconfig
This isn't pretty easy and can leave your system in an unbootable state (reliable backup required). But if you really want to do it try the following:


1. ioscan -kf | grep -e INTERFACE -e DEVICE |
grep -v target |
awk '{printf "%s %s %sn",$3,$1,$2}' > infile

2. vi infile

3. mv infile /stand/infile

4. mv /stand/ioconfig /stand/ioconfig.sav
mv /etc/ioconfig /etc/ioconfig.sav

5. shutdown -ry 0

6. interrupt the boot process, boot pri, interact with ISL.

7. ISL> hpux -is

8. cd /stand
/sbin/ioinit -c
/sbin/ioinit -f infile

9. reboot
There is no good troubleshooting with bad data