1752781 Members
5741 Online
108789 Solutions
New Discussion юеВ

Re: HPVM PV MOVE

 
SOLVED
Go to solution
Misbah Elalami
Advisor

HPVM PV MOVE

Hiya Folks -

I need to do a SAN to SAN migration of some disks that belong to an hpux b.11.23 machine containing two virtual machines.

Unfortunately since the logical lvols I am trying to move are striped - I am not able to use pvmove.

I have attached some information and an indepth description of the problem I am facing ...

IF you need anymore info to help me - I am happy to provide it... thanks for any help ...
17 REPLIES 17
Dave Johnson_1
Super Advisor

Re: HPVM PV MOVE

There was no attached information. Since the LUNs are striped, your only options are either cp/mv/cpio or backup and restore. I am facing the same problem when we replace our SAN array with new hardware.
Misbah Elalami
Advisor

Re: HPVM PV MOVE

Sorry re-attaching again .... not sure why it did not attach ...

If I just move and copy - what steps do I need to take for LVM configuration
Dave Johnson_1
Super Advisor

Re: HPVM PV MOVE

Instead of adding the new LUNs to the existing VGs, I plan to create new VGs, lvols, and file systems, them shutdown the application and copy the files/directories. Once that is moved, unmount both the old and new lvols, then mount the new lvols using the mount points form the original lvols. Now you should be able to startup your app(s) and it will not know it was moved.
If you really want to keep your VG names, that will take more work. I have never done that part.
Chandrahasa s
Valued Contributor

Re: HPVM PV MOVE

Hi,

If ivms having any data kindly take data backup as this is recomanded.

From your log its looks that you have extended vg to new san disk.

now reduce vg from new san disk.

take map file of vgs.

do dd between old san disk to new (take first vg)

shutdown all ivms.

vgchange

vgexport

import vg using new san diks.

vgimport vgname disk1 disk2

vgchnage

conform all lvs created with old name.

start ivms and check.

Chandra

Misbah Elalami
Advisor

Re: HPVM PV MOVE

Thanks for the responses folks - I will have the system down tomorrow and I will try the suggested dd method ...

Thanks
Tim Nelson
Honored Contributor

Re: HPVM PV MOVE

another idea

If your storage is striped at the vmhost level and your backingstore is lv to the guests, you could present the new storage to the guests and then use pvmove ( or mirror/ux)

if your disk backingstore is device(raw) then ignore the post...

Misbah Elalami
Advisor

Re: HPVM PV MOVE

Hi Chandra -

Can you kindly specify some command syntax in those instructions - I am going to try this today - i.e the dd command - do I just do a disk to disk copy or lv to lv copy etc ...

Thanks for the help
Misbah Elalami
Advisor

Re: HPVM PV MOVE

Hi Chandra I am just a little confused about the order ... and some of the commands - so I came up with an exact procedure based on your steps below - and if anyone can let me know if they have a look for a sanity check and order of my operations - I really appreciate any feedback

VGREDUCE New Disks from Existing 3a and 3b VG's

vgreduce /dev/hpvm3a_vg00 /dev/dsk/c19t0d2
vgreduce /dev/hpvm3a_vg00 /dev/dsk/c21t0d1

vgreduce /dev/hpvm3b_vg00 /dev/dsk/c19t0d3
vgreduce /dev/hpvm3b_vg00 /dev/dsk/c19t0d4

Take a map file of the VG's

vgexport -m hpvm3a_vg00.mymap /dev/hpvm3a_vg00
vgexport -m hpvm3b_vg00.mymap /dev/hpvm3b_vg00

Deactivate VG's

vgchange -a n /dev/hpvm3a_vg00
vgchange -a n /dev/hpvm3b_vg00

Do the Disk Copy via DD

dd if=/dev/dsk/c14t0d7 of=/dev/dsk/c19t0d2
dd if=/dev/dsk/c14t1d0 of=/dev/dsk/c21t0d1

dd if=/dev/dsk/c14t1d1 of=/dev/dsk/c19t0d3
dd if=/dev/dsk/c14t1d2 of=/dev/dsk/c19t0d4

Activate Volume Groups:

vgchange -a y /dev/hpvm3a_vg00
vgchange -a y /dev/hpvm3b_vg00

Import VG Using new SAN Disks

vgimport -m hpvm3a_vg00.mymap /dev/hpvm3a_vg00 /dev/dsk/c19t0d2 /dev/dsk/c21t0d1
vgimport -m hpvm3b_vg00.mymap /dev/hpvm3b_vg00 /dev/dsk/c19t0d3 /dev/dsk/c19t0d4

Add New SAN disks to VG's

vgextend /dev/hpvm3a_vg00 /dev/dsk/c19t0d2
vgextend /dev/hpvm3a_vg00 /dev/dsk/c21t0d1

vgextend /dev/hpvm3b_vg00 /dev/dsk/c19t0d3
vgextend /dev/hpvm3b_vg00 /dev/dsk/c19t0d4

REmove old SAN disks from VG's

vgreduce /dev/hpvm3a_vg00 /dev/dsk/c14t0d7
vgreduce /dev/hpvm3a_vg00 /dev/dsk/c14t1d0

vgreduce /dev/hpvm3b_vg00 /dev/dsk/c14t1d1
vgreduce /dev/hpvm3b_vg00 /dev/dsk/c14t1d2

Check all LV's are present with the original names.

Thanks in advance -

Cheers,
Chandrahasa s
Valued Contributor
Solution

Re: HPVM PV MOVE

Hi,

Go through below plan.

Phase 1:

Take backup of data in all ivms

Take ignite of all ivms
Take outputs as like

#hpvmstatus >> /tmp/vmlogs
#hpvmstatus -P ivmname(guest) >> /tmp/vmlogs
#hpvmnet >> /tmp/vmlogs
#hpvmcollect -P ivmname
#vgdisplay -v >> /tmp/vmlogs
#strings /etc/lvmtab >> /tmp/vmlogs

*******************************************************************************

Phase:2
a)vgname>>/dev/hpvm3a_vg00


#vgreduce /dev/hpvm3a_vg00 /dev/dsk/c19t0d2 /dev/dsk/c21t0d1

#dd if=/dev/dsk/c14t0d7 of=/dev/dsk/c19t0d2 bs=2046 (will take time for complete)

#dd if=/dev/dsk/c14t1d0 of=/dev/dsk/c21t0d1 bs=2046 (will take time for complete)

#vgexport -p -s -m /tmp/hpvm3a_vg00.map /dev/hpvm3a_vg00

#vgchange -a n /dev/hpvm3a_vg00

#vgexport /dev/hpvm3a_vg00


Note:Dont pvcreate or deallocate old luns you can go for roll back if needed.
***********************************************************************************

Phase3:

#mkdir /dev/hpvm3a_vg00

#mknod /dev/hpvm3a_vg00/group c 64 0*010000

#vgimport -s -m /tmp/hpvm3a_vg00.map /dev/hpvm3a_vg00

#vgchange -a y /dev/hpvm3a_vg00

#vgdisplay -v /dev/hpvm3a_vg00

conform all lvs with same same as earlier

if lvs name not same as before you can rename it without loosing data

hope you will not come accross with this problem as your lvs name is lvol1 and lvol2

*************************************************************************************************************************
Start vmguest (if only all disks of particular ivm guest comes under /dev/hpvm3a_vg00) and check
*************************************************************************************************************************

Do above exercise for /dev/hpvm3b_vg00 also.


Chandra