Operating System - HP-UX
1752866 Members
4025 Online
108791 Solutions
New Discussion юеВ

Re: Abount instance number

 
study unix
Regular Advisor

Abount instance number

Hi Master,
I want to reconfigure specific instance number for one disk, but now, it is found this specific instance number hsa been occupied ,
how to remove it from current device then to assign it to one disk?
Thanks!
9 REPLIES 9
njia_1
Trusted Contributor

Re: Abount instance number

Hi there

this is an easy task but reboot is requried

first you need to create a new mapping file from the existing system

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

then open this infile, remove the entries u do not want to change

following is an example, if this is the infile

0/0/2/1.0.16 ext_bus 0
0/1/1/0.0.0 ext_bus 4
0/4/1/0/4/0 ext_bus 1
0/4/1/0/4/1 ext_bus 2

you want to change 0/0/2/1.0.16 instance number to 4 then you remove the last two entries, and modify the the file like following, because 4 is already been used you will have to change instance number of device 0/1/1/0.0.0 so instance number 4 for ext_bus can be assigned to another device.

0/0/2/1.0.16 ext_bus 4
0/1/1/0.0.0 ext_bus 0

Once this is done copy this infile to /, u can't leave it on any other systesm, has to be /

then u do the following

mv /etc/ioconfig /etc/ioconfig.save
mv /stand/ioconfig /etc/ioconfig.save
reboot

because both ioconfig files are missing, the boot up process will stop and ask u to recreate ioconfig from kernel, you will see this from system console, so if you are doing this remotly, make sure you have console access.

first create the file
/sbin/ioinit -c

the apply the infile we created before
/sbin/ioinit -f /infile -r

server will reboot to assign the new instance number.

try it, you won't break the server, worst case, you just rebooted the server few times.
study unix
Regular Advisor

Re: Abount instance number

Hi Njia,
Thanks for your full response,

-the apply the infile we created before
/sbin/ioinit -f /infile -r

I do not understand when to run command /sbin/ioinit -f /infile -r ? after reboot?

-if it is supported to revise instant number in OS 11.11,11.23, 11.31 or only in 11.31?

Thanks again!
Kapil Jha
Honored Contributor

Re: Abount instance number

why you want to reconfigure a speific thing to some thing??

which HPUX version?

BR,
Kapil+
I am in this small bowl, I wane see the real world......
Deeos
Regular Advisor

Re: Abount instance number

Hi Eyeshot,


this will do like that

#cd /

#ioscan -funC disk

For example

disk 34 0/4/1/0.0.0.3.0 sdisk CLAIMED DEVICE HP DG146ABAB4
/dev/dsk/c9t3d0 /dev/rdsk/c9t3d0


where c9 is instance number of disk



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



then open this infile, remove the entries u do not want to change

following is an example, if this is the infile


0/4/1/0.0.0 ext_bus 9
0/4/1/0.0.0.2 target 2
0/4/1/0.0.0.2.0 disk 33


you want to change 0/4/1/0.0.0 instance number to 20 then you remove 9 to 20, and save this file like following, because 9 no longer available and you will have to change instance number of device 0/4/1/0.0.0 so instance number 9 for ext_bus can be assigned to another device.

0/4/1/0.0.0 ext_bus 20
0/4/1/0.0.0.2 target 2
0/4/1/0.0.0.2.0 disk 33



then u do the following

mv /etc/ioconfig /etc/ioconfig.save
mv /stand/ioconfig /etc/ioconfig.save
for reboot
#shutdown -ry now

because both ioconfig files are missing, the boot up process will stop and ask u to recreate ioconfig from kernel, you will see this from system console, so if you are doing this remotly, make sure you have console access.

first create the file

#/sbin/ioinit -c Based on current hardware it creates ioconfig file


the apply new setting as per given by you, use infile we created before with following command

#/sbin/ioinit -f /infile -r

server will reboot to assign the new instance number.

try it, you won't break the server, worst case, you just rebooted the server few times.

After the reboot, when you log in server and put following command

#ioscan -funC disk


you will find change instance number of disk

like that

disk 34 0/4/1/0.0.0.3.0 sdisk CLAIMED DEVICE HP DG146ABAB4
/dev/dsk/c20t3d0 /dev/rdsk/c20t3d0



Regards
Deeos
Deepak
njia_1
Trusted Contributor

Re: Abount instance number

Hi eyeshot

after rename both /etc/ioconfig and /stand/ioconfig file you reboot the server

then it will prompt you to run ioinit -c to create those two files, and you run ioinit -f /infile -r after

so it looks like

/sbin/ioinit -c
/sbin/ioinit -f /infile -r

server reboots and you shall have the instance number you wanted.

thanks
njia_1
Trusted Contributor

Re: Abount instance number

Hi Eyeshot

forgot to say, this is not related to any version of HPUX,

I have done this on HPUX v1, v2 and v3, no difference at all.


thanks
study unix
Regular Advisor

Re: Abount instance number

Hi Nijia,
But, 11iv3 uses persistant device file is different from legacy device file of 11iv2 or 11iv1, so I consider if I operate on 11iv2 will come out of some issue ?
Torsten.
Acclaimed Contributor

Re: Abount instance number

Late reply, but have a look at this page:

https://h20392.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=BaseLVM



The following new features were introduced in LVM B.11.31.1009:

* This release supports the use of cluster device special files (cDSFs). This feature is effective only in a cluster environment and requires that you install HP Serviceguard A.11.20 and patch it to support cluster-wide device special files.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Michael Leu
Honored Contributor

Re: Abount instance number

FYI: with 11.31 you can also move the instance number without a reboot on disk devices, see 'ioscan -P is_inst_replaceable'.