Instalação Oracle RAC 10g com VirtualBox – Parte 7
October 1, 2011

Parte 1 - Introdução
Parte 2 - Criação e configuração da VM
Parte 3 - Criação do Oracle Linux
Parte 4 - Configuração do Oracle Linux I
Parte 5 - Configuração do Oracle Linux II
Parte 6 - Clonagem da VM e criação dos disk image
Parte 7 – Configuração dos discos ASM e OCFS2
Parte 8 - Instalação do Oracle Clusterware
Parte 9 - Aplicação do Patch 10.2.0.5 no Oracle Clusterware
Parte 10 - Instalação Oracle Database 10g
Parte 11 - Aplicação do Patch 10.2.0.5 no Oracle Database
Parte 12 - Criação do Listener e ASM em modo cluster
Parte 13 - Criação do banco de dados

Na parte 7 do nosso artigo, vamos  aprender como configurar os discos apresentados para as VM 1 e 2 no post anterior.

Criando as partições

Ao todo foram 5 discos criados, sendo 4 de 5G que será para o ASM e 1 disco de 1G para o OCFS2. Através do comando fdisk -l podemos ver os discos apresentados em cada uma das máquinas. Lembre-se que esse comando deve ser executado como root, observe que a verificação é feita na máquina 1 (rac1) e depois na máquina 2 (rac2).

[root@rac1 ~]# fdisk -l

Disk /dev/sda: 16.1 GB, 16106127360 bytes
255 heads, 63 sectors/track, 1958 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        1827    14675346   83  Linux
/dev/sda2            1828        1958     1052257+  82  Linux swap / Solaris

Disk /dev/sdb: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdb doesn't contain a valid partition table

Disk /dev/sdc: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdc doesn't contain a valid partition table

Disk /dev/sdd: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdd doesn't contain a valid partition table

Disk /dev/sde: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sde doesn't contain a valid partition table

Disk /dev/sdf: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdf doesn't contain a valid partition table

[root@rac1 ~]# ssh rac2
The authenticity of host 'rac2 (10.0.0.20)' can't be established.
RSA key fingerprint is 86:5a:97:20:00:13:34:97:16:95:f1:4d:b5:ec:49:a4.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'rac2,10.0.0.20' (RSA) to the list of known hosts.
root@rac2's password:
Last login: Tue Sep 27 20:42:23 2011 from shadowy.lan

[root@rac2 ~]# fdisk -l

Disk /dev/sda: 16.1 GB, 16106127360 bytes
255 heads, 63 sectors/track, 1958 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        1827    14675346   83  Linux
/dev/sda2            1828        1958     1052257+  82  Linux swap / Solaris

Disk /dev/sdb: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdb doesn't contain a valid partition table

Disk /dev/sdc: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdc doesn't contain a valid partition table

Disk /dev/sdd: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdd doesn't contain a valid partition table

Disk /dev/sde: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sde doesn't contain a valid partition table

Disk /dev/sdf: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdf doesn't contain a valid partition table

Caso esteja tudo igual de uma máquina como na outra, vamos a criação das partições de cada um dos discos. O procedimento é muito simples e também é realizado com o comando fdisk executado como root. Vamos primeiro fazer na máquina 1:

 

Disco “/dev/sdb”

[root@rac1 ~]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-652, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-652, default 652):
Using default value 652

Command (m for help): p

Disk /dev/sdb: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1         652     5237158+  83  Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
[root@rac1 ~]#

 

Disco “/dev/sdc”

[root@rac1 ~]# fdisk /dev/sdc
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-652, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-652, default 652):
Using default value 652

Command (m for help): p

Disk /dev/sdc: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1         652     5237158+  83  Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
[root@rac1 ~]#

 

Disco “/dev/sdd”

[root@rac1 ~]# fdisk /dev/sdd
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-652, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-652, default 652):
Using default value 652

Command (m for help): p

Disk /dev/sdd: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               1         652     5237158+  83  Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
[root@rac1 ~]#

 

