Operating System - HP-UX
1836457 Members
2394 Online
110101 Solutions
New Discussion

swapping a PV in LVM based on a "snapshot"

 
Marc Ahrendt
Super Advisor

swapping a PV in LVM based on a "snapshot"

here is what i have on my L3000 running 11.11: a VG called /dev/vg01 with 2 PVs c11t0d1 and c12t0d0 (both these LUNs on an EMC Cx400).

what i want to do is temporarily replace c11t0d1 with c11t0d2, only as a test ...since c11t0d2 is an EMC SnapView snapshot of c11t0d1, basically a point-in-time copy. not sure how to trick LVM into allowing this kind of snapshot testing. note that c12t0d0 is an active PV that i do not what to take offline, etc... while c11t0d1 is just a test PV with a test file system that uses all the PEs of that PV.

thx, marc
hola
3 REPLIES 3
RAC_1
Honored Contributor

Re: swapping a PV in LVM based on a "snapshot"

First I think you will have to take c11t0d2 out of snap view.

Include disk-c11t0d2 in vg01. Then do pvmove and then take out c11t0d1.
man pvmove for details.
There is no substitute to HARDWORK
Marc Ahrendt
Super Advisor

Re: swapping a PV in LVM based on a "snapshot"

RAC, thx for the feedback but your comments imply i am interested in testing the disk c11t0d2 only ...i really am interested in testing the actual data while on that disk and so a "pvmove" is not the command.

basically, i will test/hack-away using "vgexport" and "vgimport" and update this post with my results when i am able to setup a test env to do it ...just wanting to learn/test how to look a EMC snaps in a LVM environment where at times its only a few of the many PVs that are of interest and thus snapped.
hola
Sandman!
Honored Contributor

Re: swapping a PV in LVM based on a "snapshot"

Hi Marc,

How about doing a vgreduce followed by vgextend i.e.

# vgreduce /dev/dsk/c11t0d1
# vgextend /dev/dsk/c11t0d2

Just suggesting...never tried it myself, backup your LVM configuration before and after this procedure. Your best bet is to create a new VG; change c11t0d2's VGID; import c11t0d2 into the new VG; activate VG and mount the lvols.

hope it helps!