System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

FREE PROCEDURE: Renumber disk devices on HP-UX 11.31 - including boot disks

 
SOLVED
Go to solution
VK2COT
Honored Contributor

FREE PROCEDURE: Renumber disk devices on HP-UX 11.31 - including boot disks

Hello,

Here is the procedure that some of you might
need one day. It worked well and I
thought it was worth sharing.

a) Scenario:

HP-UX 11.31 September 2008, with LVM boot
agile DSFs disk20 and disk28:

# setboot -v
Primary bootpath : 0/6/0/0/0/0/0/0/0/0.0x0.0x4000000000000000 (/dev/rdisk/disk20
)
HA Alternate bootpath : 0/6/0/0/0/0/1/0/0/0.0x0.0x4000000000000000 (/dev/rdisk/d
isk28)
Alternate bootpath : 0/6/0/0/0/0/1/0/0/0.0x0.0x4000000000000000 (/dev/rdisk/disk
28)

Autoboot is ON (enabled)
Hyperthreading : OFF
: OFF (next boot)

TEST CURRENT DEFAULT
---- ------- -------
all on on
SELFTESTS on on
early_cpu on on
late_cpu on on
FASTBOOT on on
Platform on on
Full_memory on on
Memory_init on on
IO_HW on on
Chipset on on


# lvlnboot -v
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/disk/disk20_p2 -- Boot Disk
/dev/disk/disk28_p2 -- Boot Disk
Boot: lvol1 on: /dev/disk/disk20_p2
/dev/disk/disk28_p2
Root: lvol3 on: /dev/disk/disk20_p2
/dev/disk/disk28_p2
Swap: lvol2 on: /dev/disk/disk20_p2
/dev/disk/disk28_p2
Dump: lvol2 on: /dev/disk/disk20_p2, 0

b) All disk devices on the server have instance
numbers from disk20 to disk36 (this is an
rx6600 with 16 internal disks).

The other rx6600 had disks with instance
numbers 10-to-17 and 20-to-27 (although
the disks were in identical slots as on
the first server).

c) Customer requirements: make two
rx6600 servers have identical disk device
instance numbers.

d) And here is the simplest procedure.

Step 1

Renumber disk devices, starting from 0:

# ioinit -rC disk


Step 2

After reboot...

# ioscan

# insf -e

