Shared Storage Configuration
The Logical Volume Manager (LVM) manages the physical disks and
presents the volumes to the database system in the form of raw devices.
This section gives the steps to create the volume group and volumes, and
shows how to make them available for all the nodes in the cluster.
Logical Volume Manager Steps:
- Disks need to be properly initialized before being added into
volume groups by the pvcreate command. The following step should be
performed for all the disks (LUNs) we want to configure for our 9i RAC
volume group(s):
$
pvcreate -f /dev/rdsk/cxtydz
(
where x=instance, y=target, and z=unit)
- Create the volume group directory with the character
special file called group:
$ mkdir /dev/vg_rac
$ mknod /dev/vg_rac/group c 64
0x060000
Note: The minor numbers for the group file should be unique among
all the volume groups on the system.
- Create PV-LINKs and extend the volume group:
$ vgcreate /dev/vg_rac /dev/dsk/c0t1d0
/dev/dsk/c1t0d0
$ vgextend /dev/vg_rac /dev/dsk/c1t0d1
/dev/dsk/c0t1d1
Continue with vgextend until all the needed disks are included for
the volume group(s).
- Create logical volumes for the 9i RAC database with the
command:
$ lvcreate -i 10 -I 1024 -L 100 -n
Name /dev/vg_rac
-i: number of disks to stripe across
-I: stripe size in kilobytes
-L: size of logical volume in MB
- Logical Volume Configuration
It is necessary to define raw devices for each of the following
categories of files. The Oracle Database Configuration Assistant (DBCA)
will create a seed database expecting the following configuration:
Raw Device for
File Size Sample name
SYSTEM tablespace
400 MB db_name_raw_system_400
USERS tablespace
120 MB db_name_raw_user_120
TEMP tablespace
100 MB db_name_raw_temp_100
An undo tablespace per
instance
500 MB db_name_thread_raw_undo_500
OEMREPO
20 MB db_name_raw_oemrepo_20
INDX tablespace
70 MB db_name_raw_indx_70
TOOLS tablespace
12 MB db_name_raw_tools_12
DRYSYS tablespace
90 MB db_name_raw_dr_90
First control file
110 MB db_name_raw_control01_110
Second control file
110 MB db_name_raw_control02_110
Two ONLINE redo
log files per instance
120 MB/file db_name_thread_lognumb_120
Spfile.ora
5 MB db_name_raw_spfile_5
Srvmconfig
100 MB db_name_raw_srvmconf_100
EXAMPLE
160 MB db_name_raw_examples_160
Note: Automatic Undo Management requires an undo tablespace per
instance, therefore a minimum of 2 tablespaces are required as
described above.
By following the naming convention described in the table, raw
partitions are identified with the database and the raw volume type
(the data contained in the raw volume). Raw volume size is also
identified using this method.
In the sample names listed in the table, the string db_name should
be replaced with the actual database name, thread is the thread number
of the instance, and log number is the log number within a thread.
It is recommended that symbolic links be created for each of these
raw files on all systems of the RAC cluster.
- Check to see if the volume groups are properly created
and available:
$ strings /etc/lvmtab
$ vgdisplay -v /dev/vg_rac
- Change the permission of the database volume group
vg_ops to 777, change the permissions of all raw logical volumes to
660, and the owner to oracle:dba.
$ chmod 777 /dev/vg_rac
$ chmod 660 /dev/vg_rac/r*
$ chown oracle:dba /dev/vg_rac/r*
- Export the volume group:
First de-activate the volume group
$ vgchange -a n /dev/vg_rac
Create the volume group map file:
$ vgexport -v -p -s -m mapfile
/dev/vg_rac
Copy the map file to all the nodes in the cluster:
$ rcp mapfile
system_name:target_directory
$ rcp map_ops nodeB:/tmp/scripts
$ chown oracle:dba /dev/vg_rac/r*
- Import the volume group on the second node in the
cluster.
Create a volume group directory with the character special file
called group:
$ mkdir /dev/vg_rac
$ mknod /dev/vg_rac/group c 64
0x060000
Note: The minor number has to be the same as on the other node.
Import the volume group:
$ vgimport -v -s -m mapfile /dev/vg_rac
Check to see if devices are imported:
$ strings /etc/lvmtab
Next, we will examine how ServiceGuard is configured to support the
RAC implementation.