Operating System - HP-UX
1833570 Members
3673 Online
110061 Solutions
New Discussion

Re: Device file naming and how to change it.

 
SOLVED
Go to solution
Gene Laoyan
Super Advisor

Device file naming and how to change it.

I have 2 questions, one is just for information the other is a "How do I..."

First, we have an 8640 and split it into 4 nPars. There is 100% symetry accross all nPars. This means all cards are plugged into the same PCI-X slots, same ammt of RAM and CPU etc...
When our NetApps guys present to us a LUN, we can see it on all nPars. The theory is, if all nPars are identical, they should all see the LUN with the same device file name, right? OK, so that's what we tried. Unfortuneately that is not true. The first two nPars see the LUN and gets the devicefile name: "/dev/rdsk/c7t0d1" and the third and fourth nPars get the devicefilename: "/dev/rdsk/c6t0d1".
Why are they different? This is boggling my mind.

My second questions is, now that we have the LUN and it has two different devicefile names, how can I change the devicefile name on the other two nPars, 3 & 4, to have the same as 1 & 2?

Is it bad practice or good? I figure If I can track only one devicefile accross the board it would make administration of the LUN's easier.

Thanks
2 REPLIES 2
Tim Nelson
Honored Contributor
Solution

Re: Device file naming and how to change it.

Check out the ioinit man page.

You can assign instance numbers to HW addresses.

This should lead you to what you are looking for.

The only issue will be that adding additional HW may revert the new hardware to the other or different instance you are looking for requiring a mod to the ioinit file and another reboot.

May not be worth the trouble.
Bill Hassell
Honored Contributor

Re: Device file naming and how to change it.

Devicefile3s are automatically created by insf as the kernel boots up and the names are assigned in the order in which the hardware is discovered. The first discovered I/O card will be called instance 0 (the c0 part of the name) followed by the device address on the card's bus (SCSI address for example) and the d part is the LUN. Now the nPars are not identical because they did not discover the same hardware in exactly the same order, hence the naming differences.

So you have three choices:

1. just rename all the device files to whatever you want. You could call them something like /dev/dsk/lun26 if you want. This assumes you have not created and volume groups on the LUNs.

2. You can manipulate the ioconfig file using ioinit. Normally, this is quite dangerous because a mistake can mess up a lot of hardware definitions.

3. Or (my favorite) just use rmsf to remove all the old device filenames (again assuming no volume groups have been created) and then use insf with the -I and -H options to create the device files individually so the nPars match. DO NOT use insf -e since this will just recreate the all device files in the same way as a reboot.


Bill Hassell, sysadmin