Operating System - HP-UX
1834571 Members
3625 Online
110069 Solutions
New Discussion

Why there is huge gap in instance number in ioscan?

 
SOLVED
Go to solution
zhaogui
Super Advisor

Why there is huge gap in instance number in ioscan?

Recently I downgraded a L-class server from HP-UX11i to HP-UX11 using Ignite/UX recovery tape for another server. After ioscan, I found there is a huge gap in instance number, why it is not continunuous?
Thanks,
#ioscan -k -fn
.....
ba 1 0/1 lba CLAIMED BUS_NEXUS Local PCI Bus Adapter (782)
ba 2 0/2 lba CLAIMED BUS_NEXUS Local PCI Bus Adapter (782)
ba 3 0/3 lba CLAIMED BUS_NEXUS Local PCI Bus Adapter (782)
ba 4 0/4 lba CLAIMED BUS_NEXUS Local PCI Bus Adapter (782)
ba 5 0/5 lba CLAIMED BUS_NEXUS Local PCI Bus Adapter (782)
ba 6 0/8 lba CLAIMED BUS_NEXUS Local PCI Bus Adapter (782)
fc 2 0/8/0/0 td CLAIMED INTERFACE HP Tachyon XL2 Fibre Channel Mass Storage Adapter
/dev/td2
fcp 4 0/8/0/0.1 fcp CLAIMED INTERFACE FCP Domain
ext_bus 18 0/8/0/0.1.16.0.0 fcparray CLAIMED INTERFACE FCP Array Interface
target 10 0/8/0/0.1.16.0.0.0 tgt CLAIMED DEVICE
disk 677 0/8/0/0.1.16.0.0.0.0 sdisk CLAIMED DEVICE HP A6189A
/dev/dsk/c18t0d0 /dev/rdsk/c18t0d0
disk 678 0/8/0/0.1.16.0.0.0.1 sdisk CLAIMED DEVICE HP A6189A
/dev/dsk/c18t0d1 /dev/rdsk/c18t0d1
disk 679 0/8/0/0.1.16.0.0.0.2 sdisk CLAIMED DEVICE HP A6189A
/dev/dsk/c18t0d2 /dev/rdsk/c18t0d2
disk 680 0/8/0/0.1.16.0.0.0.3 sdisk CLAIMED DEVICE HP A6189A
.....


The VA disk starting from 677 instead of 19 or 20, why?
disk 677 0/8/0/0.1.16.0.0.0.0 sdisk CLAIMED DEVICE HP A6189A
8 REPLIES 8
Bill McNAMARA_1
Honored Contributor

Re: Why there is huge gap in instance number in ioscan?

It's becuase the kernel does not recognise the same h/w paths and assigns new instances for the hardware it discovers.

The kernel instances always increase, and the only way to reinitialise is to cold install and or regen the maps using ioinit.

I'll attach a doc on this if you like.

Later,
Bill
It works for me (tm)
Animesh Chakraborty
Honored Contributor

Re: Why there is huge gap in instance number in ioscan?

----------------------------------------------
Changing Instance Number (HP-UX 10.x/11.x)
==========================================
o Build yourself the "infile" from the extisting configuration.

# ioscan -kf|grep -e INTERFACE -e DEVICE|awk '{printf
"%s %s %s\n",$3,$1,$2}'>infile

o The "infile" should look something like this :-

......
0/0/2/0 ext_bus 2
0/0/2/0.2 target 3
0/0/2/0.2.0 disk 1
0/0/2/0.7 target 4
0/0/2/0.7.0 ctl 2
0/0/2/1 ext_bus 3
0/0/2/1.2 target 5
0/0/2/1.2.0 disk 2
0/0/2/1.7 target 6
0/0/2/1.7.0 ctl 3
0/4/0/0 ext_bus 4
0/4/0/0.0 target 7
0/4/0/0.0.0 disk 3
0/4/0/0.0.1 disk 6
......

o Now edit "ext_bus" line and change the instance number to the
one you wanted. Be careful not to duplicat the instance numbers
or leave anything out. Move the "infile" to root directory.

o Test the file :-

# ioinit -f infile 2>&1|more

==> Look for errors with any of the changed lines. If no diagnostic
message is displayed for that line then it is good. All other
lines that do not change will say something like ..

ioinit: Input identical to kernel, line ignored
Input line 1: 0/0/2/0 ext_bus 0

o Rename /etc/ioconfig and /stand/ioconfig with extension say ".save"

o Reboot the system. It will come up to ioinitrc and give this message:-

/sbin/ioinitrc /etc/ioconfig missing. Restore it from backup or
invoke /sbin/ioinit -c to recreate it from kernel.
(in ioinitrc) #

o Run this :-

(in ioinitrc) # /sbin/ioinit -f /infile -r
(in ioinitrc) # ^d

o You should get back all your instance numbers after system reboots.



Did you take a backup?
Bill McNAMARA_1
Honored Contributor

Re: Why there is huge gap in instance number in ioscan?

See Duncan Edmonstones reference in the link:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x467e107d277ad611abdb0090277a778c,00.html

It works for me (tm)
Animesh Chakraborty
Honored Contributor

Re: Why there is huge gap in instance number in ioscan?

A huge gap also found here!!

"This member has assigned points to 45 of 315 responses"
Did you take a backup?
zhaogui
Super Advisor

Re: Why there is huge gap in instance number in ioscan?

If I have already run vgimport and all Oracle database is up, can I still run this ioinit to change these instance number as well as disk device name automatically? For example, initially I ran vgimport -s -m mapfile and /etc/lvmtab is updated with c25txxdyy, so when I ran this ioinit, should I do these ioscan, insf -e and vgimport all over again?

Thanks,

zhaogui
Super Advisor

Re: Why there is huge gap in instance number in ioscan?

will ioinit change my disk device file name and /etc/lvmtab? I hope it can otherwise my spredsheet for File system layout must be updated again.
Bill Hassell
Honored Contributor
Solution

Re: Why there is huge gap in instance number in ioscan?

Depending on what you change, this could potentially affect many different device files. I would view ioinit changes as very intrusive and yes, if the instance numbers change, then the device files that point to the old instance numbers will no long er be valid and therefore, the lvols and VGs would have to be rebuilt.

As a note, this highly intrusive series of steps is only affecting a cosmetic feature of the system. It's nice to have all the instance numbers in order but for a production system, the downtime (and the risk due to spelling errors) may not be worth the effort.


Bill Hassell, sysadmin
Anonymous
Not applicable

Re: Why there is huge gap in instance number in ioscan?

as I don't see this mentioned above:
What is an instance?

Simple answer: a device of a certain class.
Classes are eg disk, ext_bus, ...
To see the instances of a class you may use ioscan's -C option, eg

ioscan -fkCdisk
(so the instance numbers for class "ext_bus" are independent of class "disk" for example)

What is a instance number?

Each device of a class gets a number- this is just increasing with each new device in this class. This is stored in ioconfig (one copy in /stand, another in /etc). If a device is removed for whatever reason we still keep this info in ioconfig and won't assign the same instance number again (well, might be back again one day;-)

However, there is rarely the need to change sth that deep down as this- as said before- is highly intrusive and may screw up a lot.

take care, Tom.