Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Cannot add a block device as ASM Disk

sumeetp45Jan 13 2010 — edited May 4 2010
Hello all,

I have a SUSE linux 2.6 kernel machine with Oracle Database 10g Enterprise Edition Release 10.1.0.3.0

On this machine, using device-mapper, i have multipath to the array luns. Using udev and a simple rule, i created a device.

But when i try to add this block device as ASM disk, it fails.

I have pasted below all the details. It will be very helpful, if someone can please take a look and suggest on what I'm doing wrong.


dell2800lin1:~ # raw -qa
/dev/raw/raw50: bound to major 8, minor 160
/dev/raw/raw51: bound to major 253, minor 3
dell2800lin1:~ # ls -l /dev/raw/raw51
crwxrwxrwx 1 oracle oinstall 162, 51 Jan 12 15:20 /dev/raw/raw51
dell2800lin1:~ #

oracle@dell2800lin1:~> ls -l /dev/dm-3
brwxrwxrwx 1 oracle oinstall 253, 3 2010-01-11 22:04 /dev/dm-3
oracle@dell2800lin1:~> ls -l /dev/sp_asm_disk
brwxrwxrwx 1 oracle oinstall 253, 3 2010-01-11 22:02 /dev/sp_asm_disk
oracle@dell2800lin1:~> cat /etc/udev/rules.d/10-local.rules
KERNEL=="dm-3", NAME="sp_asm_disk"
oracle@dell2800lin1:~>


SQL> show parameter asm_diskstring;

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
asm_diskstring string /dev/sp_asm_disk, /dev/raw/raw
*
SQL>
SQL> select name, path, group_number from v$asm_disk;

NAME
------------------------------
PATH
--------------------------------------------------------------------------------
GROUP_NUMBER
------------

/dev/raw/raw51
0

TESTDG_0000
/dev/raw/raw50
1

NAME
------------------------------
PATH
--------------------------------------------------------------------------------
GROUP_NUMBER
------------


SQL>
SQL> CREATE DISKGROUP udev_dg external redundancy disk '/dev/sp_asm_disk';
CREATE DISKGROUP udev_dg external redundancy disk '/dev/sp_asm_disk'
*
ERROR at line 1:
ORA-15018: diskgroup cannot be created
ORA-15031: disk specification '/dev/sp_asm_disk' matches no disks
ORA-15025: could not open disk '/dev/sp_asm_disk'
ORA-15059: invalid device type for ASM disk
Linux Error: 24576: Unknown system error
Additional information: 42
Additional information: -1080161616


SQL>

Comments

Ronny Egner
Hi,

if i remember correctly in order to use a disk in 10g R1 you had to do:

1. Create a raw binding for the disk (you´ve done that)
2. Label the disk with "oracleasm createdisk" (you haven´t done this)
3. Create the disk group

--
Ronny Egner
My blog: http://blog.ronnyegner-consulting.de
sumeetp45
Hi,
Thanks for the reply.

You mean to execute /etc/init.d/oracleasm createdisk ??

But on my machine, there isn't any oracleasm in init.d directory.

Further, i just tried creating the disk using the /dev/raw/raw51 character device and that worked fine. But nothing seems to work with when i use /dev/sp_asm_disk

Please some help.

~Sumeet.
Ronny Egner
Just enter "oracleasm createdisk".... it should do the trick.

Prior using the disk you need to label it as an ASM disk with the command above.
Further, i just tried creating the disk using the /dev/raw/raw51 character device and that worked fine. But nothing seems to work with when i use /dev/sp_asm_disk
As i stated: 10g R1 requires raw disks rather than block devices (such as /dev/sd? or /dev/sp_asm_disk). This changed with 10g R2 and higher.

--
Ronny Egner
My blog: http://blog.ronnyegner-consulting.de
sumeetp45
Hello Ronny,

It didn't work.

oracle@dell2800lin1:~> id
uid=103(oracle) gid=106(oinstall) groups=6(disk),106(oinstall),107(dba)
oracle@dell2800lin1:~> pwd
/opt/oracle
oracle@dell2800lin1:~> oracleasm createdisk
-bash: oracleasm: command not found
oracle@dell2800lin1:~> find . -name oracleasm
oracle@dell2800lin1:~>

Any other pointers.

~Sumeet.
sumeetp45
I managed to create another setup on a RHEL box with Oracle 11gR2

Here too the ASM DG fails when I try to use a block udev device

[root@dell2950-5 ~]# ls -l /dev/udev_asm_disk
brwxrwxrwx 1 oracle dba 120, 48 Jan 12 16:23 /dev/udev_asm_disk
[root@dell2950-5 ~]# ls -l /dev/emcpowerd
brwxrwxrwx 1 oracle dba 120, 48 Jan 13 11:48 /dev/emcpowerd

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production

Also, this host to doesn't have oracleasm. I'm not an expert with Oracle DBA, just picking up, so someone please help me out.
Ronny Egner
It seems you did not install all oracleasm-RPMs (in total this are three RPMs: oracleasmsupport, oracleasmlib, oracleasm-<kernel-version>)

Follow this guide here: http://blog.ronnyegner-consulting.de/oracle-11g-release-2-install-guide and especially the ASM part[ here |http://blog.ronnyegner-consulting.de/2009/09/14/oracle-11g-release-2-install-guide-%E2%80%93-grid-infrastructure-installation/]

With 11g R2 you can use /dev/emcpowerX directly without any raw device binding.


--
Ronny Egner
My blog: http://blog.ronnyegner-consulting.de

Edited by: Ronny Egner on Jan 13, 2010 10:10 AM
770754
Sumeeth,

i am not sure if your issue is still present or resolved.

But what i experienced from my yesterday's expeience that ASM is not supporting BLOCK device type atleast in 10g...
raw devices in ASM must be configured using CHARACTER device type...in your case just list your raw devices..


ls -ltr /dev/raw/raw*
ls -ltr /dev/sp_asm_disk*


It may list something similar to below, which tells its CHARACTER device type and not BLOCK device type..
in the permission, first letter tells you that..if its C then its set it as CHARACTER device type and if its B then it is set to BLOCK device type.

crw-rw---- 1 oracle dba 39, 15 Apr 15 16:21 /dev/raw/raw01vg1
crw-rw---- 1 oracle dba 39, 6 May 2 20:13 /dev/raw/raw02vg1


and see if its set to block devices or character device type...


I think this will help you..

Regards,
BakuL...
1 - 7
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jun 1 2010
Added on Jan 13 2010
7 comments
4,289 views