Operating System - HP-UX
1753331 Members
5263 Online
108792 Solutions
New Discussion юеВ

Re: Changing device files

 
SOLVED
Go to solution
Ricardo Rocha
Valued Contributor

Changing device files

Hello guys

I'm moving two ReelTapes between to HPUX systems, ie, from an E25 to K100 (old stuff ah...). In order to the software works properly I need to insure the Tapes have the same device files as before. The SCSI ID's remained the same but since the HW path changed the device files changed also. Before I had the device files c1t3d0 and c1t5d0, now they're c4t3d0 and c4t5d0. I guess there is a way of changing the 4 to the desirable 1. Changing the software parameters is not an option.

Thank you very much

"there is this old man who spent so much of his life sleeping that he is able to keep awake for the rest of his years"
9 REPLIES 9
Steven E. Protter
Exalted Contributor
Solution

Re: Changing device files

three commands to look at

rmsf to remove the old drivers
insf -e to add the new drivers.

Once the old drivers are removed you can use the sam peripherals tape drive create drivers to build them again.

Unless these are external tape drives, sounds like you'll need to do this with the systems shut down.

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
Donald Kok
Respected Contributor

Re: Changing device files

Hi,
Since the c? is the hardware-bus, there is not a way to change this. (besides attachng it to a bus with the right c?.

What you can try, is to make a link (ln c1t5d0 c4t5d0) to the right name. Don't know if this works, though.
Good luck,
Donald
My systems are 100% Murphy Compliant. Guaranteed!!!
melvyn burnard
Honored Contributor

Re: Changing device files

Well what did you use on the old system?
You can check using ioscan -funCtape to see if the new system has the tape known by the same special file, such as /dev/rmt/0m
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Colin Topliss
Esteemed Contributor

Re: Changing device files

You can re-instance the hardware numbers - take a look at ioinit.

Basically you need to supply ioinit with a file that has the desired instance number contained in it:

To reassign an instance number to a device and class (specified in
infile) and reboot the system:

/sbin/ioinit -f infile -r

where infile contains the following:

56.52 scsi 2

56.52 is the h/w_path, scsi is the class_name, and 2 is the
instance_#.

- from the ioinit man page.
Nick Wickens
Respected Contributor

Re: Changing device files

Hi

If you really want to change the Instance number from "4" to "1" then you need to use the ioinit command with the -f option.

HOWEVER there are many implications to this (ie is the "1" instance already in use on that system ?) so you MUST do some further research into the ioinit command on this forum and the man pages.
Hats ? We don't need no stinkin' hats !!
Colin Topliss
Esteemed Contributor

Re: Changing device files

FYI,

ioinit will complain if the instance you're trying to assign is already in use.

What you need to remember is that adding hardware (such as other cards) that use a bus number higher than the one that has the devices attached to will cause the instancing to break (not in all cases, but I've hit this problem on a number of occasions). You'll have to re-instance the machine again (maybe more than once - first time to change the conlicting instance, then again to re-assign the instance to the devices you really want).

It is a bit of a pain (and not something I'm overly fond of doing).
Ricardo Rocha
Valued Contributor

Re: Changing device files


Ionit. That's it guys. I'll try it. Thank you.

Damm you're fast answering!!!!

Do I hear some points coming?
"there is this old man who spent so much of his life sleeping that he is able to keep awake for the rest of his years"
Jdamian
Respected Contributor

Re: Changing device files

I don't agree with Donald.

The 'c' value of a disk device or a tape device is the instance number of the card. For instance, supose your disk special file is /dev/dsk/c3t2d0.
You can run ioscan -kfnC ext_bus and see the instance number of the "SCSI C875 Ultra Wide Single-Ended" card (for example) is 3.

The method to change this instance number is ioinit command using '-f' option.

There is a good doc available (KBRC0004879) to change the device name , Basically these are the steps:

ioscan -f | grep -e INTERFACE | grep -v target | awk '{print $3, $1, $2 }' > infile

This creates a file infile.
Run shutdown or init to set the system in singler-user mode and run:

sbin/ioinit -f /infile -r

This will reconfigure kernel and reboot the box. ran
insf -e
Now ioscan will show disk instances same on both server


Some time ago I ran this procedure and worked 'fine' --
The only side-effect found was that major numbers for 'telm' driver changed and caused problems to login using telnet. I solved this removing /dev/telnetm and /dev/pts special files and recreating back again.
Michael Duthie
Trusted Contributor

Re: Changing device files

Ricardo,

Much easier to create a symbolic link.

ln -s c4t3d0 c1t3d0

Mike