Solved

How to mark disk as asm in solaris

Posted on 2014-09-19
5
489 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
  • 3
5 Comments
 
LVL 61

Expert Comment

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

Expert Comment

by:Pepe2323
Comment Utility
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
Comment Utility
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
Comment Utility
i got the answer
0
 

Author Closing Comment

by:bt74
Comment Utility
research
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
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.

772 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now