Disco “/dev/sde”

[root@rac1 ~]# fdisk /dev/sde
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-652, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-652, default 652):
Using default value 652

Command (m for help): p

Disk /dev/sde: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1               1         652     5237158+  83  Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
[root@rac1 ~]#

Feito o disco /dev/sde, temos os 4 discos do ASM criado a partição, agora é hora do disco do OCFS2 de 1G. O procedimento é o mesmo, só que agora vamos criar 2 partições, não 1 como estava sendo feito:

 

Disco “/dev/sdf”

[root@rac1 ~]# fdisk /dev/sdf

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-130, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-130, default 130): +512M

Command (m for help): p

Disk /dev/sdf: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdf1               1          63      506016   83  Linux

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (64-130, default 64):
Using default value 64
Last cylinder or +size or +sizeM or +sizeK (64-130, default 130):
Using default value 130

Command (m for help): p

Disk /dev/sdf: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdf1               1          63      506016   83  Linux
/dev/sdf2              64         130      538177+  83  Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

 

Vamos conferir o resultado:

[root@rac1 ~]# fdisk -l

Disk /dev/sda: 16.1 GB, 16106127360 bytes
255 heads, 63 sectors/track, 1958 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        1827    14675346   83  Linux
/dev/sda2            1828        1958     1052257+  82  Linux swap / Solaris

Disk /dev/sdb: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1         652     5237158+  83  Linux

Disk /dev/sdc: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1         652     5237158+  83  Linux

Disk /dev/sdd: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               1         652     5237158+  83  Linux

Disk /dev/sde: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1               1         652     5237158+  83  Linux

Disk /dev/sdf: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdf1               1          63      506016   83  Linux
/dev/sdf2              64         130      538177+  83  Linux
[root@rac1 ~]# ll /dev/sd*
brw-r----- 1 root disk 8,  0 Sep 27 20:37 /dev/sda
brw-r----- 1 root disk 8,  1 Sep 27 20:37 /dev/sda1
brw-r----- 1 root disk 8,  2 Sep 27 20:37 /dev/sda2
brw-r----- 1 root disk 8, 16 Sep 27 21:00 /dev/sdb
brw-r----- 1 root disk 8, 17 Sep 27 21:00 /dev/sdb1
brw-r----- 1 root disk 8, 32 Sep 27 21:01 /dev/sdc
brw-r----- 1 root disk 8, 33 Sep 27 21:01 /dev/sdc1
brw-r----- 1 root disk 8, 48 Sep 27 21:01 /dev/sdd
brw-r----- 1 root disk 8, 49 Sep 27 21:01 /dev/sdd1
brw-r----- 1 root disk 8, 64 Sep 27 21:01 /dev/sde
brw-r----- 1 root disk 8, 65 Sep 27 21:01 /dev/sde1
brw-r----- 1 root disk 8, 80 Sep 27 21:02 /dev/sdf
brw-r----- 1 root disk 8, 81 Sep 27 21:02 /dev/sdf1
brw-r----- 1 root disk 8, 82 Sep 27 21:02 /dev/sdf2

Com as partições criadas dos discos na VM 1, vamos fazer o procedimento parecido só que agora na máquina 2:

 

Disco “/dev/sdb”

[root@rac2 ~]# hostname
rac2.localdomain
[root@rac2 ~]#
[root@rac2 ~]# fdisk /dev/sdb

Command (m for help): p

Disk /dev/sdb: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1         652     5237158+  83  Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

[root@rac2 ~]#

 

Disco “/dev/sdc”

[root@rac2 ~]# fdisk /dev/sdc

Command (m for help): p

Disk /dev/sdc: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1         652     5237158+  83  Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

 

Disco “/dev/sdd”

[root@rac2 ~]# fdisk /dev/sdd

Command (m for help): p

Disk /dev/sdd: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               1         652     5237158+  83  Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

Syncing disks.

 

Disco “/dev/sde”

