Seguimos con la seria de la instalación de un Oracle 26ai , ahora vamos a por el ASM
El appliance en el que estoy usando de laboratorio es bastante raquítico, con un pequeño disco de 100Gb, por lo que habra que apañarse con lo que tenemos,.
Mi configuracion de disco es :
[root@gigabyte u01]# fdisk -l Disk /dev/sda: 111.79 GiB, 120034123776 bytes, 234441648 sectors Disk model: KINGSTON SUV400S Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disklabel type: dos Disk identifier: 0x00fde38f Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 156250111 156248064 74.5G 83 Linux /dev/sda2 156250112 181415935 25165824 12G 82 Linux swap / Solaris
Asi que vamos a crear dos discos pequeños de 5 Gb que pondremos en /dev/sda3 y /dev/sda4 para poder hacer ver que tenemos un DATA y FRA , el disco quedará:
[root@gigabyte ~]# fdisk -l Disk /dev/sda: 111.79 GiB, 120034123776 bytes, 234441648 sectors Disk model: KINGSTON SUV400S Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disklabel type: dos Disk identifier: 0x00fde38f Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 156250111 156248064 74.5G 83 Linux /dev/sda2 156250112 181415935 25165824 12G 82 Linux swap / Solaris /dev/sda3 181415936 191180799 9764864 4.7G 83 Linux /dev/sda4 191180800 200945663 9764864 4.7G 83 Linux
Descargaremos el asmlib desde
https://www.oracle.com/linux/downloads/linux-asmlib-v9-downloads.html e instalaremos los paquetes.
Una vez instalados,configuraremos el orcleasm
[root@gigabyte ~]# oracleasm configure -i
Configuring the Oracle ASM system service.
This will configure the on-boot properties of the Oracle ASM system
service. The following questions will determine whether the service
is started 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 ASM disk devices []: grid
Default group to own the ASM disk devices []: asmdba
Start Oracle ASM system service on boot (y/n) [y]: y
Scan for Oracle ASM disks when starting the oracleasm service (y/n) [y]: y
Maximum number of ASM disks that can be used on system [2048]:
Enable iofilter if kernel supports it (y/n) [y]: y
Writing Oracle ASM system service configuration: done
Configuration changes only come into effect after the Oracle ASM
system service is restarted. Please run 'systemctl restart oracleasm'
after making changes.
WARNING: All of your Oracle and ASM instances must be stopped prior
to restarting the oracleasm service.
[root@gigabyte ~]# systemctl stop oracleasm
[root@gigabyte ~]# systemctl start oracleasm
[root@gigabyte ~]# systemctl status oracleasm
● oracleasm.service - Oracle ASM Service
Loaded: loaded (/usr/lib/systemd/system/oracleasm.service; enabled; preset: disabled)
Active: active (exited) since Wed 2026-01-28 17:06:33 CET; 4s ago
Process: 5027 ExecStartPre=/usr/bin/udevadm settle -t 120 (code=exited, status=0/SUCCESS)
Process: 5028 ExecStart=/usr/sbin/oracleasm.init start (code=exited, status=0/SUCCESS)
Main PID: 5028 (code=exited, status=0/SUCCESS)
CPU: 378ms
Jan 28 17:06:33 gigabyte.pamplona.name systemd[1]: Starting Oracle ASM Service...
Jan 28 17:06:33 gigabyte.pamplona.name oracleasm.init[5042]: Mounting oracleasm driver filesystem: Not applicable with UEK8
Jan 28 17:06:33 gigabyte.pamplona.name oracleasm.init[5053]: Reloading disk partitions: done
Jan 28 17:06:33 gigabyte.pamplona.name oracleasm.init[5053]: Cleaning any stale ASM disks...
Jan 28 17:06:33 gigabyte.pamplona.name oracleasm.init[5053]: Setting up iofilter map for ASM disks: done
Jan 28 17:06:33 gigabyte.pamplona.name oracleasm.init[5065]: Scanning system for ASM disks...
Jan 28 17:06:33 gigabyte.pamplona.name oracleasm.init[5081]: Disk scan successful
Jan 28 17:06:33 gigabyte.pamplona.name systemd[1]: Finished Oracle ASM Service.
Como formatear los discos
crearemos los discos, en mi caso, al ser un pequeño sistema de prueba,estos han de ser particiones en un disco, en el caso de produccion,creariamos una particion única para cada disco.
[root@gigabyte ~]# oracleasm createdisk DATA01 /dev/sda3 Writing disk header: done Instantiating disk: done [root@gigabyte ~]# oracleasm createdisk FRA01 /dev/sda4 Writing disk header: done Instantiating disk: done [root@gigabyte ~]# oracleasm scandisks Reloading disk partitions: done Cleaning any stale ASM disks... Setting up iofilter map for ASM disks: done Scanning system for ASM disks... [root@gigabyte ~]# oracleasm listdisks DATA01 FRA01
Evitar problemas con SElinux
Para evitar problemas en los siguientes pasos con con SeLinux, ejecutaremos :
semanage fcontext -a -e /bin /u01/app/grid/bin semanage fcontext -a -e /lib /u01/app/grid/lib semanage fcontext -a -e /etc /etc/oracle/scls_scr
Configurar el CRS/HAS
Una vez tenemos los discos creados, procederemos a configurar el CRS,para eso, como root
ejecutaremos:
[root@gigabyte ~]# export GI_HOME=/u01/app/grid [root@gigabyte ~]# $GI_HOME/perl/bin/perl -I $GI_HOME/perl/lib -I $GI_HOME/crs/install $GI_HOME/crs/install/roothas.pl Using configuration parameter file: /u01/app/grid/crs/install/crsconfig_params The log of current session can be found at: /u01/app/oracle/crsdata/gigabyte/crsconfig/roothas_2026-01-28_05-21-47PM.log 2026/01/28 17:21:52 CLSRSC-363: User ignored prerequisites during installation LOCAL ADD MODE Creating OCR keys for user 'grid', privgrp 'oinstall'.. Operation successful. 2026/01/28 17:23:12 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service' gigabyte 2026/01/28 17:25:07 /u01/app/oracle/crsdata/gigabyte/olr/backup_20260128_172507.olr 2107015493 2026/01/28 17:25:09 CLSRSC-327: Successfully configured Oracle Restart for a standalone server
configuracion de oracle net
Como usuario grid iremos a $ORACLE_HOME/network/admin y crearemos los ficheros
sqlnet.ora
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT) DIAG_ADR_ENABLED=ON SQLNET.EXPIRE_TIME= 10 SQLNET.INBOUND_CONNECT_TIMEOUT=60
listener.ora>
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = gigabyte.pamplona.name)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
USE_SID_AS_SERVICE_LISTENER=ON
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON
VALID_NODE_CHECKING_REGISTRATION_LISTENER=ON
LOG_FILE_SIZE_LISTENER=50
LOG_FILE_NUM_LISTENER=365
Y despues, crearemos el servicio del listner
grid@gigabyte admin]$ $GI_HOME/bin/srvctl add listener -listener LISTENER -oraclehome $GI_HOME
grid@gigabyte admin]$ $GI_HOME/bin/srvctl start listener
[grid@gigabyte admin]$ $GI_HOME/bin/crsctl stat res -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
ONLINE ONLINE gigabyte STABLE
ora.ons
OFFLINE OFFLINE gigabyte STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
1 OFFLINE OFFLINE STABLE
ora.diskmon
1 OFFLINE OFFLINE STABLE
ora.evmd
1 ONLINE ONLINE gigabyte STABLE
--------------------------------------------------------------------------------
creacion del ASM
Ahora crearemos el ASM con:
[grid@gigabyte admin]$ $GI_HOME/bin/asmca -silent \
-configureASM \
-sysAsmPassword CHANGE.me.26ai \
-asmsnmpPassword CHANGE.me.26ai \
-diskString "ORCL:*" \
-diskGroupName DATA \
-disk "ORCL:DATA*" \
-param ASM_POWER_LIMIT=1 \
-param DIAGNOSTIC_DEST=$ORACLE_BASE \
-param AUDIT_SYS_OPERATIONS=TRUE \
-redundancy EXTERNAL
ASM has been created and started successfully.
[DBT-30001] Disk groups created successfully. Check /u01/app/oracle/cfgtoollogs/asmca/asmca-260128PM053656.log for details.
Luego, craremos los otros diskgroups al estilo de
$GI_HOME/bin/asmca -silent \
-createDiskGroup \
-sysAsmPassword CHANGE.me.26ai \
-asmsnmpPassword CHANGE.me.26ai \
-diskString "ORCL:*" \
-diskGroupName FRA \
-disk "ORCL:FRA*" \
-param ASM_POWER_LIMIT=1 \
-param DIAGNOSTIC_DEST=$ORACLE_BASE \
-param AUDIT_SYS_OPERATIONS=TRUE \
-redundancy EXTERNAL
[DBT-30001] Disk groups created successfully. Check /u01/app/oracle/cfgtoollogs/asmca/asmca-260128PM053938.log for details.
Con esto, ya tendremos el asm creado e instalado en nuestra versio
[grid@gigabyte admin]$ crsctl stat res -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
ONLINE ONLINE gigabyte STABLE
ora.FRA.dg
ONLINE ONLINE gigabyte STABLE
ora.LISTENER.lsnr
ONLINE ONLINE gigabyte STABLE
ora.asm
ONLINE ONLINE gigabyte Started,STABLE
ora.ons
OFFLINE OFFLINE gigabyte STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
1 ONLINE ONLINE gigabyte STABLE
ora.diskmon
1 OFFLINE OFFLINE STABLE
ora.evmd
1 ONLINE ONLINE gigabyte STABLE
--------------------------------------------------------------------------------
[grid@gigabyte admin]$ asmcmd lsdg
State Type Rebal Sector Logical_Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
MOUNTED EXTERN N 512 512 4096 1048576 4768 4701 0 4701 0 N DATA/
MOUNTED EXTERN N 512 512 4096 1048576 4768 4704 0 4704 0 N FRA/
Siguiente paso.. creación de una base de datos 26ai

