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
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
rariasn
Honored Contributor

Re: LVM mirroring

Hi Morshed:

In node that have the vg active:

vgexport with "-p" option: Preview the actions to be taken but do not update
the /etc/lvmtab file or remove the devices file.

# vgexport -p -m /tmp/vgname.map vgname

# scp /tmp/vgname.map node2:/tmp

In secondary node:

vgexport

# vgexport -m /tmp/vgname.map.old vgname

# mkdir /dev/vgname
# mknod /dev/vgname/group c 64 0xnn0000
# vgimport -m /tmp/vgname.map vgname /dev/dsk/cxtydz ...

rgs,


mrmo07
Regular Advisor

Re: LVM mirroring


hi,

could anybody give me good lvm docs. just not only docs.hp.com. something customize.

Rgds,Morshed.
Jayakrishnan G Naik
Trusted Contributor

Re: LVM mirroring

Hi Morshed

The following link have more latest information on LVM (LVM1.0, LVM2.0)and you to regiter to that website to download documents.

http://www.docstoc.com/docs/27220396/HP-UX-11i-V3-LVM

Hope this will be useful

Thanks & Regards
Jayakrishnan G Naik
Viktor Balogh
Honored Contributor

Re: LVM mirroring

Hi Mohammad,

what you are trying to do is called "host based mirroring". Basically, it goes online, without even stopping the server or the application, but for this you should have the product MirrorDisk/UX installed. You should migrate it on the active server (the server your applications are running currently), after that you should bring the changes also to the passive node. (vgexport -p on the active node, the import the mapfile on the passive node.) No mountpoints/cluster config should be changed.

Regards,
Viktor
****
Unix operates with beer.
P Arumugavel
Respected Contributor

Re: LVM mirroring

Hi,

Refer the attached LVM docs from HP. This document discusses how to deal with disk failures under the HP-UX logical volume manager and it includes strategies to prepare for disk failure, ways to recongnize that a disk has failed and steps to remove and replace a failed disk.

Rgds...
mrmo07
Regular Advisor

Re: LVM mirroring

Hey ,

i have a question question about vdisk. what shoud be my OS unit id for hp ux during vdisk creation??

plz help.

Regds/Morshed.
mrmo07
Regular Advisor

Re: LVM mirroring


thank you all........

Regards/Morshed.