|
|
< Day Day Up > |
|
Once CRS is installed, you are now ready for the RDBMS install itself. Again, one of the first considerations to take into account before beginning the RDBMS install is the storage that will be used, both for the ORACLE_HOME and for the database itself. As we have said, in most environments, you have a couple of options, and you can mix and match between them.
Probably the most basic option is to simply do the install to a private (or local) drive for each node. The CRS install will do the push for you, allowing you to do the install just once from a single node. You will have the option of selecting the nodes to be
If you prefer, you may decide to use a shared ORACLE_HOME, by using OCFS as the file system for the shared ORACLE_HOME. On Linux, this requires that you be running OCFS version 2.0 or higher. OCFS version 1. x on Linux does not support installing the ORACLE_HOME-this version of OCFS can only be used for the database files. On the Windows platform, Oracle also provides a cluster file system that can be used for both the ORACLE_HOME and the RDBMS. This functionality has been available from Oracle on the Windows platform since the initial release of OCFS, shortly after 9.2.0.1 was released.
Using OCFS for the ORACLE_HOME will not
Prior to beginning the RDBMS installation, you must ensure that the CRS stack is running on all nodes in the cluster. To make this determination, run the olsnodes command from the bin directory in the CRS_HOME. Usage of olsnodes can be found by using the -help switch:
[root@rmsclnxclu1 bin]# ./olsnodes -help Usage: olsnodes [-l] [-n] [-v] [-g] where -l print the name of the local node -n print node number with the nodename -v run in verbose mode -gturn on logging
For example, olsnodes -n should return the node name of each node, as well as its node number:
[root@rmsclnxclu1 bin]# ./olsnodes -n rmsclnxclu1 0 rmsclnxclu2 1
After verifying the correct feedback from the olsnodes command, you can begin with the RDBMS install. Ensure that the ORACLE_HOME and ORACLE_BASE environment variables are properly set. (Recall in our examples that ORACLE_BASE is set to /u01/app/oracle, and ORACLE_HOME is /u01/app/oracle/10G.) You will also want to append the ORACLE_HOME/bin directory to the
ORACLE_BASE=/u01/app/oracle ORACLE_HOME=$ORACLE_BASE/10g ORACLE_SID=grid1 PATH=$ORACLE_HOME/bin:/usr/local/bin:$PATH LD_ASSUME_KERNEL=2.4.19 export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH LD_ASSUME_KERNEL
Note the value for LD_ASSUME_KERNEL. This environment variable is required if installing on Red Hat 3.0 (not needed for Red Hat 2.1, or other Linux variants). However, if running Red Hat 3.0, this variable should not only be set for the oracle
When running the installer for the RDBMS, with the CRS stack running on all nodes, you should then see the Specify Hardware Cluster Installation Mode screen directly after the File Locations page of the installer. This screen is depicted in Figure 4-7. As alluded to earlier in this chapter, this is where you will have the choice, if you prefer, to check the box for a Local Installation, which will allow you to install into a home without the RAC option. However, for our purposes here, that is not what we want. Instead, you will want to ensure that all nodes in your cluster are listed in the Cluster Installation window. If you wish to do individual installations to each node in the cluster, you may do so by checking only the box
Figure 4-7:
Cluster Installation screen-select nodes for install
After choosing Enterprise Edition, Standard Edition, or Custom for the installation type, you will then be placed into the Product-Specific Prerequisite Checks screen. Here, the OUI will go through various checks, depending on which options you have
The next big decision you must make is to decide whether or not you want to create a database at the end of the installation. We recommend that you do not create a starter database during the installation-you can manually run the Database Creation Assistant afterward, creating the database once the installation is completed. Therefore, our advice is to select the option next to 'Do not create a starter database' and just get the binaries laid down. We will cover the creation of the database in the next section.
For those of you who are
At the end of the installation, several assistants will be kicked off to finish out the configuration of your installation. Previously we have mentioned the VIPCA, or Virtual IP Address Configuration Assistant. This assistant is actually run as root, kicked off by running a root.sh script toward the end of the installation. VIPCA must be run successfully before you can use the DBCA to create a database. The NETCA will automatically configure your tnsnames.ora and listener.ora files. In addition to the Database Configuration Assistant (DBCA), the OC4J Assistant will be run. This is necessary for Enterprise Manager and Grid Control functionality. In the following sections we will provide an overview of what is needed for the two most critical assistants, the VIPCA and DBCA.
VIPCA
As we mentioned, at the end of the installation, you will be prompted to run the root.sh script out of the ORACLE_HOME directory on each node. Prior to doing so, you should ensure that the display is set appropriately for an X-
While root.sh must be run on each node of the cluster, VIPCA will only be
Figure 4-8:
Specification of virtual IP addresses
After root.sh and VIPCA are run on the first node, run root.sh on all other nodes in the cluster. As noted, the VIPCA should not have to be run on the other cluster nodes. Instead, what you should see at the end of the root.sh script on the remaining nodes is feedback such as this:
Now product-specific root actions will be performed. CRS resources are already configured
Once root.sh has been run on all nodes, return to the Installation screen and click on OK to finish out the installation.
DBCA
The DBCA will be run at the end of the install automatically, if you chose the option to configure a database. If you did so, you would have been prompted for various pieces of the RDBMS configuration prior to the installation actually having started. This would include options such as the type of database, the database name, and storage options (that is, RAW, ASM, or file system). We recommend that you run the DBCA independently after the installation, as you will have more flexibility in specifying parameters and other options. In addition, if you are using ASM, you have more flexibility in defining disks and disk
What we do not recommend is attempting to manually create the database without using the DBCA at all. The DBCA automates many functions, particularly those necessary for a smooth operation in a RAC environment. Examples include configuration of networking files using the VIPs, running of srvctl commands (which we will discuss in Chapter 6), and the automatic creation of ASM instances if you decide to use ASM for your storage, as we discussed in Chapter 3.
The DBCA can be run on its own, as the oracle user, by changing to the ORACLE_HOME/bin directory and simply running ./dbca. Again, make sure that the display is set properly for an X-Term session. Ensure that the CRS stack is properly configured (see the olsnodes command previously mentioned) so that we can be sure that when DBCA is run, we will see the Node Selection screen. The very first screen in the DBCA should give you the option to choose between an 'Oracle Real Application Clusters database,' and an 'Oracle single instance database.' If you do not get the choice for the Real Application Clusters database, that is an indication that the CRS stack is not running or has experienced a problem (see the section on the ocrcheck utility at the end of Chapter 6 for instructions on checking the integrity of the Oracle Cluster Registry). The next two screens should then allow you to select the option to create a database and then choose the nodes on which instances for that database will be created. Subsequent screens will allow you to choose a predefined database template or create your own custom database. You will then be prompted for the DB name, passwords for various accounts, and the all-important Storage Options screen (see Figure 4-9).
Figure 4-9:
Database Storage Options screen in DBCA
Using RAW Devices for Database Files
Storage Options, as shown in Figure 4-9, allows you to choose between a cluster file system (CFS), ASM, or RAW for the location of your database files. For details on using ASM,
For RAW device configuration, you should ensure that you have created all of the necessary RAW slices, as defined in the appropriate preinstallation chapter. For Linux, refer to the section earlier in this chapter, in the 'Shared Storage Configuration' section, and to the HA Workshop at the beginning of the chapter, where we discussed using the fdisk command to create the partitions. Keep in mind that you must create one partition for
each
file. This includes every datafile, logfile and controlfile, as well as the system parameter file (discussed more in Chapter 5). In addition, we recommend that you create a RAW device mapping file, mapping predefined link names for each file associated with the database to a specific RAW slice in the /etc/sysconfig/rawdevices file. In our example, the db_name is grid, so you would create a mapping file called grid_raw.conf. Within that file, each link should be defined, pointing to a RAW slice of the appropriate
|
Link Name |
Disk Slice |
Size |
|---|---|---|
|
System |
/dev/raw/raw5 |
600MB |
|
Sysaux |
/dev/raw/raw6 |
600MB |
|
Users |
/dev/raw/raw7 |
100MB |
|
Temp |
/dev/raw/raw8 |
500MB |
|
redo1_1 |
/dev/raw/raw9 |
250MB |
|
redo1_2 |
/dev/raw/raw10 |
250MB |
|
redo2_1 |
/dev/raw/raw11 |
250MB |
|
redo2_2 |
/dev/raw/raw12 |
250MB |
|
control1 |
/dev/raw/raw13 |
100MB |
|
control2 |
/dev/raw/raw14 |
100MB |
|
undotbs1 |
/dev/raw/raw15 |
650MB |
|
undotbs2 |
/dev/raw/raw16 |
650MB |
|
Spfile |
/dev/raw/raw17 |
25MB |
|
Pwdfile |
/dev/raw/raw18 |
25MB |
The sizes listed are recommended minimum values. You may decide you need larger sizes,
Combine this information with the information in your rawdevices file to lay the files out so that they are evenly distributed across multiple disks to balance out I/O operations. Use the Size column to verify that the partitions are adequately
system=/dev/raw/raw5 sysaux=/dev/raw/raw6 users=/dev/raw/raw7 etc.
After choosing the appropriate storage options, continue on, setting initialization parameters as needed for the SGA size, choosing the desired character set, and so on. At the end of the database creation, you should see a screen pop up like that seen in Figure 4-10, signifying that you are done. (That example used ASM as the storage medium.) Voila! You are done-you now have a RAC-enabled database. In the next two chapters, we will go into more detail on managing your RAC environment, as well as configuring resources for high availability.
Figure 4-10:
Database Creation Complete
|
|
< Day Day Up > |
|