1833738 Members
2629 Online
110063 Solutions
New Discussion

lvsplit issue

 
Coolmar
Esteemed Contributor

lvsplit issue

Hi again, I figured I would start a new thread on this one.

I have an old server with a volume group (VG02) consisting of a LUN from the SAN filled with data. I have a new server that I want to copy that data to. So I vgextended vg02 on the old server to include the new lun dedicated to the new server. I then mirrored the logical volumes to the new LUN. Then (as suggested in my last thread) I used lvsplit to break the mirror and then vgimport on the new server to load up the data. It all works great. My problem now is that I want that new LUN dedicated only to the new server. The problem is that when you "lvsplit" on the old server you get copies of the logical volumes and those are what are loaded on the new server. I want to remove those copies on the original server as well as the new LUN from the volume group, but I can't or it kills all the data on the new server.
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: lvsplit issue

Shalom,

You should have created a new logical volume not used lvextend

Then you could vgexport on this node and vgimport on the second node.

Have the San Admin help with the WWN and see if you can still implement my plan.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Coolmar
Esteemed Contributor

Re: lvsplit issue

Thanks for your response Steven but I am not sure what you mean? I shouldn't mirror the data and use lvsplit?
Coolmar
Esteemed Contributor

Re: lvsplit issue

I just want to copy the data from one lun to another. Lvsplit seems to work, but it seems that the disk has to be seen/remain on both servers. I want the new LUN to be independant of the old server.
Steve Faidley
Valued Contributor

Re: lvsplit issue

I believe you can do it with the
-g PhysicalVolumeGroup option.
edit /etc/lvmpvg file and add the new disks.
(See man pages for details)
after they are mirrored on the old server, do the split with the -g. now the new disks will be offline and the originals will be active still. I think you can lvremove the "b" lvol and vgreduce the new disks out of the old servers VG at that point without causing any problems. If that doesn't work you could fake out the old server by modifying the PV names so it looks like the disks do not exist any longer and force the vgreduce. ( mv /dev/dsk/c1t2d3 /dev/dsk/c9t9d9). Since the disk paths /dev/dsk/cxtydz do not exist they will not get written to. rename the disk to the proper path once your have removed it from the VG.

If it ain't broke, let me have a look at it.
Coolmar
Esteemed Contributor

Re: lvsplit issue

Finally figured out what to do:

Mirrored the lvs; created a map file using vgexport and copied it to the new server; then removed the LUN from the original server (do not lvreduce or vgreduce) and vgimport on the new server. Then lvreduce and vgreduce on the original server.