Configurar ORACLEASM con discos compartidos iSCSI en RHEL/CentOS/SL/OL 6
Instalacion de paquetes necesarios
Primero debemos bajar los rpm de la página de Oracle. http://www.oracle.com/technetwork/server-storage/linux/asmlib/rhel6-1940776.html
- oracleasm-support-2.1.8-1.el6.x86_64.rpm
- oracleasmlib-2.0.4-1.el6.x86_64.rpm
Debemos copiar dichos .rpm al servidor. Una vez que copiamos procedemos Instalar.
yum localinstall /root/oracleasm*rpm
Si la instalacion actualiza el kernel, se debe reiniciar el equipo.
Prepara los discos
Para utilizar los discos es necesario crear un particion del tipo Linux
fdisk -cu /dev/sdb
Configurar el oracleasm
Para la configuracion del asm utilizamos el comando oracleasm
[root@nodo1 ~]# oracleasm configure -i
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following 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 without typing an
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []: oracle12
Default group to own the driver interface []: asmadmin
Start Oracle ASM library driver on boot (y/n) [n]: [ENTER]
Scan for Oracle ASM disks on boot (y/n) [y]: [ENTER]
Writing Oracle ASM library driver configuration: done
Una vez configurado procemos a iniciar el oracleasm
“
[root@nodo1 ~]# oracleasm init
Creating /dev/oracleasm mount point: /dev/oracleasm
Loading module "oracleasm": oracleasm
Configuring "oracleasm" to use device physical block size
Mounting ASMlib driver filesystem: /dev/oracleasm
### Crear los dispositivos ASM
La creacion de los dispositivos ASM se debe realizar en uno de los nodos y luego ejecutar el comando <code>oracleasm scandisks</code>
[root@nodo1 ~]# oracleasm createdisk VOTE_OCR00 /dev/sdb1
Writing disk header: done
Instantiating disk: done
[root@nodo1 ~]# oracleasm createdisk DISK1 /dev/sdc1
Writing disk header: done
Instantiating disk: done
En el equipo que es el cluster repetir los pasos hasta el inicio del oracleasm (Paso 5) sin hacer el paso 3.
Buscar y listar los discos
[root@nodo2 ~]# oracleasm configure -i
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following 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 without typing an
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []: oracle12
Default group to own the driver interface []: asmadmin
Start Oracle ASM library driver on boot (y/n) [n]:
Scan for Oracle ASM disks on boot (y/n) [y]:
Writing Oracle ASM library driver configuration: done
[root@nodo2 ~]# oracleasm init
Creating /dev/oracleasm mount point: /dev/oracleasm
Loading module "oracleasm": oracleasm
Configuring "oracleasm" to use device physical block size
Mounting ASMlib driver filesystem: /dev/oracleasm
[root@nodo2 ~]# oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks…
Scanning system for ASM disks…
Instantiating disk "VOTE_OCR00"
Instantiating disk "DISK1"
[root@nodo2 ~]# oracleasm listdisks
DISK1
VOTE_OCR00
Activar el servicio en todos los nodos
chkconfig oracleasm on