# ioscan -fnNC disk
Class I H/W Path Driver S/W State H/W Type Description
===========================================================================
disk 16 0/0/2/1.0x0.0x10 UsbScsiAdaptor CLAIMED LUN_PATH USB SC
SI Stack Adaptor
disk 0 64000/0xfa00/0x1 esdisk CLAIMED DEVICE HP
LOGICAL VOLUME
/dev/disk/disk0 /dev/rdisk/disk0
/dev/disk/disk0_p1 /dev/rdisk/disk0_p1
/dev/disk/disk0_p2 /dev/rdisk/disk0_p2
/dev/disk/disk0_p3 /dev/rdisk/disk0_p3
/dev/disk/disk10_p1 /dev/rdisk/disk10_p1
/dev/disk/disk10_p2 /dev/rdisk/disk10_p2
/dev/disk/disk10_p3 /dev/rdisk/disk10_p3
disk 1 64000/0xfa00/0x2 esdisk CLAIMED DEVICE HP
LOGICAL VOLUME
/dev/disk/disk1 /dev/rdisk/disk1
disk 2 64000/0xfa00/0x3 esdisk CLAIMED DEVICE HP
LOGICAL VOLUME
/dev/disk/disk2 /dev/rdisk/disk2
disk 3 64000/0xfa00/0x4 esdisk CLAIMED DEVICE HP
LOGICAL VOLUME
/dev/disk/disk3 /dev/rdisk/disk3
disk 4 64000/0xfa00/0x5 esdisk CLAIMED DEVICE HP
LOGICAL VOLUME
/dev/disk/disk4 /dev/rdisk/disk4
disk 5 64000/0xfa00/0x6 esdisk CLAIMED DEVICE HP
LOGICAL VOLUME
/dev/disk/disk5 /dev/rdisk/disk5
disk 6 64000/0xfa00/0x7 esdisk CLAIMED DEVICE HP
LOGICAL VOLUME
/dev/disk/disk16 /dev/rdisk/disk16
/dev/disk/disk6 /dev/rdisk/disk6
disk 7 64000/0xfa00/0x8 esdisk CLAIMED DEVICE HP
LOGICAL VOLUME
/dev/disk/disk17 /dev/rdisk/disk17
/dev/disk/disk7 /dev/rdisk/disk7
disk 8 64000/0xfa00/0xa esdisk CLAIMED DEVICE HP
LOGICAL VOLUME
/dev/disk/disk20 /dev/rdisk/disk20
/dev/disk/disk20_p1 /dev/rdisk/disk20_p1
/dev/disk/disk20_p2 /dev/rdisk/disk20_p2
/dev/disk/disk20_p3 /dev/rdisk/disk20_p3
/dev/disk/disk8 /dev/rdisk/disk8
/dev/disk/disk8_p1 /dev/rdisk/disk8_p1
/dev/disk/disk8_p2 /dev/rdisk/disk8_p2
/dev/disk/disk8_p3 /dev/rdisk/disk8_p3
disk 9 64000/0xfa00/0xb esdisk CLAIMED DEVICE HP
LOGICAL VOLUME
/dev/disk/disk21 /dev/rdisk/disk21
/dev/disk/disk9 /dev/rdisk/disk9
disk 10 64000/0xfa00/0xc esdisk CLAIMED DEVICE HP
LOGICAL VOLUME
/dev/disk/disk10 /dev/rdisk/disk10
/dev/disk/disk22 /dev/rdisk/disk22
disk 11 64000/0xfa00/0xd esdisk CLAIMED DEVICE HP
LOGICAL VOLUME
/dev/disk/disk11 /dev/rdisk/disk11
/dev/disk/disk23 /dev/rdisk/disk23
disk 12 64000/0xfa00/0xe esdisk CLAIMED DEVICE HP
LOGICAL VOLUME
/dev/disk/disk12 /dev/rdisk/disk12
/dev/disk/disk24 /dev/rdisk/disk24
disk 13 64000/0xfa00/0xf esdisk CLAIMED DEVICE HP
LOGICAL VOLUME
/dev/disk/disk13 /dev/rdisk/disk13
/dev/disk/disk25 /dev/rdisk/disk25
disk 14 64000/0xfa00/0x10 esdisk CLAIMED DEVICE HP
LOGICAL VOLUME
/dev/disk/disk14 /dev/rdisk/disk14
/dev/disk/disk26 /dev/rdisk/disk26
disk 15 64000/0xfa00/0x11 esdisk CLAIMED DEVICE HP
LOGICAL VOLUME
/dev/disk/disk15 /dev/rdisk/disk15
/dev/disk/disk27 /dev/rdisk/disk27


Step 3

Since each device now had two instance numbers,
remove the old one (rmsf would work too):

# cd /dev/disk; rm disk2?* disk16* disk17* disk18* disk19* disk10_p?

# cd /dev/rdisk; rm disk2?* disk16* disk17* disk18* disk19* disk10_p?


Step 4

Check setboot. However no manual work was
needed (the change was automatic,
new boot disks were disk0 and disk8)):

# setboot -v
Primary bootpath : 0/6/0/0/0/0/0/0/0/0.0x0.0x4000000000000000 (/dev/rdisk/disk0)

HA Alternate bootpath : 0/6/0/0/0/0/1/0/0/0.0x0.0x4000000000000000 (/dev/rdisk/d
isk8)
Alternate bootpath : 0/6/0/0/0/0/1/0/0/0.0x0.0x4000000000000000 (/dev/rdisk/disk
8)

Autoboot is ON (enabled)
Hyperthreading : OFF
: OFF (next boot)

TEST CURRENT DEFAULT
---- ------- -------
all on on
SELFTESTS on on
early_cpu on on
late_cpu on on
FASTBOOT on on
Platform on on
Full_memory on on
Memory_init on on
IO_HW on on
Chipset on on


Step 5

Rebuild lvmtab.

# cd /etc

# mv lvmtab lvmtab-ORIG

# vgscan -a
Creating "/etc/lvmtab".
*** LVMTAB has been created successfully.
*** Do the following to resync the information on the disk.
*** #1. vgchange -a y
*** #2. lvlnboot -R

# vgchange -a y
Volume group "/dev/vg00" is already active on this system.
Volume group "/dev/vgwebT01" is already
active on this system.
Volume group "/dev/vgoraP00" is already active on this system.
...

# lvlnboot -R
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf

# lvlnboot -v
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/disk/disk0_p2 -- Boot Disk
/dev/disk/disk8_p2 -- Boot Disk
Boot: lvol1 on: /dev/disk/disk0_p2
/dev/disk/disk8_p2
Root: lvol3 on: /dev/disk/disk0_p2
/dev/disk/disk8_p2
Swap: lvol2 on: /dev/disk/disk0_p2
/dev/disk/disk8_p2
Dump: lvol2 on: /dev/disk/disk0_p2, 0


Step 6

Update bootconf:

# vi /stand/bootconf
l /dev/disk/disk0_p2
l /dev/disk/disk8_p2

That is all. So, all disk devices
changed their instance numbers, including
boot disks.

Cheers,

VK2COT

PS. I tried using "ioinit -f myioinit.txt -r"
but it was creating very unpredictable
errors for boot devices and I did not have
time to debug them further. Hence,
the procedure as above.
VK2COT - Dusan Baljevic
5 REPLIES
Solution

Re: FREE PROCEDURE: Renumber disk devices on HP-UX 11.31 - including boot disks

A word of caution...

I'm pretty sure this works on the 0809 (Sep 2008) 11.31 release only, as I think this was the version to introduce the AUTO_BOOT_MIGRATE feature into lvmrc (which allows LVM to detect when boot devices have changed and automatically update LVM metadata appropriately)

This is why you managed to do this without going to LVM maintenance mode to vgexport/vgimport your root VG. On 11.11, 11.23 and older versions of 11.31, I'm pretty sure you'd need that extra LVM maintenance mode step as well.

And of course you need to be careful as that ioinit -rC will renumber *all* devices, not just disk - so you might find that lan devices change as well - so be prepared to access through the console and update LAN settings in /etc/rc.config.d as well

HTH

Duncan

HTH

Duncan
VK2COT
Honored Contributor

Re: FREE PROCEDURE: Renumber disk devices on HP-UX 11.31 - including boot disks

Hello Duncan,

Yes, I was aware of this specific for
HP-UX 11.31 0809. I deliberately stated it
in the post :)

I renumbered only class "disk" and made sure
I did not touch the other devices:

# ioinit -rC disk

I am actually hopeful that this feature
will stay in newer releases. Very handy :)

Cheers,

VK2COT
VK2COT - Dusan Baljevic
Eric SAUBIGNAC
Honored Contributor

Re: FREE PROCEDURE: Renumber disk devices on HP-UX 11.31 - including boot disks

Bonjour,

I have this question in a corner of my mind for a while and many thanks for sharing your job.

What I understand in a first reading is that you make a total reset of disk instance numbers and let the kernel doing a new instance numbering. Did you made a test in a SAN environment ? I do wonder if you will get the same disk numbers ... For example suppose 2 interconnected rooms, 1 HP-UX box and one SAN storage array in each room. Not sure that the 2 boxes will get the same disk number ...

Ideally the question to answer is "how to force disk instance numbers in a one go". For example a new node comes in an existing cluster and client wants that the new node have same disk instance numbers than existing ones. And of course it is not possible to modify existing nodes.

Tipically "ioinit -r -f file" was the answer. More exactly what we did this way was forcing instance number of controlers.

But there is still a question. Assuming we are able to manage existing disks, what about new ones ? With HP-UX < 11iv3, once a path to a disk is bind to a controler number, new disks on the same path will have same controller. But in 11iv3, controler instance number has no role in disk naming.

Thanks again for sharing your job

Eric
VK2COT
Honored Contributor

Re: FREE PROCEDURE: Renumber disk devices on HP-UX 11.31 - including boot disks

Closing the thread. It was a FYI message
only :)

I plan to do more tests with ioinit on
HP-UX 11.31 with SANs in February (as long
as I get some LUNs as I was promised).

I will update the Forum when new
data becomes available.

Cheers,

Dusan
VK2COT - Dusan Baljevic

Re: FREE PROCEDURE: Renumber disk devices on HP-UX 11.31 - including boot disks

well I just learned something! I'd been thinking of "ioinit -c" (lower case c).

Just read the new man page for 11.31 and read about the "-C" option! Fantastic addition to this command. Sorry for doubting you!

Duncan

HTH

Duncan