Oracle11g RAC construction in linux (iv) III. Configure shared storage configuration ASM management preparation
1) OCRDISK: stores CRS resource configuration information
2) VOTEDISK: The arbitration disk, which records the node status.
3) DataDisk: stores datafile, controlfile, redologfile, and spfile.
4) RecoveryArea: stores flashbackdatabase log, archivelog, and rmanbackup.
Install the asm package
Install On node1 and node2 respectively
Node1:
[Root @ node1 ~] #Cd/soft
[Root @ node1 soft] #Ls
Asm linux_11gR2_database_1of2.zip linux_11gr2_databasesilicate f2.zip linux_11gR2_grid.zip
[Root @ node1 asm] #Cd asm
[Root @ node1 asm] #Ls
Oracleasm-2.6.18-194.el5-2.0.5-1.el5.i686.rpm
Oracleasmlib-2.0.4-1.el5.i386.rpm
Oracleasm-support-2.1.3-1.el5.i386.rpm
Make sure that it matches with the kernel version.
Note:
1. Check whether the asm software package version 2.6.18-194. el5 and the system kernel version 2.6.18-194. el5 match the two and you can continue the installation;
2. i386 represents 32 bits.
[Root @ node1 asm] #Uname-a or uname-r
// Check whether the system kernel version is the same as the asm version.
Linux node1 2.6.18-194. el5 #1 SMP Tue Mar 16 21:52:43 EDT 2010 i686 i686i386 GNU/Linux
Install software package under node1
[Root @ node1 asm] #Rpm-ivh *
// Install three software packages, I-install, v-installation process, h-display installation information, *-all software packages
[Root @ node1 asm] #Rpm-qa | grep asm// View the information about the installation.
Install software package under node2
Under node2:
[Root @ node1/] #Scp/soft/asm/* node2:/home/oracle/
// Copy the software package under asm from node1 to node2.
Or[Root @ node1 soft] #Scp-r asm node2:/home/oracle/
[Root @ node2 ~] #Cd/home/oracle
[Root @ node2 oracle] #Ls
Oracleasm-2.6.18-194.el5-2.0.5-1.el5.i686.rpm
Oracleasmlib-2.0.4-1.el5.i386.rpm
Oracleasm-support-2.1.3-1.el5.i386.rpm
[Root @ node2 asm] #Rpm-ivh *
1) create a partition on the shared Array
In the node1 partition, view it in node2
OCR + VOTE: 3 1 GB Disks
DATABASE Disk: 2 5 GB
RECOVERY Disk: 2 4 GB
The three 1 GB disks are OCR_VOTE1 disks, and two of them are images.
One of the two 5g ASM_DATA1 disks is an image.
One of the two 4G ASM_RCY1 disks is an image.
[Root @ node1 ~] #Fdisk-l
// View disk Information
Disk/dev/sda: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065*512 = 8225280 bytes
Device Boot Start End Blocks Id System
/Dev/sda1*1 13 104391 83 Linux
/Dev/sda2 14 2610 20860402 + 8e Linux LVM
Disk/dev/sdc: 22.7 GB, 22769827840 bytes
255 heads, 63 sectors/track, 2768 cylinders
Units = cylinders of 16065*512 = 8225280 bytes
Disk/dev/sdc doesn' t contain avalid partition table
#Fdisk/dev/sdc// Partition sdc
OCR + VOTE
Command (m for help ):N
Command action
E extended
P primary partition (1-4)
P// Create the first primary partition first
Partition number (1-4 ):1
First cylinder (1-2610, default 1 ):1
Last cylinder or + size or + sizeM or + sizeK (1-2610, default 2610 ):+ 1024 M
// The size of the primary partition is 1024 MB, and the OCR disk is divided into 1 GB.
OCR + VOTE
Command (m for help ):N
Command action
E extended
P primary partition (1-4)
P// Create the second primary Partition
Partition number (1-4 ):2
First cylinder (126-2610, default1 ):
Last cylinder or + size or + sizeM or + sizeK (126-2610, default 2610 ):+ 1024 M
OCR + VOTE
Command (m for help ):N
Command action
E extended
P primary partition (1-4)
P// Create the third primary Partition
Partition number (1-4 ):3
First cylinder (251-2610, default 251 ):
Last cylinder or + size or + sizeM or + sizeK (251-2610, default 2610 ):+ 1024 M
Create an extended partition
Command (m for help ):N
Command action
E extended
P primary partition (1-4)
E// Create an extended partition with the size of all the remaining capacity
Partition number (1-4 ):4
First cylinder (376-2610, default 376 ):
Using default value 126
Last cylinder or + size or + sizeM or + sizeK (376-2610, default 2610 ):
Using default value 2610
Databasearea
Command (m for help ):N
Command action
L logical (5 or over) // re-create a logical Partition
P primary partition (1-4)
L
First cylinder (376-3916, default 376 ):
Using default value 376
Last cylinder or + size or + sizeM or + sizeK (376-3916, default 3916 ):+ 5 GB
Databasearea
Command (m for help ):N
Command action
L logical (5 or over) // re-create a logical Partition
P primary partition (1-4)
L
First cylinder (985-3916, default 985 ):
Using default value 985
Last cylinder or + size or + sizeM or + sizeK (985-3916, default 3916 ):+ 5 GB
Recoveryarea
Command (m for help ):N
Command action
L logical (5 or over) // re-create a logical Partition
P primary partition (1-4)
L
First cylinder (1594-3916, default 1594 ):
Using default value 1594
Last cylinder or + size or + sizeM or + sizeK (1594-3916, default 3916 ):+ 4G
Recoveryarea
Command (m for help ):N
Command action
L logical (5 or over) // re-create a logical Partition
P primary partition (1-4)
L
First cylinder (2081-3916, default 2081 ):
Using default value 2081
Last cylinder or + size or + sizeM or + sizeK (2081-3916, default 3916 ):+ 4G
The remaining space is divided into one partition.
Command (m for help ):N
Command action
L logical (5 or over) // re-create a logical Partition
P primary partition (1-4)
L
First cylinder (2568-3916, default 2568 ):
Using default value 2568
Last cylinder or + size or + sizeM or + sizeK (2568-3916, default 3916 ):
Command (m for help ):P// View the partition result
Command (m for help ):W// Save and exit
[Root @ node1 ~] #Fdisk-l// Partition result
2) create an asm disk and configure an asm disk (node1 and node2)
On node1
[Root @ node1 soft] #Serviceoracleasm configure
Processing the Oracle ASM library driver.
This will configure the on-boot properties of theOracle ASM library
Driver. Thefollowing questions will determine whether the driver is
Loaded on boot and what permissions it will have. The current values
Will be shown in brackets ('[]'). Hitting <ENTER> without typing
Answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []:Grid
Default group to own the driver interface []:Asmadmin
Start Oracle ASM library driver on boot (y/n) [n]:Y
Scan for Oracle ASM disks on boot (y/n) [y]:
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver: [OK]
Scanning the system for Oracle ASMLib disks: [OK]
On node2
[Root @ node2 asm] #Serviceoracleasm configure
Processing the Oracle ASM library driver.
This will configure the on-boot properties of theOracle ASM library
Driver. Thefollowing questions will determine whether the driver is
Loaded on boot and what permissions it will have. The current values
Will be shown in brackets ('[]'). Hitting <ENTER> without typing
Answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []:Grid
Default group to own the driver interface []:Asmadmin
Start Oracle ASM library driver on boot (y/n) [n]:Y
Scan for Oracle ASM disks on boot (y/n) [y]:
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver: [OK]
Scanning the system for Oracle ASMLib disks: [OK]
Create an asm disk (node1)
On node1
[Root @ node1 soft] #Serviceoracleasm
Usage:/etc/init. d/oracleasm {start | stop | restart | enable | disable | configure | createdisk | deletedisk | querydisk | listdisks | scandisks | status}
[Root @ node1 soft] #Serviceoracleasm createdisk OCR_VOTE1/dev/sdc1
// Use uppercase letters for the disk name
Marking disk "OCR_VOTE1" as an ASM disk: [OK]
[Root @ node1 soft] #Serviceoracleasm createdisk OCR_VOTE2/dev/sdc2
Marking disk "OCR_VOTE2" as an ASM disk: [OK]
[Root @ node1 soft] #Serviceoracleasm createdisk OCR_VOTE3/dev/sdc3
Marking disk "OCR_VOTE3" as an ASM disk: [OK]
[Root @ node1 soft] #Serviceoracleasm createdisk ASM_DATA1/dev/sdc5
Marking disk "ASM_DATA1" as an ASM disk: [OK]
[Root @ node1 soft] #Serviceoracleasm createdisk ASM_DATA2/dev/sdc6
Marking disk "ASM_DATA2" as an ASM disk: [OK]
[Root @ node1 soft] #Serviceoracleasm createdisk ASM_RCY1/dev/sdc7
Marking disk "ASM_RCY1" as an ASM disk: [OK]
[Root @ node1 soft] #Serviceoracleasm createdisk ASM_RCY2/dev/sdc8
Marking disk "ASM_RCY2" as an ASM disk: [OK]
[Root @ node1 soft] #Serviceoracleasm listdisks// View the asm creation result
ASM_DATA1
ASM_DATA2
ASM_RCY1
ASM_RCY2
OCR_VOTE1
OCR_VOTE2
OCR_VOTE3
Verify the ASM disk information (node2). Scan the disk at node2 to view the shared disk information.
[Root @ node2 asm] #Serviceoracleasm scandisks// Scan shared disk asm
Scanning the system for Oracle ASMLib disks: [OK]
[Root @ node2 asm] #Serviceoracleasm listdisks// View shared disk Information
ASM_DATA1
ASM_DATA2
ASM_RCY1
ASM_RCY2
OCR_VOTE1
OCR_VOTE2
OCR_VOTE3