Oracle 11gR1 RAC Storage Migration Scenario

Source: Internet
Author: User

First, the demand
Oracle 11gR1 RAC Storage plan replacement, database version 11.1.0.7, no Downtime Maintenance window.

Second, the Environment preparation
1. Host environment, OS environment
2. Install 11.1.0.6.0 version clusterware (linux.x64_11gR1_clusterware.zip)
3. Install 11.1.0.6.0 version of RDBMS software (Linux.x64_11gR1_database_1013.zip)
4, upgrade to 11.1.0.7.0 version (upgrade clusterware and RDBMS respectively) (P6890831_111070_linux-x86-64.zip)
5, APPLY 3 psu,update to 11.1.0.7.14
P14739378_111070_linux-x86-64.zip, P11724936_111070_linux-x86-64.zip, P11724953_111070_linux-x86-64.zip, p6880880 _111000_linux-x86-64.zip (Opatch)
6. Create a listener, create a library
Sql> select * from Dba_registry_history;
# CRS_STAT-T

Three, storage configuration
Because there is no downtime, you must scroll, otherwise modifying the storage may cause the node to restart
1, Node 1
1) First stop Node 1 instance
# srvctl Stop instance-d ora11g-i ora11g1
# Srvctl Stop Asm-n Rac1
# CRS_STAT-T
2) connect the new storage and restart the iSCSI identity storage device
# Service iSCSI Restart
3) FDISK formats the new store and modifies the Rawdevices file to allow the system to mount the bare device at boot time
# vi/etc/sysconfig/rawdevices
--Add the following:
/dev/raw/raw1/dev/sdb1
.....
/dev/raw/raw5/dev/sdf1
4) Bare Device mapping
# Vi/etc/udev/rules.d/60-raw.rules
action== "Add", kernel== "/dev/sdb1", run+= "/bin/raw/dev/raw/raw1%N"
action== "Add", env{major}== "8", env{minor}== "+", run+= "/bin/raw/dev/raw/raw1%M%M"
......
action== "Add", kernel== "/dev/sdf1", run+= "/bin/raw/dev/raw/raw5%N"
action== "Add", env{major}== "8", env{minor}== "Bayi", run+= "/bin/raw/dev/raw/raw5%M%M"
kernel== "Raw[1-5]", owner= "Oracle", group= "Oinstall", mode= "640"
5) Restart Udev
# Start_udev
6) Restart Rawdevices Service
# Service Rawdevices Restart
7) View Raw device
# ls-l/dev/raw
8) Creating an ASM disk
#/etc/init.d/oracleasm Createdisk Newasmdsk/dev/sdo1
# oracleasm Listdisks
9) Start Monitoring, instance
# Srvctl Start Listener-n Rac1
# Srvctl Start Asm-n Rac1
# srvctl start instance-d ora11g-i ora11g1
# CRS_STAT-T

2, Node 2
The same as Node 1 operations, only because Node 1 has created an ASM disk, Node 2 in Node 1, step 8) scan can be
# oracleasm Scandisks
# oracleasm Listdisks

By doing so, the new storage is successfully connected and identified to the partitioned LUN, which is rolled in such a way that the business is not interrupted.

Iv. OCR Migration
1. View OCR storage location and other information
# Ocrcheck
or view/etc/oracle/ocr.loc
/DEV/RAW/RAW10,/DEV/RAW/RAW11-bit OCR disk, and/DEV/RAW/RAW10 is an image of OCR
2. Ensure the healthy operation of CRS
# CRSCTL Check CRS
3. OCR can be migrated online via Ocrconfig command
# Ocrconfig-replace OCR/DEV/RAW/RAW1
# Ocrconfig-replace OCRMIRROR/DEV/RAW/RAW2
Note: One is OCR, the other is ocrmirror, corresponding to the position of/etc/oracle/ocr.loc Ocrconfig_loc and Ocrmirrorconfig_loc respectively.
4, check whether the migration is successful
# Ocrcheck
Extension: Oracle 11g R2 version, the Ocrconfig command has been enhanced, and the commands to change OCR locations have changed, as follows:
Ocrconfig-replace <current filename>-replacement <new filename>