[root@rac2 ~]# fdisk /dev/sde

Command (m for help): p

Disk /dev/sde: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1               1         652     5237158+  83  Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

 

Disco “/dev/sdf”

[root@rac2 ~]# fdisk /dev/sdf

Command (m for help): p

Disk /dev/sdf: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdf1               1          63      506016   83  Linux
/dev/sdf2              64         130      538177+  83  Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

 

Conferindo na máquina 2:

[root@rac2 ~]# fdisk -l

Disk /dev/sda: 16.1 GB, 16106127360 bytes
255 heads, 63 sectors/track, 1958 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        1827    14675346   83  Linux
/dev/sda2            1828        1958     1052257+  82  Linux swap / Solaris

Disk /dev/sdb: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1         652     5237158+  83  Linux

Disk /dev/sdc: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1         652     5237158+  83  Linux

Disk /dev/sdd: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               1         652     5237158+  83  Linux

Disk /dev/sde: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1               1         652     5237158+  83  Linux

Disk /dev/sdf: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdf1               1          63      506016   83  Linux
/dev/sdf2              64         130      538177+  83  Linux

[root@rac2 ~]# ll /dev/sd*
brw-r----- 1 root disk 8,  0 Sep 27 20:37 /dev/sda
brw-r----- 1 root disk 8,  1 Sep 27 20:37 /dev/sda1
brw-r----- 1 root disk 8,  2 Sep 27 20:37 /dev/sda2
brw-r----- 1 root disk 8, 16 Sep 27 20:37 /dev/sdb
brw-r----- 1 root disk 8, 17 Sep 27 21:13 /dev/sdb1
brw-r----- 1 root disk 8, 32 Sep 27 20:37 /dev/sdc
brw-r----- 1 root disk 8, 33 Sep 27 21:13 /dev/sdc1
brw-r----- 1 root disk 8, 48 Sep 27 20:37 /dev/sdd
brw-r----- 1 root disk 8, 49 Sep 27 21:13 /dev/sdd1
brw-r----- 1 root disk 8, 64 Sep 27 20:37 /dev/sde
brw-r----- 1 root disk 8, 65 Sep 27 21:14 /dev/sde1
brw-r----- 1 root disk 8, 80 Sep 27 20:37 /dev/sdf
brw-r----- 1 root disk 8, 81 Sep 27 21:14 /dev/sdf1
brw-r----- 1 root disk 8, 82 Sep 27 21:14 /dev/sdf2

Discos ASM

As partições:

/dev/sdb1
/dev/sdc1
/dev/sdd1
/dev/sde1

Serão as partições que serão apresentadas ao ASM. Na parte 5 dessa séria de artigos foi instalado e configurado o ASMLib, agora é hora de aprender como utilizamos. O ASMLib nada mais é do que uma biblioteca que é capaz de pegar as partições brutas disponíveis no Linux a apresentar ao ASM. Vamos agora ver, como isso é feito:

[root@rac1 ~]# /etc/init.d/oracleasm createdisk DISK1 /dev/sdb1 
Marking disk "DISK1" as an ASM disk:                       [  OK  ]
[root@rac1 ~]# /etc/init.d/oracleasm createdisk DISK2 /dev/sdc1 
Marking disk "DISK2" as an ASM disk:                       [  OK  ]
[root@rac1 ~]# /etc/init.d/oracleasm createdisk DISK3 /dev/sdd1 
Marking disk "DISK3" as an ASM disk:                       [  OK  ]
[root@rac1 ~]# /etc/init.d/oracleasm createdisk DISK4 /dev/sde1 
Marking disk "DISK4" as an ASM disk:                       [  OK  ]

Vamos agora conferir, vamos listar os discos presentes no ASMLib:

[root@rac1 ~]# /etc/init.d/oracleasm listdisks
DISK1
DISK2
DISK3
DISK4

Na máquina 2 não é necessário criar os discos como foi feito na máquina 1. Veja como é feito na máquina 2:

