Oracle 10g RAC OCFS2 Cluster Storage migration Abstract

Source: Internet
Author: User

Oracle 10g RAC OCFS2 Cluster Storage migration Abstract

In the RedHat 5.4 64bit environment of an Oracle 10g RAC ocfs2-Based Cluster, You need to replace the storage and upgrade the 8GHBA card. The process is summarized as follows:

Preparation:

1. First, use df-h under the root user to view the usage of the original storage and evaluate the migrated data volume.

2. Use mount to display the current storage mounting status and format, and back up and record the/etc/fstab file

3. Considering the addition of a new memory card, the recognition location of the original storage LUN will change, which is difficult to identify.

/Sbin/scsi_id-g-u-s/block/sdX, view the uuid of each LUN in the existing storage, and record it. For the sake of security, in each mounted LUN, touch is an empty file that identifies the original sdX and the mount point to facilitate identification when both the new and old storage are mounted.

4. Record the UUID of the new storage LUN for future reference.

Operation:

1. oracle

Su-oracle switch to oracle user

Sqlplus/as sysdba

Shutdown immediate

Exit oracle

Run the command as root in the $ ORACLE_HOME/crs/bin directory installed in oracle. /crs_ctl disable crs, so that the RAC crs resources are not automatically started during the switchover and restart process to prevent data corruption.

2. automatically mount the original storage in/etc/fstab, disable servers one by one, insert a new 8g fc HbA card, and start one rac host first, after it is started, the storage ID changes and it is automatically found that it is inconsistent with the original fdisk-l id.

3. When a new server is found on the storage end, the pre-allocated LUN is allocated to the host. Too many path software has been installed on the original server, and no changes have been made here, the host needs to be restarted to find the newly allocated storage. After the restart, fdisk-l finds more storage Luns. The file format is the original LUN, but the sdX storage is completely incorrect, at this time, the UUID of the original record is used. view it one by one using/sbin/scsi_id-g-u-s/block/sdX, with cat/sys/block/sda/device/vendor, you can also see the storage Manufacturers (the new and old storage manufacturers are different). here you must be careful, the old storage has data, the new storage needs to be mounted and formatted.

4. Mount the original storage LUN to the original directory according to the uuid, as shown in figure

Mount-o datavolume, nointr-t ocfs2/dev/sdi1/oa. Similarly, you can mount the original storage to the original directory one by one. In this case, under the $ ORACLE_HOME/crs/bin directory, pass. /crs_crl start crs starts crs. /crs_crl check crs to check, switch to oracle, and use crs_stat-t to check whether RAC resources are online. After RAC is online, the original storage and RAC are enabled.

5. Create a new directory under the root directory based on the original Mount directory, such as the original/oa directory. Then, create the/oa1 directory to mount the new storage. The LUN is greater than 2 TB, you need to use parted for partitioning. The operation is as follows:

Parted/dev/sdX

Mklabel gpt

Mkpart primary 0% 100%

Print

Quit

After dividing all the planned Luns into partitions, You need to format the partitions as ocfs2. You only need to perform this operation once on a node and run the mkfs command. ocfs2-B 4 K-C 32 K-N 4-L oa/dev/sdc1, format one by one

Mount the planned new storage to the new directory by using commands similar to mount-o datavolume, nointr-t ocfs2/dev/sdi1/oa1.

6. Stop oracle, stop crs resources, and copy files and subdirectories and their permissions to the new storage through the cp-rp/original storage Mount directory/New Storage Mount directory, the process is long. You can use du-sh to view the capacity changes of the new storage and copy the old storage content to the new storage.

7. After the copy is complete, umount mounts all the data to the storage. Then, mount the new storage to the original mount point according to the original Mount directory and restart the crs resource, use crs_stat-t to check whether rac is online. If it is normal, the new storage can work normally.

8. Stop the database, shut down the crs, shut down the original 4G memory card, and after the system is restarted, the drive letter changes. After the crs is started and manually loaded through mount, in/etc/fstab, the syntax is as follows:

/Dev/sde1 on/oa type ocfs2 (rw, _ netdev, datavolume, nointr, heartbeat = local), add them one by one, so that the new storage can be automatically loaded upon startup, do not forget crscrl enable crs to enable crs automatically.

9. As long as the LUN is allocated to another node, it is mounted according to the original directory. Finally, both the crs_stat-t nodes are online. After the restart, the storage mount and crs are automatically started and work properly, run the following command in sqlplus:

Select instance_name from v $ instance;

Select open_mode fromv $ database;

Check the database performance so that the storage migration and swap card replacement are complete.

Summary:

The above migration method involves only a few database operations, and does not need to be imported or exported to the database. Migration is completed completely at the file level in linux, which has low requirements on oracle and is logically simple, highly operable, and migration can be completed smoothly.

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.