1828630 Members
7597 Online
109983 Solutions
New Discussion

Cluster re-configuration

 
kholikt
Super Advisor

Cluster re-configuration

I am trying to compile a procedure as I need to migrate my MC/SG machine SAN using different switch so all disk hardware path is going to change, and this I believe will affect the lock disk.

Pre-migration
1. cmhaltcl
2. vi /etc/rc.config.d/cmcluster and set autostart_cmcld to 0
3. cmquerycl -k -v -C /etc/cmcluster/my_cluster.config -n nodeA -n nodeB
4. Backup all config in /etc/cmcluster directory
# export out all MC/SG VG
5. vgexport -m -p -f -s -v

Post-migration
From the primary node
1. mkdir /dev/
2. mknod /dev//group c 64 0x000000
3. vgimport -v -m -p -f -s -v
4. vgchange -a y
5. vgchange -a n
6. Edit cluster configuration file as lock disk path has chanaged. FIRST_CLUSTER_LOCK_PV
7. cmcheckconf -k -v -C /etc/cmcluster/my_cluster.config
8. cmapplyconf -k -v -C /etc/cmcluster/my_cluster.config
9. vgcfgbackup
10. vgexport -m -p -f -s -v
11. rcp all map file to secondary node

From the secondary node
1. mkdir
2. mknod /dev//group c 64 0x000000
3. vgimport -v -m -p -f -s -v
4. vgchange -a y
5. vgchange -a n
6. verify the cluster lock disk configuration

Do I miss anything?
abc
10 REPLIES 10
Rajeev  Shukla
Honored Contributor

Re: Cluster re-configuration

Your steps look good except for vgexport and vgimport.
If you use -p option with vgexport it wont remove the vg from /etc/lvmtab file and you'll have problems importing it.
So remove -p option and rest is all good.
kholikt
Super Advisor

Re: Cluster re-configuration

here is improve version.

1. Import all VG using the map files export in the pre-migration step.
# mkdir /dev/
# mknod /dev//group c 64 0x0X0000
# vgimport â v â m -p â f -s â v
# vgchange â a y

2. Deactivate the volume group on the primary node & copy LVM info to nodeB:
# ll /dev/vg*/group |awk '{print $6, $10}' > /tmp/gp_min.lst
# rcp /tmp/gp_min.lst nodeB: /tmp/gp_min.lst
# vgchange -a n
# vgexport -m -p -f -s -v
# rcp /tmp/ nodeB:/tmp/
# rcp /tmp/< pv_paths > nodeB:/tmp/< pv_paths >

3. Ensure the cluster lock device should have default pv timeout value on both Node

4. Modify/edit the following parameters in the cluster configuration file as lock disk path has changed:
FIRST_CLUSTER_LOCK_PV

5. Verify the cluster configuration:
# cmcheckconf -k -v -C /etc/cmcluster/emc_cluster.config

6. Activate the cluster lock volume group (if used), and apply the cluster configuration:
# vgchange -a y /dev/ (if cluster lock is used)
# cmapplyconf -k -v -C /etc/cmcluster/emc_cluster.config
If a cluster lock is used, back it up:
# vgcfgbackup /dev/

7. Deactivate cluster lock volume group:
# vgchange -a n /dev/

8. Start the cluster, check status, test node shutdown functionality, and halt the cluster:
# cmruncl -v
# cmviewcl -v
# cmhaltnode -v nodeA
# cmviewcl -v
# cmrunnode -v nodeA
# cmviewcl -v
# cmhaltcl -v â f


Secondary Node
1. Import the vg
# mkdir /dev/
# mknod /dev//group c 64 0x0X0000 (base on /tmp/gp_min.lst)
# vgimport -v -m /tmp/ -p -f /tmp/ -s -v
# vgchange -a y
# vgchange -a n /dev/vgdata1

2. Ensure the cluster lock device should have default pv timeout value on both Node

3. Modify/edit the following parameters in the cluster configuration file as lock disk path has changed:
Cluster lock device (or Quorum server) for each node

4. Verify the cluster configuration:
# cmcheckconf -k -v -C /etc/cmcluster/emc_cluster.config

5. Activate the cluster lock volume group (if used), and apply the cluster configuration:
# vgchange -a y /dev/ (if cluster lock is used)
# cmapplyconf -k -v -C /etc/cmcluster/emc_cluster.config

6. If a cluster lock is used, back it up:
# vgcfgbackup /dev/

7. Deactivate cluster lock volume group:
# vgchange -a n /dev/

8. Start the cluster, check status, test node shutdown functionality, and halt the cluster:
# cmruncl -v
# cmviewcl -v
# cmhaltnode -v nodeA
# cmviewcl -v
# cmrunnode -v nodeA
# cmviewcl -v
# cmhaltcl -v
abc
Stephen Doud
Honored Contributor

Re: Cluster re-configuration

Step 4 won't work - the cluster VGs are marked for exclusive activation, so a '-a y' conflicts with exclusive activation. You also cannot use '-a e' until the cluster daemons are running.