[root@rac2 ~]# /etc/init.d/oracleasm scandisks
Scanning the system for Oracle ASMLib disks:               [  OK  ]
[root@rac2 ~]# /etc/init.d/oracleasm listdisks
DISK1
DISK2
DISK3
DISK4

Discos OCFS2

O primeiro passo aqui, é formatarmos as partições /dev/sdf1 e /dev/sdf2 para OCFS2. Vamos realizar essa operação na máquina 1.

[root@rac1 ~]# mkfs.ocfs2 -L ocr_disk /dev/sdf1
mkfs.ocfs2 1.4.3
Cluster stack: classic o2cb
Filesystem label=ocr_disk
Block size=1024 (bits=10)
Cluster size=4096 (bits=12)
Volume size=518160384 (126504 clusters) (506016 blocks)
17 cluster groups (tail covers 3624 clusters, rest cover 7680 clusters)
Journal size=16777216
Initial number of node slots: 2
Creating bitmaps: done
Initializing superblock: done
Writing system files: done
Writing superblock: done
Writing backup superblock: 0 block(s)
Formatting Journals: done
Formatting slot map: done
Writing lost+found: done
mkfs.ocfs2 successful

[root@rac1 ~]# mkfs.ocfs2 -L vote_disk /dev/sdf2
mkfs.ocfs2 1.4.3
Cluster stack: classic o2cb
Filesystem label=vote_disk
Block size=2048 (bits=11)
Cluster size=4096 (bits=12)
Volume size=551092224 (134544 clusters) (269088 blocks)
9 cluster groups (tail covers 7568 clusters, rest cover 15872 clusters)
Journal size=33554432
Initial number of node slots: 2
Creating bitmaps: done
Initializing superblock: done
Writing system files: done
Writing superblock: done
Writing backup superblock: 0 block(s)
Formatting Journals: done
Formatting slot map: done
Writing lost+found: done
mkfs.ocfs2 successful

Como esse será um ambiente OCFS2 clusterizado, em que a máquina 1 e a máquina 2 estará escrevendo e lendo o mesmo disco OCFS montado, será necessário configurarmos o OCFS2 para poder operar em modo cluster. Para isso crie o arquivo /etc/ocfs2/cluster.conf e adicione as seguintes linhas abaixos, como demonstro na máquina 1. O procedimento deve ser feito também na máquina 2.

[root@rac1 ~]# mkdir /etc/ocfs2
[root@rac1 ~]# vi /etc/ocfs2/cluster.conf
cluster:
     node_count = 2
     name = ocfs2

node:
     ip_port = 7777
     ip_address = 10.0.0.10
     number = 1
     name = rac1
     cluster = ocfs2

node:
     ip_port = 7777
     ip_address = 10.0.0.20
     number = 2
     name = rac2
     cluster = ocfs2

Feitos os passos acimas vamos as configurações finais do OCFS2. Aqui vou demonstrar somente da máquina rac1 porém deve ser feito também na máquina rac2.

[root@rac1 ~]# /etc/init.d/o2cb configure
Configuring the O2CB driver.

This will configure the on-boot properties of the O2CB driver.
The following questions will determine whether the driver is loaded on
boot.  The current values will be shown in brackets ('[]').  Hitting
 without typing an answer will keep that current value.  Ctrl-C
will abort.

Load O2CB driver on boot (y/n) [y]: y
Cluster stack backing O2CB [o2cb]:
Cluster to start on boot (Enter "none" to clear) [ocfs2]:
Specify heartbeat dead threshold (>=7) [31]:
Specify network idle timeout in ms (>=5000) [30000]:
Specify network keepalive delay in ms (>=1000) [2000]:
Specify network reconnect delay in ms (>=2000) [2000]:
Writing O2CB configuration: OK
Starting O2CB cluster ocfs2: OK
[root@rac1 ~]# /etc/init.d/o2cb load
[root@rac1 ~]# /etc/init.d/o2cb online

