LVM and VxVM

Re: mirroring on shared volume and lvmconf changes

 
SOLVED
Go to solution
Susan Prosser
Advisor

mirroring on shared volume and lvmconf changes

Scenario...

2 * A classes in Service Guard pair.

Shared volume group is /dev/vg_shared consists of 2 physical drives and 3 logical volumes lvol9 lvol13 and lvol14.

Mirroring setup only on lvol14.

vg_shared currently mounted on HOST_B and running oracle
Host_A knows all about vg_shared ie all /dev/vg_shared/lvol* n group etc present so I assume that vgexport/vgimport etc done succesfully in past.

I have now mirrored up lvol9 and lvol13.

Now, Do I need to worry about lvmconf file differences between the 2 servers?? ie does mirroring ,I have now done, effect any lvm files?

Thanks in Advance
Sue

4 REPLIES 4
Mark Grant
Honored Contributor

Re: mirroring on shared volume and lvmconf changes

This shouldn't be a requirement. Although I have never really considered how lvmconf is updated, you never seem to need to consider it in a service guard cluster when moving packages. You don't need to export/import when adding or removing logical volumes whihc is basically all you have done.
Never preceed any demonstration with anything more predictive than "watch this"
James Murtagh
Honored Contributor

Re: mirroring on shared volume and lvmconf changes

Hi Sue,

The mirror setup is saved to the Volume Group records on disk so you don't need to update anything on the other host to activate it with the new mirroring. The lvmconf area is a backup of the physical volume configuration and layout so what you can't do is activate it on host a then vgcfgrestore to the mirror disk - this will restore the old information to the disk headers and removing the mirroring for the two lvols. What you should do after activating the VG on the other host is take a backup of the new configuration using vgcfgbackup to make sure everything is in sync.

Cheers,

James.
Virgil Chereches_2
Frequent Advisor

Re: mirroring on shared volume and lvmconf changes

Any modification in volume group structure on one node should reflect on all other nodes in the cluster, i.e. you should vgexport the vg_shared on HOST_A and vgimport back to have the volume group configuration consistent between nodes.
You could do this by vgexport-ing vg_shared in preview mode on HOST_B with a map file (vgexport -p -s -m mapfile vg_shared), rcp the mapfile to HOST_A and vgimporting back on HOST_A (with vgimport -s -m mapfile vg_shared).
Of course, I only outlined the steps needed to synchronize the vg on the second node. You should read few manual pages of lvm commands to do things right.
Good luck,
Virgil
Bernhard Mueller
Honored Contributor
Solution

Re: mirroring on shared volume and lvmconf changes

Sue,

you do not need to vgexport/vgimport. This is only necessary when you add/remove disks to/from the vg.

If you add lvols you should add the required rlvol/lvol device files using mknod (or run vgexport -p -s and vgimport -s)

If you remove lvols you should remove the unnecessary device files using rmsf

For add/remove lvols you would most likely also change the package control script and have to copy that to the other node.

Now in your case, since lvmconf files are only updated when you run make_tape/net_recovery or when you make changes to the VG, it would be good practice to run vgcfgbackup vg_shared, after you started the package (i.e. activate the vg_shared) on the other node. You do not have to do this immediately, though.

Regards,
Bernhard