Solved

How to mark disk as asm in solaris

Posted on 2014-09-19
5
566 Views
Last Modified: 2014-10-12
I am new to oracle ASM side.  My storage team allocated a number of luns to my cluster servers ( 2 Nos )  and the servers are in RAC environment. and they are asking to configure the disk as raw disks and share with them.

So now from the OS prespective ( solaris ), I can see all the luns in my server. Whats steps i have to perfrom to brings the disk as asm enabled.

my understanding

1. i will partition the each disk as raw one using format command.
 what could be the next step.

i want to give the out as like this. ( previous admin provide the out as )

crw-rw----   1 grid     asmadmin 118, 1358 Aug 11 12:08 /dev/rdsk/c3t60060160793038008A141F172F34E411d0s6
crw-rw----   1 grid     asmadmin 118, 1350 Sep 11 12:08 /dev/rdsk/c3t60060160793038008C141F172F34E411d0s6
crw-rw----   1 grid     asmadmin 118, 1342 Sep 11 12:08 /dev/rdsk/c3t60060160793038008E141F172F34E411d0s6
crw-rw----   1 grid     asmadmin 118, 1334 Sep 11 12:08 /dev/rdsk/c3t600601607930380090141F172F34E411d0s6
 

Thanks
0
Comment
Question by:bt74
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 62

Expert Comment

by:gheist
ID: 40333653
Normally one creates directory with symlinks to otherwise unused raw storage partitions
0
 
LVL 8

Expert Comment

by:Pepe2323
ID: 40333862
Hi

on the solaris side:
- clean all partitions and creat on Slice 0 from Cyl 2 - the rest
- Change the owenr and grps as the old ones

list if asm disks

/etc/init.d/oracleasm listdisk


u will see something like this:

[root@server modules]# oracleasm listdisks
DATADISK1
DATADISK2

stamp the device:

[root@server~]# /etc/init.d/oracleasm createdisk NEWFRA newdevice
Marking disk "NEWFRA" as an ASM disk:                       [  OK  ]

Scan for candidate disks again ( do it on both server )

[root@server ~]# /etc/init.d/oracleasm scandisks
Scanning the system for Oracle ASMLib disks:               [  OK  ]



Now the disk is ready to be added to the group.

List the groups:

[oracle@server~]$ export ORACLE_SID="+ASM"
[oracle@server ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Thu Jan 31 15:35:27 2013

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Automatic Storage Management option

SQL> select name
  2  from V$ASM_DISKGROUP;

NAME
------------------------------
DATA --- > example group
FRA ---> example group


      

This assumes that you've already partitioned the presented disk(s) (and will be using /dev/sd[whatever]N), and that you're using asmlib. There will be a kernel module loaded if you are:

[root@oel61 disks]# lsmod | grep oracle
oracleasm              53865  1
[root@oel61 disks]#

As root, scan for candidate disks:

[root@oel61 ~]# /etc/init.d/oracleasm scandisks
Scanning the system for Oracle ASMLib disks:               [  OK  ]
[root@oel61 ~]#

Then, check to see if the disk has already been "discovered" by ASM:

oracle@oel61 ~]$ asmcmd -p
ASMCMD [+] > lsdsk
Path
/dev/oracleasm/disks/DISK1
/dev/oracleasm/disks/DISK2
/dev/oracleasm/disks/DISK3
ASMCMD [+] >

If not, we need to stamp the device:

[root@oel61 ~]# /etc/init.d/oracleasm createdisk NEWFRA /dev/sdc1
Marking disk "NEWFRA" as an ASM disk:                       [  OK  ]
[root@oel61 ~]#

Scan for candidate disks again, then list - the new device should be there:

[root@oel61 ~]# /etc/init.d/oracleasm scandisks
Scanning the system for Oracle ASMLib disks:               [  OK  ]
[root@oel61 ~]#

# /etc/init.d/oracleasm listdisks
DISK1
DISK2
DISK3
NEWFRA
#

Or use asmcmd:

oracle@oel61 ~]$ asmcmd -p
ASMCMD [+] > lsdsk
Path
/dev/oracleasm/disks/DISK1
/dev/oracleasm/disks/DISK2
/dev/oracleasm/disks/DISK3
/dev/oracleasm/disks/NEWFRA
ASMCMD [+] >

Now do a scandisks on the other node and check that everything is as it is on the first node (should be fine if you're using the same /dev device names).

Now the disk is ready to be added to the group.

List the groups:

[oracle@oel61 ~]$ export ORACLE_SID="+ASM"
[oracle@oel61 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Thu Jan 31 15:35:27 2013

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Automatic Storage Management option

SQL> select name
  2  from V$ASM_DISKGROUP;

NAME
------------------------------
DATA
FRA

SQL>

Add disk to the group:

SQL> ALTER DISKGROUP FRA ADD DISK '/dev/oracleasm/disks/NEWFRA';

If you want to check the available space do it like this:

SQL> select name, state, total_mb, free_mb from v$asm_diskgroup;


NAME                           STATE         TOTAL_MB    FREE_MB
------------------------------ ----------- ---------- ----------
DATA                           MOUNTED          20479      19361
FRA                            MOUNTED          20479      20145


note: u can check before and after adding the disk to the group

i hope this helps.
0
 

Author Comment

by:bt74
ID: 40334174
I do not want to add the disk to the asm groups that work will taken by DBA team. I just want to make it available as raw disk so that it can be available to asm.

what my understanding is.

1. create a single partition of each disk ( lets use slice 6 ).
2. How we will label it as asm disk ?
3. and I want to change the ownership as grid:asmadmin for raw device.

like
crw-rw----   1 grid     asmadmin 118, 1358 Aug 11 12:08 /dev/rdsk/c3t60060160793038008A141F172F34E411d0s6

does this enough?

rest of the activities like bringing the raw disk to asm disk group is the responsibility of DBA

But not sure how to do the 2 and 3 step, if the step is correct
0
 

Accepted Solution

by:
bt74 earned 0 total points
ID: 40366029
i got the answer
0
 

Author Closing Comment

by:bt74
ID: 40375475
research
0

Featured Post

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question