Note: This procedure requires stopping the entire cluster.
- Get a list of EBS volumes used by ASM (device names xvdba to xvdbz):
$ flashgrid-node
Compare it with the list of EBS volumes in AWS Console. There should be following EBS volumes:- /dev/sda1 - OS disk
- /dev/xvdz - /u01
- xvdba through xvdbz and xvdca through xvdcz - EBS volumes used by ASM
- Power off the EC2 instance that should be moved to a different AZ
-
Create an AMI image from the instance. Include /u01 EBS volume in the image (device /dev/xvdz). The OS disk is automatically included in the image.
Quorum nodes: include all EBS volumes in the image.
It usually takes up to 30 minutes to create an image.
- Use the AMI to launch a new EC2 instance in the desired Availability Zone. Assign the correct security group.
- Non-quorum nodes: create and attach new EBS volumes not included in the AMI. Attach EBS volumes with matching size and device paths as the old volumes.
- Verify that passwordless SSH connection works from the other nodes for the fg user using the new IP address, e.g.:
[fg@rac1 ~]$ ssh fg@10.100.101.132 hostname rac2.example.com [fg@racq ~]$ ssh fg@10.100.101.132 hostname rac2.example.com
- Stop all databases
- Stop clusterware:
# crsctl stop cluster -all
- Reconfigure FlashGrid services:
- All nodes: Temporarily remove the immutable attribute for
/etc/hosts
file:$ sudo chattr -i /etc/hosts
- All nodes: Update the IP address in the
/etc/hosts
file. - All nodes: Restore the immutable attribute on the
/etc/hosts
file:$ sudo chattr +i /etc/hosts
- First DB node: Deploy the CLAN configuration to all nodes:
$ sudo flashgrid-clan-cfg deploy-config
The output must show - "deployment successful" on all nodes, "Starting CLAN service" on the EC2 instance moved to the new AZ, "Reloading CLAN service" on the other nodes.
- All nodes: Temporarily remove the immutable attribute for
- Stop EC2 instances for all nodes (do not start any node until all nodes are stopped)
- Start EC2 instances for all nodes
- Verify that ASM disk groups are mounted on all DB nodes:
$ flashgrid-cluster
- Start all databases
- Modify DNS record and/or client connect strings with the new IP address.
- In case you've migrated a database node, replace the old IP address with the new one in the /etc/motd file. Repeat the same on all database and quorum nodes.
# sed -i s/10.100.101.32/10.100.101.132/g /etc/motd
Please replace 10.100.101.32 with an old IP address and 10.100.101.132 with a new IP address in the above command.
- Wait until there are no offline disks, and the cluster status is Good:
$ flashgrid-cluster
It takes some time to resync the data on the ASM disk groups.