Showing posts with label oracleasm. Show all posts
Showing posts with label oracleasm. Show all posts

Thursday, 20 February 2020


APPLIES TO:

Linux OS - Version Oracle Linux 6.9 and later
Oracle Cloud Infrastructure - Version N/A and later
Information in this document applies to any platform.

SYMPTOMS

On : Oracle Linux 7.1 version, OracleASM linux kernel module

ACTUAL BEHAVIOR
---------------
Planning to install 12c clusterware on 2 node RAC environment .ASM is configured for auto startup.

/etc/init.d/oracleasm listdisks is not showing any ASM disks after node reboot.

EXPECTED BEHAVIOR
-----------------------
expect the listdisk command to show output

STEPS
-----------------------
The issue can be reproduced at will with the following steps:
1. install asmlib modules
2. boot the system
3. verify available disks using /etc/init.d/oracleasm listdisks

CHANGES


CAUSE

Oracleasm is run before the FC or iSCSI storage is fully initialized/seen by the server


 

SOLUTION

1. add a sleep in the oracleasm initscript. In the example below a 10 second sleep is used. However, this can vary.

( /etc/init.d/oracleasm )

example :
echo -n "Initializing the Oracle ASMLib driver: "
logger "Initializing the Oracle ASMLib driver"
  echo "Sleeping for 10 seconds, waiting for disk discovery to finish"
  logger "Sleeping for 10 seconds, waiting for disk discovery to finish"
  sleep 10
"${ORACLEASM}" init -l "${ORACLE_ASMMANAGER}" -v 1>>/var/log/oracleasm 2>&1
if_fail "$?" "Unable to initialize the ASMlib driver, see /var/log/oracleasm"
Remark:
http://docs.oracle.com/cd/E52668_01/E52507/html/uek3_known_issues.html
<<
Only use the init script to start and stop the oracleasm service. All other options, such as scandisks, listdisk, and createdisk, are deprecated. For these and other administrative tasks, use /usr/sbin/oracleasm instead
>>
An alternate solution is available in Oracle Linux 7: ASM Disks Created on FCOE Target Disks are Not Visible After System Reboot

APPLIES TO:

Linux OS - Version Oracle Linux 6.0 and later
Oracle Database - Enterprise Edition - Version 12.2.0.1 to 12.2.0.1 [Release 12.2]
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Linux x86-64
ASM disks that were previously available are no longer visible after a system reboot. Other systems in the cluster that have not been rebooted still see the disks

SYMPTOMS

 The command "/etc/init.d/oracleasm listdisks" does not show previously available disks after rebooting the systems.  The disk may still be available to other systems in the cluster that have not been rebooted.  This will depend on the cause of the problem.

CHANGES

 Changes in the system that might cause such an action.
  1. The disk has been removed from presentation to the system from the SAN
  2. Someone removed the label on the disk using the command "oracleasm deletedisk"

CAUSE

  1.  If the disk is not present in multipath or is not available as a local disk, it cannot be scanned or listed
  2.  If the ASM label has been remove from the disk either intentionally or by corruption, ASMLib will not be able to create the device for the disk since it cannot be identified.

SOLUTION

In the first scenario, you will need to check for the disk presence either using the command "multipath -ll" or checking the local drives to be sure the disk is present on the system
The way to identify if the label is no longer on the disk, you will need to use the command "od" (octal dump) to dump the first part of the partition header to see if the label has been removed.
When a disk device supports partitioning (eg, with fdisk(8) or parted(8)), oracleasm-createdisk(8) will refuse to consider the entire unpartitioned disk.  The disk must be partitioned and that partition be marked for ASM use.

To check the label on the partition to be sure it has not been wiped out, use the following command on the partition to check if the label is there.

 See the example below:
# od -c -N 120 /dev/mapper/<device mapper alias>p1
0000000  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0   E   B   \   T
0000020  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000040   O   R   C   L   D   I   S   K   A   S   M   T   E   S   T   L
0000060   A   B   E   L  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000100  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
*
0000160  \0  \0  \0  \0  \0  \0  \0  \0
0000170

If the label is there, it will start with the characters "ORCLDISK" + followed by the actual label. As in this example, the label is "ASMTESTLABEL"
========================================================================