V. Relocation of voting Plates
1. View voting disk Current storage path
# crsctl Query CSS Votedisk
2, 11g R2 version, can only be removed by adding the way to migrate. First delete one, because there are currently 3 storage paths, so deleting one does not have an impact
# crsctl Delete css Votedisk/dev/raw/raw9
# crsctl Add CSS Votedisk/dev/raw/raw5
# crsctl Delete css Votedisk/dev/raw/raw8
# crsctl Add CSS Votedisk/dev/raw/raw4
Note: When attempting to delete the first storage path of the voting disk, an error occurs:
# crsctl Delete css Votedisk/dev/raw/raw7
Failure 8 with Cluster synchronization Services while deleting voting disk.
The Add force option forces the deletion
# crsctl Delete css Votedisk/dev/raw/raw7-force
# crsctl Query CSS Votedisk
# crsctl Add CSS Votedisk/dev/raw/raw3
3. Check if the voting disc was successfully migrated
# crsctl Query CSS Votedisk
Extensions: The Crsctl command in Oracle 11g R2 is enhanced by many, with the Replace feature being added to the votedisk operation:
Crsctl Replace–replaces the location of voting files
It is visible that DBAs can replace the storage location online in this version.

VI. ASM Storage Migration
1. Log in to ASM instance to view current disk group information
$ Export ORACLE_SID=+ASM1
$ sqlplus/as Sysasm
Sql> Select NAME, Allocation_unit_size, State, TOTAL_MB, FREE_MB usable_file_mb from Gv$asm_diskgroup;
Sql> Select Failgroup, name from V$asm_disk where group_number= (select Group_number from v$asm_diskgroup where name = ' DATADG ');
2. Add a new ASM disk to the DATADG disk
Sql> alter DiskGroup DATADG add disk ' Orcl:newasmdsk ' name New_asmdsk REBALANCE POWER 10;
Note: Add multiple ASM disk modes: Alter DiskGroup DATADG add disk ' orcl:asm1 ', ' orcl:asm2 ', ' orcl:asm3 ' rebalance power n;
3. View ASM Disk rebalance Progress, v$asm_operation record will disappear after completion
Sql> select * from V$asm_operation;
4. Status after adding ASM disk
Sql> select name, Allocation_unit_size, state, TOTAL_MB, FREE_MB usable_file_mb from Gv$asm_diskgroup;
Sql> Select Failgroup, name, path from V$asm_disk where group_number= (select Group_number from V$asm_diskgroup where NA me = ' DATADG ');
5. Delete the old ASM disk
sql> alter diskgroup DATADG drop disk Oldasmdsk rebalance Power 5;
Sql> select * from V$asm_operation;
6, check the database status and data situation
Now that the Oracle database has all the new storage, you can uninstall the old storage at the OS level.

Vii. Uninstalling old Storage
You also use scrolling to unload the old disk.
1, Node 1
# srvctl Stop instance-d ora11g-i ora11g1
# Srvctl Stop Asm-n Rac1
# CRS_STAT-T
# oracleasm Listdisks
#/etc/init.d/oracleasm Deletedisk Oldasmdsk
Modify/etc/sysconfig/rawdevices and/etc/udev/rules.d/60-raw.rules, clear old disk information, and restart Udev and rawdevices services.
# CRS_STAT-T
# Srvctl Start Listener-n Rac1
# Srvctl Start Asm-n Rac1
# srvctl start instance-d ora11g-i ora11g1
# CRS_STAT-T

2, Node 2
# srvctl Stop instance-d ora11g-i ora11g2
# Srvctl Stop Asm-n RAC2
# CRS_STAT-T
# oracleasm Scandisks
# oracleasm Listdisks
Modify/etc/sysconfig/rawdevices and/etc/udev/rules.d/60-raw.rules, clear old disk information, and restart Udev and rawdevices services.
# CRS_STAT-T
# Srvctl Start Listener-n Rac2
# Srvctl Start Asm-n Rac2
# srvctl start instance-d ora11g-i ora11g2
# CRS_STAT-T


Note: Confirm system availability (may not be allowed in production), manually restart OS
[Email protected] ~]# srvctl stop database-d ora11g
[Email protected] ~]# srvctl stop asm-n Rac1
[Email protected] ~]# srvctl stop asm-n RAC2
[Email protected] ~]# srvctl stop nodeapps-n Rac1
[Email protected] ~]# srvctl stop nodeapps-n RAC2
[[email protected] ~]# Crsctl stop CRS
[Email protected] ~]# Shutdown-r now

[[email protected] ~]# Crsctl stop CRS
[Email protected] ~]# Shutdown-r now
After reboot:
# RAW-QA
# Ocrcheck
# crsctl Query CSS Votedisk
# Check data file and data status

Oracle 11gR1 RAC Storage Migration Scenario

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.