Operating System - HP-UX
1752754 Members
4572 Online
108789 Solutions
New Discussion юеВ

Mirrorring Disks in MC/Service Guard

 
SOLVED
Go to solution
Sharon Bi
Frequent Advisor

Mirrorring Disks in MC/Service Guard

Dear All,

I am going to install a new hard disk (c2t15d0) and mirror it to an existing one(c1t15d0) in an MC/SG environment.

The current setting is:

c1t15d0 is the only disk in vg05. And there are two partitions:

/dev/vg05/fsybase --- mount to /opt/sybase
/dev/vg05/tempdb --- mount to /home/sybase/tempdb

Here is the steps I think I need to do:

( node A is the primary , and node B is the failover.)

Step One: umount the related file systems:

umount /opt/sybase
umount /home/sybase/tempdb

Step Two: halt the package

cmhaltpkg torrepo

Step Three: on node A:

pvcreate /dev/rdsk/c2t15d0
vgextend /dev/vg05 /dev/dsk/c2t15d0
lvextend -m 1 /dev/vg05/fsybase /dev/dsk/c2t15d0
lvextend -m 1 /dev/vg05/tempdb /dev/dsk/c2t15d0
vgchange -c y /dev/vg05
vgexport -p -v -m vg05.mapfile /dev/vg05
rcp vg05.mapfile nodeb:/tmp

What shall I do next?

I checked the setting on node B. There is vg05 directory under /dev. So, is that I only have to do the vgimport -v -m vg05.mapfile /dev/vg05 /dev/dsk/c1t15d0 /dev/dsk/c2t15d0?

I know there is a certain sequence to activate/deactivate the volume group, take it out/into the cluster... to do this kind of LVM changes. Could anyone give me a brief on that?

Thanks a lot in advance!

Sharon
8 REPLIES 8
Rita C Workman
Honored Contributor
Solution

Re: Mirrorring Disks in MC/Service Guard

Stop the package: cmhaltpkg
Release control of cluster: vgchange -c n /dev/vg_ _
Turn on vol group: vgchange -a y /dev/vg_ _

NOW::::
Turn off vol group: vgchange -a n /dev/vg_ _
Return control of cluster: vgchange -c y /dev/vg _ _
Restart your package....cmrunpkg

Regards,
Stefan Farrelly
Honored Contributor

Re: Mirrorring Disks in MC/Service Guard


Your steps listed on the first node look fine, simply adding in the new disk and activating the mirroring.

To do the same on the other node in the SG cluster all you need to do is reimport the VG in question to add in the other disk. Thats it. However, this vg is VG05 on the primary node and not VG05 on the other node, as youve spotted. The only thing to do is failover the package(s) to the other node and check ALL the VGs in /dev to see which one has the existing disk in it (c11t5d0), this must be the one to export and reimport with your new mirror disk.
Usually SG clusters ive seen use the same VG naming on all nodes, yours doesnt seem to, but you should be able to determine which VG its in. Then stop the package, vgexport the VG in question and reimport it with c11t5d0 and the new mirror disk and your done.
Im from Palmerston North, New Zealand, but somehow ended up in London...
John Palmer
Honored Contributor

Re: Mirrorring Disks in MC/Service Guard

'strings /etc/lvmtab' will tell you which volume group the disk is in on the standby node but it MUST be vg05.

Your order of commands on Node A should include:-

vgchange -c n vg05
vgchange -a y vg05

before you can vgextend etc.

and on Node B, you will need to recreate vg05:-

vgchange -c n vg05
vgexport vg05
mkdir /dev/vg05
mknod /dev/vg05/group c 64 0x050000
vgimport...
vgchange -a n vg05
vgchange -c y vg05

Then restart your package. I would recommend testing the package on both servers as well.

Sharon Bi
Frequent Advisor

Re: Mirrorring Disks in MC/Service Guard

When can I do the export on node A?

1) stop the package
2) release control of cluster: vgchange -c n
3) turn on vol group: vgchange -a y
4) make the lvm changes

Shall I export it now or after I turn off the vol group and treturn control of custer?
John Palmer
Honored Contributor

Re: Mirrorring Disks in MC/Service Guard

Export it as soon as you've completed the mirroring. Once you've deactivated it you won't be able to do so.
Ramesh Donti
Frequent Advisor

Re: Mirrorring Disks in MC/Service Guard

Hi,
An addition to John' reply.
VG is preferred to be deactivated before doing vgexport. Infact before 10.x, it was not supported. From HP-UX 10.20, one can do vgexport in preview mode to get vgmap file while volume group is active.
Always Keep Smiling
John Palmer
Honored Contributor

Re: Mirrorring Disks in MC/Service Guard

Sharon,

For clarification, the format of the vgexport/vgimport commands that you should use is as follows:-

vgexport -p -v -s -map /tmp/vg05map vg05
Then rcp /tmp/vg05map to Node B and after the mknod command do:-
vgimport -m /tmp/vg05map -s -v vg05

You can of course export a VG after deactivating it but if you don't want it to be removed completely, you must remember the -p flag. Exporting while the VG is still active prevents it from being removed from the system if you forget -p.

Sorry for any confusion,
John
Byron Myers
Trusted Contributor

Re: Mirrorring Disks in MC/Service Guard

HI,
FYI, If the new disk is already attached to the system, you can add it to vg05 and mirror the LV's online - without bringing down service guard. As always, it is a good idea to test service guard on the stand-by node whenever making changes like this. The steps to take on the stand-by node are the same, regardless of the approach you choose.
If you can focus your eyes far and straight enough ahead of yourself, you can see the back of your head.