1834195 Members
2434 Online
110064 Solutions
New Discussion

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


Misbah Elalami
Advisor

Re: HPVM PV MOVE

Thanks alot Chandra - I get a chance to try that out next week - and will let you know how it goes - THANKS A MILLION for all the help and the very specific instructions... I was a little worried about using DD because I wasn't sure what it would do to the underlying LVM structures - but I think it will be okay... will let you know how it all goes - thanks Alot again ...
chris huys_4
Honored Contributor

Re: HPVM PV MOVE

Hi,

I would mirror the volumes, to the new san luns.

Mirroring will keep the striping intact, so I dont see a problem there.

When everything is mirrored, shutdown the virtual machine, "disconnect" the "old san luns" from the vm guests, reduce the "old san luns" from the "vmguest volumegroups" on the vmhost, "connect" the "new san luns to the vm guest" and start up the vmguests.

Much better, then using, something antiquate ;), like dd, with a volumemanager.

NOTE : the whole point of introducing volumemanagers, more then 14+ years ago, on hp-ux, was not to need to use raw disk devices and dd, ever again. (until oracle came up with asm offcourse ;) sorry couldnt resist) )

NOTE2: And oh yes, you would have had problems with "the dd from the old san luns to new san luns", sooner or later, as the new san luns, dont have the exact same size as the old san luns.

Greetz,
Chris
Dave Johnson_1
Super Advisor

Re: HPVM PV MOVE

@Chris,
You missed the statement in his original post stating the lvols are striped. There is no version of HP-UX or add-on that allows striping and mirroring.
Misbah Elalami
Advisor

Re: HPVM PV MOVE

So a quick question comes up then before I start after reading the comment from Chris

"NOTE2: And oh yes, you would have had problems with "the dd from the old san luns to new san luns", sooner or later, as the new san luns, dont have the exact same size as the old san luns."

My new SAN drives are bigger than than the existing old SAN drives by a a few PP's or so - does DD require exact same size - or if the new disk is larger - should that work as well?

Thanks for clarifying all

chris huys_4
Honored Contributor

Re: HPVM PV MOVE

> My new SAN drives are bigger than than
> the existing old SAN drives by a a few
> PP's or so - does DD require exact same
> size
dd from a smaller to a bigger disk will work, initially, but like all "workaround methods", a normal pvcreate of the "bigger disk" would have contained at least a lvm extent more "in its lvm header" then "the amount of extents the lvm header, that comes through the dd of the smaller disk contains" and thus, this can be the source of problems in the future...

So if, the dd would need to be done, which it not needed in this case, only equal sizes of disks, would limit the amount of problems, imo..
chris huys_4
Honored Contributor

Re: HPVM PV MOVE

> @Chris,
> You missed the statement in his original
> post stating the lvols are striped. There
> is no version of HP-UX or add-on that
> allows striping and mirroring.

Thats dependent on what is understand beneath striping.

If its extent based striping, then mirroring is certainly possible..

i.e.
ronin # lvdisplay -v /dev/vgmirrorstriping/lvol1
--- Logical volumes ---
LV Name /dev/vgmirrorstriping/lvol1
VG Name /dev/vgmirrorstriping
LV Permission read/write
LV Status available/syncd
Mirror copies 1
Consistency Recovery MWC
Schedule striped
LV Size (Mbytes) 40
Current LE 10
Allocated PE 20
Stripes 2
Stripe Size (Kbytes) 8
Bad block on
Allocation strict
IO Timeout (Seconds) default

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/disk/disk70 5 5
/dev/disk/disk72 5 5
/dev/disk/disk74 5 5
/dev/disk/disk75 5 5

--- Logical extents ---
LE PV1 PE1 Status 1 PV2 PE2 Status 2
00000 /dev/disk/disk70 00000 current /dev/disk/disk74 00000 current
00001 /dev/disk/disk72 00000 current /dev/disk/disk75 00000 current


Greetz,
Chris
chris huys_4
Honored Contributor

Re: HPVM PV MOVE

> @Chris,
> You missed the statement in his original
> post stating the lvols are striped. There > is no version of HP-UX or add-on that
> allows striping and mirroring.
Just to be clear. "standard" Striping + mirroring does work as my example shows.. but I did it on a hp-ux 11.31 system.

So upgrading first the vmhost to hp-ux 11.31 would solve that problem. ;)

So yes, if its the normal "striping" and its hp-ux 11.23 and upgrading the vmhost to hp-ux 11.31 is no option, then indeed, daves solution is probably the one I would also use. (i.e. creating a new vg with the new san luns and filesystem copying the data over ..)

Greetz,
Chris
sujit kumar singh
Honored Contributor

Re: HPVM PV MOVE

theres a pactyh for 11.23 to enable 16TB support+ mirror stripes, can have that installed on the systems

s700_800 11.23 LVM Striped/Mirror + 16TB LV Enablement PHCO_37939
posted: 2008/08/21
PHCO_37939
posted: 2008/08/21


regards
sujit