Solved

How to mark disk as asm in solaris

Posted on 2014-09-19
5
552 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 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

713 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