• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

ASMLib-Managed Disks on Multipathed iSCSI Targets are not Discovered after Server Reboot in CentOS/RHEL 7

by admin

The Problem

Oracle Real Application Clusters (RAC) servers run on CentOS/RHEL 7 and utilizing ASMLib-managed iSCSI multipathed disks. Upon server reboot, Oracle ASMLib disks are not automatically discovered at boot time causing Oracle Cluster Ready Services (CRS) to fail to start. ASM disks are, however, correctly discovered when manually running the oracleasm scandisks command soon after the server reboot.

Following is the oracleasm configuration

# cat /etc/sysconfig/oracleasm
...
ORACLEASM_ENABLED=true
ORACLEASM_UID=oracle
ORACLEASM_GID=dba
ORACLEASM_SCANBOOT=true
ORACLEASM_SCANORDER=""
ORACLEASM_SCANEXCLUDE=""
ORACLEASM_USE_LOGICAL_BLOCK_SIZE=false
...
# cat -n /usr/lib/systemd/system/oracleasm.service
1 [Unit]
2 Description=Load oracleasm Modules
3 Requires=multipathd.service
4 After=multipathd.service
...

The Solution

Reviewing system startup messages within the system log (/var/log/messages), it is evident that:
– oracleasm.service starts before iscsid.service completes making all iSCSI targets fully available/operational and before multipathd.service adds at least one path to iSCSI targets.
– the ohasd.service starts after oracleasm.service but no ASM disks are discovered.

Modify file /usr/lib/systemd/system/oracleasm.service and append both the ‘Requires‘ and ‘After‘ lines with iscsid.service multi-user.target to ensure the oracleasm.service starts after completion of iscsid.service and multipathd.service and after multi-user.target has been reached i.e.:

# cat -n /usr/lib/systemd/system/oracleasm.service
1 [Unit]
2 Description=Load oracleasm Modules
3 Requires=multipathd.service iscsid.service multi-user.target
4 After=multipathd.service iscsid.service multi-user.target
...

Modify file /etc/systemd/system/oracle-ohasd.service – append the ‘After‘ line with oracleasm.service to ensure the CRS ohasd.service starts after oracleasm.service has successfully discovered all iSCSI multipathed ASM disks i.e.:

# cat -n /etc/systemd/system/oracle-ohasd.service
...
5 [Unit]
6 Description=Oracle High Availability Services
7 After=syslog.target network-online.target remote-fs.target oracleasm.service
...
Note: if /etc/systemd/system/oracle-ohasd.service is not available then please do refer /etc/systemd/system/ohasd.service which provides similar functionality.

Filed Under: ASM, CentOS/RHEL 7, Linux, oracle

Some more articles you might also be interested in …

  1. How to truncate /var/log/lastlog File
  2. How to determine file and free space fragmentation of OCFS2
  3. How to Debug systemd boot process in CentOS/RHEL 7 and 8
  4. How to activate and mount 2 Volume groups with same names in CentOS/RHEL
  5. Understanding DNS zone files
  6. adduser Command Examples in Linux
  7. How to solve ORA-28000: the account is locked
  8. Understanding MySQL Privileges
  9. How To Increase The Retention Of “sar” Data To ‘N’ Days in Linux
  10. route Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • qemu-system-x86_64: command not found
  • timedatectl: command not found
  • mpirun.openmpi: command not found
  • startkde: command not found

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright