Tuesday, November 23, 2010

Creating ASM Disk Group with the remaining volumes of the Storwize V7000

In the last post I had used 4 of the volumes to create an ASM Disk Group called DATA. In this post I'm going to use the remaining 2 volumes to create another ASM Disk Group call LOG.

First I'll change the ownership of the volumes to oracle, and group to dba:
[root@isvx3 ~]# chown -R oracle:dba /dev/mapper/mpath4
[root@isvx3 ~]# chown -R oracle:dba /dev/mapper/mpath5

I'll use asmca, a utility that is part of the Oracle 11g R2 grid infrastructure to create the ASM Disk Group
-bash-3.2$ echo $GRID_HOME
/u02/app/oracle/product/11.2.0/grid
-bash-3.2$ $GRID_HOME/bin/asmca


I'm now going to quickly verify if the ASM Disk Group was created properly:





-bash-3.2$ $ORACLE_HOME/bin/asmcmd lsdg
State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  NORMAL  N         512   4096  1048576   2048000  2047803               50         1023876              0             N  DATA/
MOUNTED  NORMAL  N         512   4096  1048576   1024000  1023886                0          511943              0             N  LOG/

ATTENTION:
Just when everything looked fine, I thought that I should try a reboot and see how things hold up.
After the reboot, the Linux host came up and I ran the "asmcmd lsdg" and this is what I observer.
-bash-3.2$ $ORACLE_HOME/bin/asmcmd lsdg
-bash-3.2$

Yes, nulla, zot, nothing is what I saw.
-bash-3.2$ $ORACLE_HOME/bin/asmcmd lsdg
-bash-3.2$

In the Oracle docs "Oracle® Database Installation Guide11g Release 2 (11.2) for Linux E16763-06 " it says
"The O_DIRECT parameter enables direct read and writes to block devices, avoiding
kernel overhead. With Oracle Database Release 10.2 and later, Oracle Database files are
configured by default to use direct input/output.
With the 2. 6 kernel or later for Red Hat Enterprise Linux, Oracle Linux, and SUSE
Enterprise Server, you must create a permissions file to maintain permissions on
Oracle database files. If you do not create this permissions file, then permissions on
disk devices revert to their default values, root:disk, and Oracle database fails to
start."

I quick and easy way to workaround this issue is to add the following to the /etc/rc.local file
chown oracle:dba /dev/mapper/mpath*
chmod 600 /dev/mapper/mpath*

A more permanent fix would be to add the permission file as shown in the link below:
http://download.oracle.com/docs/cd/B28359_01/install.111/b32002/pre_install.htm#CDEBHDCD




No comments: