Operating System - HP-UX
1847906 Members
4327 Online
104021 Solutions
New Discussion

Device files renumbered! Help!

 
SOLVED
Go to solution
Tim Medford
Valued Contributor

Device files renumbered! Help!

We are in the process of hooking up a new rp5470 server to a SAN via a couple 2gb fibre channel cards.

I don't know who did what (while I was on vacation), but apparently someone has rearranged some cables on the switch which plug into the unix server.

My hardware addresses now have an extra number in them, and all the device files that used to be called /dev/dsk/c4t0d0 -> c4t0d3 are all renamed to c14t0d0 -> c14t0d3.

Is there any way out of this mess?? I did not have any data on the logical volumes yet, and I have all the scripts I used to create them. Can I simply delete lvmtab and start over?

Thanks in advance,
Tim
4 REPLIES 4
Sridhar Bhaskarla
Honored Contributor
Solution

Re: Device files renumbered! Help!

Tim,

You are safe anyway as you do not have any data on the lvols. :-)

You do not need to worry. Export all the volume groups and generate map files using -f option. Then import them back using -f .

Say vg01 is one of your volume groups.

#vgexport -p -s -m /tmp/vg01.s.map vg01
#vgexport -v -f /tmp/vg01.disk -m /tmp/vg01.map vg01

edit vg01.disk and change c4 to c14 globally (:%s/c4t/c14t/g)

Create the directory, group file and import it back.

#mkdir /dev/vg01
#mknod /dev/vg01/group c 64 0x010000
#vgimport -v -m /tmp/vg01.map -f /tmp/vg01.disk vg01
#vgchange -a y

If this doesn't work, then use the map file that was generated using -s option.

#vgimport -s -m /tmp/vg01.s.map vg01

In the first step, if you are not able to export the volume groups, then edit /etc/lvmrc make AUTO_VG_ACTIVATE to 0 and add vg00 to custom_vg_activate function and reboot the box. Once the box comes up, you can export the volume groups.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Rammig Claus
Frequent Advisor

Re: Device files renumbered! Help!

Hi Tim,

you can reassign the instanz with the command ioinit -r -f where the infile should be as following:

h/w-path class_name instance_number

8/0/6/0/0.3.30.0.0 ext_bus 14
....

Look at the manpage of ioinit.

Best regards ...
Claus
No risc no fun
Bernhard Mueller
Honored Contributor

Re: Device files renumbered! Help!

Tim,

I made a similar experience where the hw adress was suddenly missing one number.

The issue was that on the storage array controllers (VA7400) someone must have changed the fibre channel mode from loop to fabric without resetting the array.

Everything worked fine until next time the array was reset. Then hw-path changed, new disk instances occured, no chance to recover via LVM commands. Reverting the change on the VA solved the problem (this was a production system...). Interestingly the Windows boxes just did not care and had no problem anytime.

Regards
Bernhard
Eugeny Brychkov
Honored Contributor

Re: Device files renumbered! Help!

The best practice is to have everything documented: VA settings (armdsp -a output), switch settings (supportshow for brocade), FC HBA settings (driver versions, tdutil output), librarys' settings (HP LTT support tickets).
If, for some reason, hardware address will change (switch domain id, switch's port, addressing mode, etc) then using new and old outputs it'll be easy to track change and undo it
Eugeny