It may be necessary to add the following steps:
Step 6.5
# vgchange -c n
# vgchange -a y

Step 8.5
# vgchange -a n
Geoff Wild
Honored Contributor

Re: Cluster re-configuration

Looks good except why do step 6 and 7?

6. Activate the cluster lock volume group (if used), and apply the cluster configuration:
# vgchange -a y /dev/ (if cluster lock is used)
# cmapplyconf -k -v -C /etc/cmcluster/emc_cluster.config
If a cluster lock is used, back it up:
# vgcfgbackup /dev/

7. Deactivate cluster lock volume group:
# vgchange -a n /dev/


You don't need a separate vg for the cluster lock....your cmquerycl will choose a device for you...

BTW - I'm about to do the same thing this weekend on one of my clusters...

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Calandrello
Trusted Contributor

Re: Cluster re-configuration

Friend the Lock record moved? if yes you tera that to modify this field they tambem in the archive .ascii
kholikt
Super Advisor

Re: Cluster re-configuration

Hi,

As I mentioned earlier that all device path will change so I think I need to modify the lock PV configuration.
abc
kholikt
Super Advisor

Re: Cluster re-configuration

Hi,

In my cluster configuration I have only the following line

FIRST_CLUSTER_LOCK_VG /dev/vgAA1

There is no
FIRST_CLUSTER_LOCK_PV so I guess I do not nee to do the following steps in both nodes right

4. Ensure the cluster lock device should have default pv timeout value on both Node

5. Modify/edit the following parameters in the cluster configuration file as lock disk path has changed:
FIRST_CLUSTER_LOCK_PV

6. Verify the cluster configuration:
# cmcheckconf -k -v -C /etc/cmcluster/emc_cluster.config

7. Activate the cluster lock volume group (if used), and apply the cluster configuration:
# vgchange -a y /dev/ (if cluster lock is used)
# cmapplyconf -k -v -C /etc/cmcluster/emc_cluster.config
If a cluster lock is used, back it up:
# vgcfgbackup /dev/

8. Deactivate cluster lock volume group:
# vgchange -a n /dev/
abc
kholikt
Super Advisor

Re: Cluster re-configuration

sorry I have the FIRST_CLUSTER_LOCK_PV parameter in the config file I miss the line
abc
kholikt
Super Advisor

Re: Cluster re-configuration

Here we go I have re-arranged the step, I think it should be correct now. Any comment are welcome. The scenario involve change the FIRST_CLUSTER_LOCK_PV. I am not too sure whether I need to cmapplyconf and cmcheckconf in one node only or both nodes

Primary Node
1. Import all VG using the map files export in the pre-migration step.
# mkdir /dev/
# mknod /dev//group c 64 0x0N0000
# vgimport â v â m -p â f -s â v

2. Activate MC/SG VG.
2.1 If cluster daemon is running use the following command:
# vgchange â a y

2.2 If cluster daemon is not running use the following command:
# vgchange â c n
# vgchange â a y

3. Deactivate the volume group on the primary node & copy LVM info to nodeB:
# ll /dev/vg*/group |awk '{print $6, $10}' > /tmp/gp_min.lst
# rcp /tmp/gp_min.lst nodeB: /tmp/gp_min.lst
# vgchange -a n

If you have done step 2.2, you have to convert the VG back to cluster mode.
# vgchange â c y

# vgexport -m -p -f -s -v
# rcp /tmp/ nodeB:/tmp/
# rcp /tmp/ nodeB:/tmp/< pv_paths >

Secondary Node
4. Import the vg using the map files copy from primary node
# mkdir /dev/
# mknod /dev//group c 64 0x0N0000
# vgimport â v â m -p â f -s â v

Primary Node and Secondary Noe
5. Ensure the cluster lock device should have default pv timeout value on both Node.

Primary Node
6. Locate and modify the following parameters in the cluster configuration file as lock disk path has changed:
FIRST_CLUSTER_LOCK_PV

7. Verify the cluster configuration:
# cmcheckconf -k -v -C /etc/cmcluster/emc_cluster.config

8. Activate the cluster lock volume group (if used), and apply the cluster configuration:
# vgchange â c n /dev/
# vgchange -a y /dev/
# cmapplyconf -k -v -C /etc/cmcluster/emc_cluster.config
# vgcfgbackup /dev/

9. Deactivate cluster lock volume group:
# vgchange -a n /dev/
# vgchange â c y /dev/

Primary Node & Secondary Node

10. Edit /etc/rc.config.d/cmcluster and set autostart_cmcld to 0

Primary Node

11. Start the cluster, check status, test node shutdown functionality, and halt the cluster:
# cmruncl -v
# cmviewcl â v
abc
Dinesh MIshra
Advisor

Re: Cluster re-configuration

I thinks all the above steps are right.
only thing is u should activate the lock volume in exclusive mode(if required).

it will work.