Operating System - HP-UX
1748256 Members
3958 Online
108760 Solutions
New Discussion юеВ

Re: mirror lv and mount on another server

 
Jose_C_Moraes
Super Advisor

mirror lv and mount on another server

Hi everybody. I need help. Source node hpux 11.11 destination node 11.31.

I have been searching the forums looking for a thread that could me help in this question, but I did not found anything helpfull.

I need to mirror-ux some lvs in a vg on a storage to another storage presented to both servers, in a way that I can split the lvs in the first server and mount them on the other server. The vg on the original server has an Oracle database. The target has to have the Oracle database mounted in this new server, uncorrupted.

Can someone give the steps to do this ?

I know that I have to vgexport -pvsm, vgchange -a n on the source node, do I need to lvreduce before mkdir,mknod,vgimport/vgchange/mount on the destination node?

There is no cluster involved;

I appreciated any help.
Best regards,TIA
Jose
11 REPLIES 11
Rita C Workman
Honored Contributor

Re: mirror lv and mount on another server

There is the lvsplit command, but since it sound like your're saying you have two servers and two storage arrays, that might not be the way to go.

If the servers are each connected to their own separate array. Possibly the very most basic thing would be to create on the second node (not clustered) connected to second storage array, the same vg/lvol setup. Then simply remote copy the data from the first server to the second.
This type of copy might take a good while, it might be best to shutdown the database as opposed to running copy while in hotbackup mode.

Just a thought, till others jump in with more options.

Rgrds,
Rita
Steven E. Protter
Exalted Contributor

Re: mirror lv and mount on another server

Shalom,

If the two servers share some storage yes.

If not no.

lvextend will not extend a logical volume to another disk via the network.

dd will however with the correct syntax copy the data on the physical disk through the network.

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
Pete Randall
Outstanding Contributor

Re: mirror lv and mount on another server

The problem that I see, assuming I understand what you're trying to do, is that mirroring is done at the logical volume level - withing the same volume group. In order to move this over to the other server, you're going to have to vgexport/vgimport the entire VG. It sounds like you want to split the logical volumes, one set to each server. I can't see how you can do that with LVM mirroring.


Pete

Pete
Jose_C_Moraes
Super Advisor

Re: mirror lv and mount on another server

Thanks for the replies. I wil try to be more specific.

I mirror copy ( lvextend -m 1 ) 2 lvols.

After the sync is completed, I lvsplit them.

vgexport -pvsm, on the source node, do I need to lvreduce before mkdir,mknod,vgimport/vgchange/mount on the destination node?

Or there are another actions to do ?

Is this feasible ?

TIA, regards
Jose
Rita C Workman
Honored Contributor

Re: mirror lv and mount on another server

I mirror copy ( lvextend -m 1 ) 2 lvols.
After the sync is completed, I lvsplit them.
vgexport -pvsm, on the source node, do I need to lvreduce before mkdir,mknod,vgimport/vgchange/mount on the destination node?
>>>Do an lvdisplay - does it show there is still a Mirror copies = 1 after you ran the lvsplit? If it does, then I'd say you would have to remove the mirror copy for every lvol.

Is this feasible?
>>>>>Feasible, is a point of view. Can you do this - yes.
Should it be done - depends on what your trying to do, how you do it, and can it create a problem. Cause it really could create an issue.
You would need to do a vgexport. But on the vgimport side you would only want to import the mirror disk. So you would have to create a textfile that contains the /dev/dsk/c-t-d- info (in one continual line seperated by space might be best) and run the import like this:
vgimport -v (-s maybe) -m /etc/lvmconf/vgname.mapxxx -f /dev/vgname

Hope this gets you started..
Rgrds,
Rita




Rita C Workman
Honored Contributor

Re: mirror lv and mount on another server

Sorry forgot to tell you why I say reduce lvol mirror...

it would create the potential for a split brain on the disk when you mount the disks and potentially can have data being hit from both side.


/rcw
Jose_C_Moraes
Super Advisor

Re: mirror lv and mount on another server

Thanks Rita.

If I lvreduce, the data is still there on the mirrored lvols?

TIA
Jose
Mel Burslan
Honored Contributor

Re: mirror lv and mount on another server

Yes your data will still be on the reduced mirror volumes. After the reduce operation, you need zone these volumes to the new server and then using vgimport, you can make them available to your new server.
________________________________
UNIX because I majored in cryptology...
Jose_C_Moraes
Super Advisor

Re: mirror lv and mount on another server

Thanks Mel,

The vols are already presented to the other server.

Another thought.

When the mirrors were split, the vg was active. Will be this a issue when trying to mount them on the other server ?

Regards
Jose