Operating System - HP-UX
1833606 Members
3145 Online
110061 Solutions
New Discussion

Changing hardware path without changing device path ?

 
SOLVED
Go to solution
DECORSE Olivier
Occasional Advisor

Changing hardware path without changing device path ?

Hello,
i've got 2 D-280 box :
- A with ctrl in address HSC=3, disks 8/12.5 (/dev/dsk/c0t5d0) and 8/12.8 (c0t8d0)
- B with ctrl in address HSC=2, disks 8/8.5 (/dev/dsk/c0t5d0) and 8/8.8 (c0t8d0)
I'm trying to change A box, from her configuration to a configuration like B (8/8...).
So i've made the vgexport, change ctrl address, mkdir /dev/vg00, mknod group, and ... vgimport failed : the system don't want to use c0t5d0 and c0t8d0 : i have to make a insf -e, then it creates c4t5d0 and c4t8d0, and vgimport works !! But i don't want to use c4t5d0 and c0t8d0 !!! I want to change hardware path (8/12 to 8/8), WITHOUT CHANGING device path (c0t5d0 and c0t8d0).
Does anyone knows, how it is possible !?
Thank's in advance.
Olivier.
3 REPLIES 3
Wodisch
Honored Contributor

Re: Changing hardware path without changing device path ?

Hi,

your problem is that HPUX is generating "instance" numbers chronologically, not due to slot numbers.
If your have the same amount of SCSI controllers in both stations, and in the same slots (as it seems according to your description) then your might have to reinstall your operating system (since you want to use instance "0" and that is usually used for the SCSI controller connected to your root&boot disk)...

The HP support might have a tool to edit your "/stand/ioconfig" (and "/etc/ioconfig"), but after using it you will have to (re-)issue "lvlnboot" with the options "-b", "-r", "-s", and "-d" (in that order), or your system won't boot any more :-(

Sorry,
Wodisc
U.SivaKumar_2
Honored Contributor

Re: Changing hardware path without changing device path ?

hi,
it is not possible to change the hardware path
without change in device file path. kernel will
not know about the device .

you can connect the disk to new bus . put on the system . it will create a new device file with new h/w path. create the group file under a vg directory (eg. /dev/vgnew ) with same group file number as of old group file in old path.

Then use vgimport command with the new device file ( which points to new h/w path) of the
hard disk. this will import all vg information
from your disk to the system.

things will be intact in the disk. you can access the disk as usual.

regards,
U.SivaKumar


Innovations are made when conventions are broken
Solution

Re: Changing hardware path without changing device path ?

(I am assuming these disks are not part of your root VG here, and that you haven't vgimported at the new address)

The problem is that the card 8/12 is still recorded as instance 0 in the /etc/ioconfig file ( this is correct behaviour - for all HPUX knows, you might have temporarily removed the card, and then plug it back in)

If you *really want* the two machines to match, you can do fix this with careful use of the ioinit command... first step is to check that the disk device files c0t5d0 and c0t8d0 don't point to any *real* hardware now - you can check this with lssf:

lssf /dev/dsk/c0t[58]d0

This should tell you that the devices are not pointing to anything i.e. :

sdisk card instance 0 SCSI target 5 SCSI LUN 0 section 0 at address ??? /dev/dsk/c0t5d0
sdisk card instance 0 SCSI target 8 SCSI LUN 0 section 0 at address ??? /dev/dsk/c0t8d0

Note the '???' tells us that these device files don't point at anything - if this isn't the case, don't proceed any further!

At this point get a backup of your system... I mean create an ignite tecovery tape, and do a 'vgcfgbackup -f /tmp/vgXX vgXX' and 'vgexport -p -m /tmp/vgXX.map vgXX' of *all* your volume groups. Also take a copy of /etc/ioconfig.

Now remove the old device files from /dev/dsk and /dev/rdsk:

rmsf /dev/*dsk/c0t[58]d0

Now run 'ioscan -funC ext_bus' - you will see all the IO cards listed on your host... look at the 'I' column - this tells you the card instance number (from which the cX part of the disk device file comes) note that the instance number for the card at 8/8 is 4 - also note that nothing appears to be using card instance 0. Unfortunately we know that /etc/ioconfig still thinks that 8/12 is at instance 0, so we must move it before moving 8/8. We do this using ioinit... Create a file in / called ioinit.1 with the following contents:

8/12 ext_bus X

where X is an instance number that is not used (you should set this to something reasonably above your current highest instance number... e.g. if you machine has 8 instances of ext_bus set this to 20)

Now create another file called ioinit.2 with the following contents:

8/8 ext_bus 0

Now execute the following command:

ioinit -f /ioinit.1

ioinit isn't very helpful, so the chances are you won't get any positive reponse back from it - I always check the return code though (echo $?)

Now reboot your system - you may as well interrupt it during boot and go to single user mode, as there's another reboot to come.

Once your back at the root prompt, delete the device files for the disks at their current location:

rmsf /dev/*dsk/c4t[58]d0

Now apply the second ioinit file to move the card instance from 4 to 0:

ioinit -f /ioinit.2

And reboot again...

You should now see the controller 8/8 having instance number 0, and so the disks on the controller will have device file names c0t5d0 and c0t8d0 - yoo may need to run insf -e to have them created.

Caveat: This is the procedure as I remember it... you might want to wait for affirmation from some other forumers before proceeding!

Cheers

Duncan

I am an HPE Employee
Accept or Kudo