LVM and VxVM

Split a mirror to mount it on other system

 
Mike Roger
Advisor

Split a mirror to mount it on other system

Hi there,

I have a VG with mirrored SAN LUN. I want to split the mirror and mount the backup copy on another system. I want to maintain the data on the split copy so as to be used on the other system. By the way mirroring is done across two EVAs. And this split will be permanent â means I will keep this copy to be part of the second system? Hope itâ s clear.

What are steps to achieve such activity?

Appreciate your he
10 REPLIES 10
Steven E. Protter
Exalted Contributor

Re: Split a mirror to mount it on other system

Not quite so clear Sir.

Once you split the mirror, the data stops updating, so the second system will not have any changes made to the data by the first.

You may wish to have the logical volume shared and mounted from both systems. That could cause data problems.

Once split, data is no longer updated on the split logical volume.

>>>
this split will be permanent
<<<

So how is the second system going to get current data? It can be done, but the objective needs to be clarified.

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
Geoff Wild
Honored Contributor

Re: Split a mirror to mount it on other system

First - why do you want to mount the data on another system? is it for backup purposes?

Is your SAN EMC?
Then it can be accomplished with BCV's....(I believe HP/Hitachi call it Business Copy?).

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Dave Hutton
Honored Contributor

Re: Split a mirror to mount it on other system

Like Steven and Geoff said, it can be done.
HP's version is Business copy:
http://www.hp.com/products1/storage/products/disk_arrays/xpstoragesw/business/index.html

We use it for database backups. A script that puts the database in hotbackup mode. Splits the mirror off and mounts it on another server. Once the backup is finished it resysncs the BC back on the original server. Something to that effect.

Works great. I've also used BCV's for EMC storage, and it works pretty much the same way.

Dave
Mike Roger
Advisor

Re: Split a mirror to mount it on other system

Hi guys sorry if it was not clear but my objectives are:

The first system will be production so I want to have a clear split.
The second system will be development â so no need for the date to be updated after the split.
Itâ s EVA3000
After the split I will still have Raid 1 on the EVA for each copy of the date. Means I will not be merging split back again.

The purpose of the mount on the second system is to have a copy of the data for the development sever before go li
Mike Roger
Advisor

Re: Split a mirror to mount it on other system

Forgot to tell you no business copy yet
Mel Burslan
Honored Contributor

Re: Split a mirror to mount it on other system

So, I am under the impression that the secondary EVA unit is just mirroring the main EVA unit. And your question is if there are any catches before you split the mirror ?

The only thing comes to mind is, if your application is a database, updating these disks, the most sound advice is to shut down the database prior to split, so that you will have consistent records.

If not a database, it all depends how your application writes to the disk. As a rule of thumb, I would shut down any application prior to the split of the secondary copy regardless of the app. type.
________________________________
UNIX because I majored in cryptology...
Mike Roger
Advisor

Re: Split a mirror to mount it on other system

For sure I will be shutting down the DB, but what are the commands in sequence to do this exercise. If we say the first system is A and the second is B. the VG is vg03 and three logical volumes â lvol1, lvol2 and lvol3â .
Mel Burslan
Honored Contributor

Re: Split a mirror to mount it on other system


As I am not familiar with EVA arras, I am not much of a help as the device specific command syntax of these units. I am sure there are people around here using these storage arrays who can pitch in shortly.

if the secondary eva unit was attached to the first one as plain mirror disk devices using MirrorUX software, all you need to do is (after shutting down your dB and/or app. of course) :

(assume variable mirror_copies variable contains your current # of mirror copies;
and if this is your case, current value of mirror copies should be 2. It can be checked by running lvdisplay /dev/vg03/lvol_X_ where _X_ should be substituted for 1, 2 or 3 and look for Mirror Copies line)

let new_mirr_count=$mirror_copies-1
lvreduce -M $new_mirr_count /dev/vg03/lvol1 /dev/dsk/c#t#d#

where c#t#d# is the device path on your secondary EVA unit.

repeat the same for lvol2 and lvol3
________________________________
UNIX because I majored in cryptology...
Mel Burslan
Honored Contributor

Re: Split a mirror to mount it on other system

and all of these should be done from the system which has your disks currently attached to right now, i.e., I presume system A in your notation.
________________________________
UNIX because I majored in cryptology...