cancel
Showing results for 
Search instead for 
Did you mean: 

LVM mirroring

 
SOLVED
Go to solution
mrmo07
Regular Advisor

LVM mirroring

Hi,
scenario like below:
currently i have 14 lovls in same pv,vg. runnign database and applicaton.now with the additional hdd i will create new pv with the same vg.then i will mirror all 14 lvols to the new pv.and remove lvols from old pv. i like to run application and database from new pv.should i have different mount point or it will run from separate mount point? this is under HP UX SG cluster. plz help.

Regards,
Morshed.
16 REPLIES 16
Johnson Punniyalingam
Honored Contributor

Re: LVM mirroring

Hence you have HPUX-Mirror software Installed.

Add new PV's to existing VG & mirror all 14 lvols
once done,

and than you can vgreduce -> old PV's
Problems are common to all, but attitude makes the difference
mrmo07
Regular Advisor

Re: LVM mirroring

Hi,
understood.
but my question is once i reduce the existing lvols and like to keep mirrored lvols. should i create different mount point? or it will run from existing mount point.

Regards,
Morshed.
Johnson Punniyalingam
Honored Contributor
Solution

Re: LVM mirroring

>>> but my question is once i reduce the existing lvols and like to keep mirrored lvols.


lvreduce -m 0 /dev/vgxx/lvolxx /dev/dsk/cxtxdx -> old PV's

Remove mirror copies of logical extents of a logical volume from the
physical volume /dev/dsk/c1t0d0: -> example

refer man pages


should i create different mount point? or it will run from existing mount point.

no need .
Problems are common to all, but attitude makes the difference
Jayakrishnan G Naik
Trusted Contributor

Re: LVM mirroring

Hi Rezaul


You are mirroring your lvs and that doesn't need a different mountpoint. Mirroring actually duplicates the extends to the new pv and the filesystem not aware of the underlying redundancy level (mirror) as the lvm manages the mirroring.

Thanks & Regards
Jayakrishnan G Naik






mrmo07
Regular Advisor

Re: LVM mirroring

Hi,

thanks lot.
As it is under service guard cluster do i need to change anything in cluster?

Regards,
Morshed.
rariasn
Honored Contributor

Re: LVM mirroring

Hi Morshed:

Use vgexport and vgimport

The vgimport command adds the specified volume group to the system.
The physical volumes, specified as pv_path ..., are scanned to obtain the volume group information and logical volume information. This command works much like vgcreate by requiring that the volume group
device directory and the group special file be created before the command is executed (see vgcreate(1M)). The vg_name is added from the /etc/lvmtab file, and the associated logical volume device files are
added to the system.

man vgexport and vgimport

rgs,
Jayakrishnan G Naik
Trusted Contributor

Re: LVM mirroring

Hi

As you are going to remove your PV by mirroring it to new and detaching the old, you need to replicate the changes to other cluster nodes by exporting vg in preview mode to a create a map file and import it on other cluster node.

Recommend to create a runbook for your activity including all the steps to complete an activity. You can probably keep a latest backup as a precautionary measure and execute the task during hours with less load etc.

Thanks & Regards
Jayakrishnan G Naik

mrmo07
Regular Advisor

Re: LVM mirroring

Hi,

when i should do vgexport/import?
once i done every thing on node 1??
should i copy the map file from node1 to node2??

Regards,
Morshed.




Jayakrishnan G Naik
Trusted Contributor

Re: LVM mirroring

HI Morhsed

Yes, After completing everything on node1 you can create map file and copy it to other node.


You can see this thread having the steps to export and import below, but recommend you to create your own runbook with all the commands you are going to execute in the right order and verify and ensure it is fine. This will help to avoid forgetting/missing something to do.

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1454717

Thanks & Regards
Jayakrishnan G Naik