Para que as partições OCR e VOTING  sejam montadas automaticamente quando a máquina iniciar, coloque as duas linhas abaixo no final do arquivo /etc/fstab, isso nas máquinas 1 e 2.

LABEL=ocr_disk          /ocr                         ocfs2   _netdev,datavolume,nointr       0 0
LABEL=vote_disk         /voting                      ocfs2   _netdev,datavolume,nointr       0 0

Também crie os arquivos /ocr e /voting como mostrado a abaixo, lembrando que o procedimento deve ser feito também na máquina 2.

[root@rac1 ~]# mkdir /ocr
[root@rac1 ~]# mkdir /voting

Após feitos os passos acima sem qualquer problema podemos montar as nossas duas partições de OCFS2 onde irá comportar o OCR e o VOTING.

[root@rac1 ~]# mount -a

Repita na máquina 2

[root@rac2 ~]# mount -a

Agora sim nossa partição está montada:

[root@rac1 ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              14G  2.1G   11G  16% /
tmpfs                 252M     0  252M   0% /dev/shm
/dev/sdf1             495M   35M  460M   7% /ocr
/dev/sdf2             526M   73M  453M  14% /voting
[root@rac1 ~]# mount |grep ocfs2
ocfs2_dlmfs on /dlm type ocfs2_dlmfs (rw)
/dev/sdf1 on /ocr type ocfs2 (rw,_netdev,datavolume,nointr,heartbeat=local)
/dev/sdf2 on /voting type ocfs2 (rw,_netdev,datavolume,nointr,heartbeat=local)

[root@rac2 ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              14G  2.1G   11G  16% /
tmpfs                 252M     0  252M   0% /dev/shm
/dev/sdf1             495M   35M  460M   7% /ocr
/dev/sdf2             526M   73M  453M  14% /voting
[root@rac2 ~]# mount |grep ocfs2
ocfs2_dlmfs on /dlm type ocfs2_dlmfs (rw)
/dev/sdf1 on /ocr type ocfs2 (rw,_netdev,datavolume,nointr,heartbeat=local)
/dev/sdf2 on /voting type ocfs2 (rw,_netdev,datavolume,nointr,heartbeat=local)

Para finalizar vamos já definir as permissões necessárias para o OCR e o VOTING, aqui demonstro somente da máquina 1 porém deve ser executado também na máquina 2.

[root@rac1 ~]# chown oracle:oinstall /ocr
[root@rac1 ~]# chown oracle:oinstall /voting
[root@rac1 ~]# chmod 775 /ocr
[root@rac1 ~]# chmod 775 /voting

12 comments on “Instalação Oracle RAC 10g com VirtualBox – Parte 7

  1. Pingback: Blog Flávio Soares » Instalação Oracle RAC 10g com VirtualBox – Parte 5

  2. Pingback: Blog Flávio Soares » Instalação Oracle RAC 10g com VirtualBox – Parte 6

  3. Rodrigo on said:

    Esse tutorial ta muito bem feito.Esperando as proximas partes vlw

  4. Pingback: Blog Flávio Soares » Instalação Oracle RAC 10g com VirtualBox – Parte 8

  5. Pingback: Blog Flávio Soares » Instalação Oracle RAC 10g com VirtualBox – Parte 4

  6. Pingback: Blog Flávio Soares » Instalação Oracle RAC 10g com VirtualBox – Parte 9

  7. Pingback: Blog Flávio Soares » Instalação Oracle RAC 10g com VirtualBox – Parte 2

  8. Pingback: Blog Flávio Soares » Instalação Oracle RAC 10g com VirtualBox – Parte 1

  9. Pingback: Blog Flávio Soares » Instalação Oracle RAC 10g com VirtualBox – Parte 11

  10. Pingback: Blog Flávio Soares » Instalação Oracle RAC 10g com VirtualBox – Parte 3

  11. Pingback: Blog Flávio Soares » Instalação Oracle RAC 10g com VirtualBox – Parte 13

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*