Solved

How to mark disk as asm in solaris

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Problem Imaging Computers With Clonezilla 2 82
Shell script errors 10 113
what is the difference between "sudo su" and "su - root" 6 102
mobaxterm not able to change directory 28 98
In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
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…
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.

919 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

18 Experts available now in Live!

Get 1:1 Help Now