LVM and VxVM

Re: How to get disk-array working on a different server using LVM

 
SOLVED
Go to solution
Yunwon
New Member

How to get disk-array working on a different server using LVM

Hi all,

we have a HP-UX PA-RISC 11.11 Oracle database production server (rp7405 with DS2100 Storage Extension and a Storage Works Virtual Array VA 7100 10x36 GB Fibre Channel).
Now management bought a second machine which has quite the same specification (but no storage extensions or array attached) to have a backup system in case the first one goes up in fire. The plan is to simply switch the storage array (where are all the database data) to the new machine, adjust IP-adresses, restart the databases and applications, and be online again in a short time.

The second server is setup quite similar to the first one regarding root disks (mirrored), Oracle software and so on.

As I am not experienced in manual LVM stuff (I love SAM :-))now the question is: What would be the detailed steps to get the array running on the second machine? We are using LVM and configuration information of the first machine is available (/etc/lvmconf) by using make_tape_recovery.

Thank you.
Yunwon
5 REPLIES 5
Pete Randall
Outstanding Contributor
Solution

Re: How to get disk-array working on a different server using LVM

Do a vgexport (in preview mode: -p) of all the Volume Groups in the array. Use the -s option and the -m option to create a map file. Transfer the map file to the other server. Also prepare the second server with the VG device files:

mkdir /dev/vg??
mknod /dev/vg??/group c 64 0x??0000

In case of the first server's failure, simply run vgimport: vgimport -s -m /tmp/vg??.map /dev/vg??.


Pete


Pete

Pete
Carlos M.J.
Frequent Advisor

Re: How to get disk-array working on a different server using LVM


You need to ensure your disks can be viewed on both nodes (use ioscan -fnkCdisk). To view VG on a passive node do this:

Active node:
vgexport -p -v -s -m vgora.map /dev/vgora
(PLEASE USE ALWAYS PREVIEW MODE TO AVOID CONFIGURATION LOSS)

Pasive node:
rcp active_node:vgora.map vgora.map
mkdir /dev/vgora
mknod /dev/vgora/group c 64 0x0?0000
(0x0?0000 where "?" must be a number between 0 and kernel parameter "maxvgs")
vgimport -v -s -m vgora.map /dev/vgora
vgchange -a r /dev/vgora
vgcfgbackup /dev/vgora
vgchange -a n /dev/vgora

With this steps you have your VG configuration activated on both nodes, in case you need to start the VG on passive node do:

Active node:
vgchange -a n /dev/vgora

Passive node:
vgchange -a y /dev/vgora

Please remember to create mount points and consider disable automatic VG activation en /etc/lvmrc.

Best regards.
Yunwon
New Member

Re: How to get disk-array working on a different server using LVM

I am wondering how the second system associates the disk device files of the array with the volume group, as the mapfile does not contain this information.

Maybe there is a misunderstanding: The disk array will NOT be connected to both machines at the same time.
Don't I have to use in this case: vgimport -v -m /tmp/vg??.map /dev/vg?? /dev/dsk/c8t0d0 ?

Yunwon
Carlos M.J.
Frequent Advisor

Re: How to get disk-array working on a different server using LVM


ooops!

You need to connect your disk array to the other machine to vgimport it. So you need to stop primary machine, unplug you cable and connect to the second machine.

Of course, you can plug, ioscan, and vgimport it in case of failure, but it's advisable to test it before, so (if you can do it) stop it and test this maneuver, before it will be too late.

good luck!
John Guster
Trusted Contributor

Re: How to get disk-array working on a different server using LVM

Your management has a point. As SA, you need create map files for those volume groups and transfer them to the other system whenever the volume groups are updated. You can survive.Cheers!