Here we have a VMware test environment deployment above a set oracle 12c RAC. Due to limited space on the esxi host rac can not lead to expansion. Just using a machine made idle a NAS server, a shared manner rac ISCSI node, and then replace the existing memory shared by the Linux rac dd commands to achieve migration.
1, ISCSI server configuration
This is using oracle linux on 7 targetcli to achieve the specific configuration reference my other blog post: the Configure iSCSI Target ON RHEL7 . After the configuration information as shown below:
2, RAC client node configuration ISCSI
Ensure that each node is installed iscsi-initiator-utils package, if not installed by yum. RAC nodes then each perform the following operations, respectively:
- Setting up the client InitiatorName
edit initiatorname.iscsi file, set the friendly name, as follows:[root@odb02 ~]# vi /etc/iscsi/initiatorname.iscsi InitiatorName=iqn.2019-07.com.12c:odb02 [root@odb03 ~]# vi /etc/iscsi/initiatorname.iscsi InitiatorName=iqn.2019-07.com.12c:odb03
After the setup is complete, restart iscsid service, as follows:
[root@odb02 ~]# for i in enable start status;do systemctl $i iscsid;done [root@odb03 ~]# for i in enable start status;do systemctl $i iscsid;done
- Set the Client Access server ISCSI
[root@odb02 ~]# iscsiadm -m discovery -t sendtargets -p 192.168.120.9:3260 [root@odb02 ~]# iscsiadm -m node -T iqn.2019-07.com.12c:lun1 -p 192.168.120.9:3260 -l [root@odb02 ~]# lsscsi -g [2:0:0:0] disk VMware Virtual disk 1.0 /dev/sda /dev/sg0 [3:0:0:0] disk VMware Virtual disk 1.0 /dev/sdb /dev/sg1 [3:0:1:0] disk VMware Virtual disk 1.0 /dev/sdc /dev/sg2 [8:0:0:0] disk LIO-ORG sharedisk01 4.0 /dev/sdd /dev/sg3 [8:0:0:1] disk LIO-ORG sharedisk02 4.0 /dev/sde /dev/sg4 [root@odb03 ~]# lsscsi -g [0:0:0:0] disk VMware Virtual disk 1.0 /dev/sda /dev/sg0 [3:0:0:0] disk VMware Virtual disk 1.0 /dev/sdb /dev/sg1 [3:0:1:0] disk VMware Virtual disk 1.0 /dev/sdc /dev/sg2 [4:0:0:0] disk LIO-ORG sharedisk01 4.0 /dev/sdd /dev/sg3 [4:0:0:1] disk LIO-ORG sharedisk02 4.0 /dev/sde /dev/sg4
3, ORACLE RAC stop service
Any node in a rac rac stop all services as root:
[root@odb02 ~]# crsctl stop cluster -all CRS-2673: Attempting to stop 'ora.crsd' on 'odb03' CRS-2673: Attempting to stop 'ora.crsd' on 'odb02' CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on server 'odb03' CRS-2673: Attempting to stop 'ora.racdb.db' on 'odb03' CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on server 'odb02' CRS-2673: Attempting to stop 'ora.racdb.db' on 'odb02' CRS-2673: Attempting to stop 'ora.qosmserver' on 'odb02' CRS-2673: Attempting to stop 'ora.MGMTLSNR' on 'odb02' CRS-2677: Stop of 'ora.racdb.db' on 'odb03' succeeded CRS-2673: Attempting to stop 'ora.DATA.dg' on 'odb03' CRS-2673: Attempting to stop 'ora.FRA.dg' on 'odb03' CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'odb03' CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'odb03' succeeded CRS-2673: Attempting to stop 'ora.odb03.vip' on 'odb03' CRS-2677: Stop of 'ora.racdb.db' on 'odb02' succeeded CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'odb02' CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'odb02' CRS-2673: Attempting to stop 'ora.cvu' on 'odb02' CRS-2677: Stop of 'ora.DATA.dg' on 'odb03' succeeded CRS-2677: Stop of 'ora.MGMTLSNR' on 'odb02' succeeded CRS-2677: Stop of 'ora.FRA.dg' on 'odb03' succeeded CRS-2673: Attempting to stop 'ora.asm' on 'odb03' CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'odb02' succeeded CRS-2673: Attempting to stop 'ora.odb02.vip' on 'odb02' CRS-2677: Stop of 'ora.asm' on 'odb03' succeeded CRS-2673: Attempting to stop 'ora.ASMNET1LSNR_ASM.lsnr' on 'odb03' CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'odb02' succeeded CRS-2673: Attempting to stop 'ora.scan1.vip' on 'odb02' CRS-2677: Stop of 'ora.odb03.vip' on 'odb03' succeeded CRS-2677: Stop of 'ora.cvu' on 'odb02' succeeded CRS-2677: Stop of 'ora.odb02.vip' on 'odb02' succeeded CRS-2677: Stop of 'ora.scan1.vip' on 'odb02' succeeded CRS-2677: Stop of 'ora.ASMNET1LSNR_ASM.lsnr' on 'odb03' succeeded CRS-2673: Attempting to stop 'ora.DATA.dg' on 'odb02' CRS-2673: Attempting to stop 'ora.FRA.dg' on 'odb02' CRS-2673: Attempting to stop 'ora.ons' on 'odb03' CRS-2677: Stop of 'ora.ons' on 'odb03' succeeded CRS-2673: Attempting to stop 'ora.net1.network' on 'odb03' CRS-2677: Stop of 'ora.net1.network' on 'odb03' succeeded CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'odb03' has completed CRS-2677: Stop of 'ora.FRA.dg' on 'odb02' succeeded CRS-2677: Stop of 'ora.DATA.dg' on 'odb02' succeeded CRS-2673: Attempting to stop 'ora.asm' on 'odb02' CRS-2677: Stop of 'ora.asm' on 'odb02' succeeded CRS-2673: Attempting to stop 'ora.ASMNET1LSNR_ASM.lsnr' on 'odb02' CRS-2677: Stop of 'ora.crsd' on 'odb03' succeeded CRS-2673: Attempting to stop 'ora.ctssd' on 'odb03' CRS-2673: Attempting to stop 'ora.evmd' on 'odb03' CRS-2673: Attempting to stop 'ora.storage' on 'odb03' CRS-2677: Stop of 'ora.storage' on 'odb03' succeeded CRS-2673: Attempting to stop 'ora.asm' on 'odb03' CRS-2677: Stop of 'ora.ctssd' on 'odb03' succeeded CRS-2677: Stop of 'ora.evmd' on 'odb03' succeeded CRS-2677: Stop of 'ora.ASMNET1LSNR_ASM.lsnr' on 'odb02' succeeded CRS-2677: Stop of 'ora.asm' on 'odb03' succeeded CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'odb03' CRS-2677: Stop of 'ora.qosmserver' on 'odb02' succeeded CRS-2673: Attempting to stop 'ora.ons' on 'odb02' CRS-2677: Stop of 'ora.ons' on 'odb02' succeeded CRS-2673: Attempting to stop 'ora.net1.network' on 'odb02' CRS-2677: Stop of 'ora.net1.network' on 'odb02' succeeded CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'odb02' has completed CRS-2677: Stop of 'ora.crsd' on 'odb02' succeeded CRS-2673: Attempting to stop 'ora.ctssd' on 'odb02' CRS-2673: Attempting to stop 'ora.evmd' on 'odb02' CRS-2673: Attempting to stop 'ora.storage' on 'odb02' CRS-2677: Stop of 'ora.storage' on 'odb02' succeeded CRS-2673: Attempting to stop 'ora.asm' on 'odb02' CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'odb03' succeeded CRS-2673: Attempting to stop 'ora.cssd' on 'odb03' CRS-2677: Stop of 'ora.ctssd' on 'odb02' succeeded CRS-2677: Stop of 'ora.evmd' on 'odb02' succeeded CRS-2677: Stop of 'ora.cssd' on 'odb03' succeeded CRS-2677: Stop of 'ora.asm' on 'odb02' succeeded CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'odb02' CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'odb02' succeeded CRS-2673: Attempting to stop 'ora.cssd' on 'odb02' CRS-2677: Stop of 'ora.cssd' on 'odb02' succeeded
4, synchronous old disk data to disk ISCSI
Since the disk is two and two rac node, respectively, perform synchronization operations where two nodes as follows:
[root@odb02 ~]# dd if=/dev/sdc of=/dev/sde bs=4096k 25600+0 records in 25600+0 records out 107374182400 bytes (107 GB) copied, 8172.08 s, 13.1 MB/s [root@odb03 ~]# dd if=/dev/sdb of=/dev/sdd bs=4096k 51200+0 records in 51200+0 records out 214748364800 bytes (215 GB) copied, 12859.5 s, 16.7 MB/s
It took a total of 3.5 hours.
5, delete the old disk and identify new disc
Oracleasm first to use operating system commands to delete, and then perform the scanning operation to identify new disk.
[root@odb02 ~]# oracleasm deletedisk data01 [root@odb02 ~]# oracleasm deletedisk fra001 [root@odb02 ~]# oracleasm scandisks [root@odb02 ~]# oracleasm listdisks DATA01 FRA001 [root@odb03 ~]# oracleasm scandisks [root@odb03 ~]# oracleasm listdisks DATA01 FRA001
6, start the Oracle RAC service
[root@odb02 ~]# crsctl start cluster -all CRS-2672: Attempting to start 'ora.evmd' on 'odb03' CRS-2672: Attempting to start 'ora.cssdmonitor' on 'odb03' CRS-2672: Attempting to start 'ora.cssdmonitor' on 'odb02' CRS-2672: Attempting to start 'ora.evmd' on 'odb02' CRS-2676: Start of 'ora.cssdmonitor' on 'odb03' succeeded CRS-2672: Attempting to start 'ora.cssd' on 'odb03' CRS-2672: Attempting to start 'ora.diskmon' on 'odb03' CRS-2676: Start of 'ora.cssdmonitor' on 'odb02' succeeded CRS-2672: Attempting to start 'ora.cssd' on 'odb02' CRS-2672: Attempting to start 'ora.diskmon' on 'odb02' CRS-2676: Start of 'ora.diskmon' on 'odb02' succeeded CRS-2676: Start of 'ora.diskmon' on 'odb03' succeeded CRS-2676: Start of 'ora.evmd' on 'odb02' succeeded CRS-2676: Start of 'ora.evmd' on 'odb03' succeeded CRS-2676: Start of 'ora.cssd' on 'odb03' succeeded CRS-2672: Attempting to start 'ora.ctssd' on 'odb03' CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'odb03' CRS-2676: Start of 'ora.cssd' on 'odb02' succeeded CRS-2672: Attempting to start 'ora.ctssd' on 'odb02' CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'odb02' CRS-2676: Start of 'ora.ctssd' on 'odb03' succeeded CRS-2676: Start of 'ora.ctssd' on 'odb02' succeeded CRS-2676: Start of 'ora.cluster_interconnect.haip' on 'odb03' succeeded CRS-2672: Attempting to start 'ora.asm' on 'odb03' CRS-2676: Start of 'ora.cluster_interconnect.haip' on 'odb02' succeeded CRS-2672: Attempting to start 'ora.asm' on 'odb02' CRS-2676: Start of 'ora.asm' on 'odb02' succeeded CRS-2672: Attempting to start 'ora.storage' on 'odb02' CRS-2676: Start of 'ora.asm' on 'odb03' succeeded CRS-2672: Attempting to start 'ora.storage' on 'odb03' CRS-2676: Start of 'ora.storage' on 'odb03' succeeded CRS-2672: Attempting to start 'ora.crsd' on 'odb03' CRS-2676: Start of 'ora.crsd' on 'odb03' succeeded CRS-2676: Start of 'ora.storage' on 'odb02' succeeded CRS-2672: Attempting to start 'ora.crsd' on 'odb02' CRS-2676: Start of 'ora.crsd' on 'odb02' succeeded
After rac ensure a smooth start, and then shut down to remove the old disk to the virtual machine.