If the prefix "ORCLDISK" is there, but the data after it is blank, the label has
been erased and you will need to use the command:
# /usr/sbin/oracleasm renamedisk -f /dev/<Device-Partition> <correct label>

If the prefix "ORCLDISK" is not there as in the following example:
# od -c -N 120 /dev/mapper/<device mapper alias>p1
0000000 353   v 220   E   X   F   A   T              \0  \0  \0  \0  \0
0000020  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
*
0000100  \0  \b  \0  \0  \0  \0  \0  \0  \0   H   8   :  \0  \0  \0  \0
0000120  \0  \b  \0  \0  \0   u  \0  \0  \0 200  \0  \0 310   7   :  \0
0000140  \a  \0  \0  \0   L   9 345 332  \0 001  \0  \0  \t  \b 001 200
0000160  \0  \0  \0  \0  \0  \0  \0  \0
0000170

then you will need to create the disk label as in the following example:
# /usr/sbin/oracleasm createdisk <label> <device>
See the example below:

# /usr/sbin/oracleasm createdisk ASMTESTLABEL /dev/mapper/<device mapper alias>p1

Once the disks have been renamed/createed, you may need to perform a scan disk to reread the disk labels using the command:
# /usr/sbin/oracleasm scandisks
Scanning the system for Oracle ASMLib disks:               [  OK  ]

Then run the following command to confirm:
# /usr/sbin/oracleasm listdisks
ASMTESTLABEL

APPLIES TO:

Linux OS - Version Oracle Linux 5.0 and later
Linux x86
Linux x86-64

SYMPTOMS

System:
# uname -a ; rpm -qa |grep oracleasm
Linux el5pvHAguest 2.6.18-92.1.17.0.1.el5xen #1 SMP Tue Nov 4 16:01:14 EST 2008 i686 i686 i386 GNU/Linux

oracleasmlib-2.0.3-1.el5
oracleasm-2.6.18-92.1.17.0.1.el5xen-2.0.5-1.el5
oracleasm-support-2.1.0-5.el5
#    


Scandisk returns no message:
# /etc/init.d/oracleasm scandisks
Scanning the system for Oracle ASMLib disks: [ OK ]
#

Tailing the /var/log/oracleasm log:
# tail -f /var/log/oracleasm
oracleasm-read-label: Unable to open device "/dev/dm-1": No such file or directory
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
Disk "VOLDATA001" does not exist or is not instantiated
Instantiating disk "VOLDATA001"
Unable to instantiate disk "VOLDATA001"

Note with with oracleasm-support 2.1 you can also use the oraclasm binary, from /usr/share/doc/oracleasm-support-2.1.0/ReleaseNotes:
New in 2.1.0
------------
* There is a new '/usr/sbin/oracleasm' command that provides a much more
flexible interface to the oracleasm support software. oracleasm
operations are subcommands for the 'oracleasm' program. The
/etc/init.d/oracleasm script now uses the 'oracleasm' program as well.
All new features are accessed by using the new 'oracleasm' command.


Using the new oracleasm binary you see:
# /usr/sbin/oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
Instantiating disk "VOLDATA001"
Unable to instantiate disk "VOLDATA001"
Instantiating disk "VOLDATA001"
Unable to instantiate disk "VOLDATA001"
Instantiating disk "VOLDATA001"
Unable to instantiate disk "VOLDATA001"
#
#
# /usr/sbin/oracleasm listdisks
#

CAUSE

The the driver is not loaded and "/etc/init.d/oracleasm configure" had not been completed.
This was seen when a second system was being configured, but oracleasm was not loaded/configured.

SOLUTION

1. Configure oracleasm which will also load driver , for example:
# /etc/init.d/oracleasm configure
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 <ENTER> without typing an
answer will keep that current value.  Ctrl-C will abort.

Default user to own the driver interface [root]:
Default group to own the driver interface [root]:
Start Oracle ASM library driver on boot (y/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  ]
#
#
# /etc/init.d/oracleasm listdisks
VOLDATA001
#                

About

Privacy Policy

ShortNewsWeb

Blog Archive

Recent Comments

Popular Posts

Translate

My Blog List

Popular

System Admin Share

Total Pageviews