Oracle 10g ASM Installation Installation Steps in RHEL!!! ASM ASM i.e. Automatic Storage Management simplifies administration of Oracle related files b alloing t"e administrator to reference dis# groups rat"er t"an indi$idual dis#s and files% "ic" ASM manages internall. internall. On Linu&% ASM is capable of referencing r eferencing dis#s as ra de$ices or b using t"e ASMLib softare.
In t"is article% e assume t"at ou "a$e configured a RHEL sstem along it" Oracle 'atabase Softare on it. (o install Oracle 10g 'atabase Softare% ou can follo t"is lin# . 'o not create an database no% onl install t"e Oracle Softare. )e "a$e configured t"e sstem it" belo details% Hostname IP address eth0 Gateway eth0
-
asm10g 192.168.0.4 192.168.0.4 192.168.0.1
Also e "a$e * ra de$ices a$ailable for ASM configuration +sdb% sdc% sdd,. )e )e ill see t"e configuration of bot"% ASMLib as ell as RA) de$ices in t"e belo article. 1) Partition the Disks: # fdisk de!sd" ommand $m for he%&'( n ommand a)tion *e e+tended *& &rimary &artition $1-4' $1-4' & Partition n,m"er $1-4'( 1 irst )y%inder $1-10/ defa,%t 1'( sing defa,%t !a%,e 1 ast )y%inder or 3sie or 3sie5 or 3sie $1-10/ defa,%t 10/'( sing defa,%t !a%,e 10/ ommand $m for he%&'( w 7he &artition ta"%e has "een a%tered a%%ing io)t%$' to re-read &artition ta"%e. yn)ing disks.
Alas create t"e ra de$ices as primar partition and allocate t"e "ole dis#. 'on-t ma#e multiple primar partitions on a single dis# for f or ASM installation. It mig"t not or# properl. 'o t"e abo$e steps for /de$/sdc- and /de$/sdd- de$ice also. (o update t"e #ernel% run t"e belo command% # &art&ro"e
o c"ec# "et"er ou are able to see t"e nel created ra de$ices. # fdisk -%
2) ASMLib Configuration: Configuration: 'etermine our #ernel $ersion and accordingl doload t"e ASMLib softare from O( O(.. # ,name -r
("e belo pac#ages ere donloaded "ic" ere suitable for m #ernel. ora)%easm-2.6.18-164.e%/-2.0./-1.e%/.i686.r&m
ora)%easm%i"-2.0.4-1.e%/.i86.r&m ora)%easm-s,&&ort-2.1.:-1.e%/.i86.r&m
[Y From: "ttp2//.oracle.com/ocom/groups/public/3otn/documents/ebcontent/145678.list99 "ttp2//.oracle.com/ocom/groups/public/3otn/documents/ebcontent/145678.list
:;ood "ttp2//.oracle.com/tec"netor#/ser$erstorage/linu&/donloads/r"el60575<<."tml99 "ttp2//.oracle.com/tec"netor#/ser$erstorage/linu&/donloads/r"el60575<<."tml Install t"e pac#ages. # r&m -i!h ora)%easm-2.6.18-164.e%/-2.0./-1.e%/.i686.r&m ora)%easm%i"-2.0.4-1.e%/.i86.r&m ora)%easm-s,&&ort-2.1.:-1.e%/.i86.r&m
o configure t"e ASM #ernel module. # et)init.dora)%easm )onfig,re onfig,ring the ;ra)%e <5 %i"rary dri!er. 7his wi%% )onfig,re the on-"oot &ro&erties of the ;ra)%e <5 %i"rary dri!er. 7he fo%%owing =,estions wi%% determine whether the dri!er is %oaded on "oot and what &ermissions it wi%% ha!e. 7he ),rrent !a%,es wi%% "e shown in "ra)kets $>?@>'. Hitting witho,t ty&ing an answer wi%% kee& that ),rrent !a%,e. tr%- wi%% a"ort. Aefa,%t ,ser to own the dri!er interfa)e ?@( ora)%e Aefa,%t gro,& to own the dri!er interfa)e ?@( oinsta%% tart ;ra)%e <5 %i"rary dri!er on "oot $yn' ?n@( y i+ &ermissions of ;ra)%e <5 disks on "oot $yn' ?y@( y Briting ;ra)%e <5 %i"rary dri!er )onfig,ration( ? ; @ reating de!ora)%easm mo,nt &oint( ? ; @ oading mod,%e Cora)%easmD( Cora)%easmD( ? ; @ 5o,nting <5%i" dri!er fi%esystem( ? ; @ )anning system for <5 disks( ? ; @
Once t"e ASM #ernel module is configured% no create t"e dis#s. # et)init.dora)%easm )reatedisk A<7
(o (o list t"e dis#s configured. # et)init.dora)%easm %istdisks
("e ASM dis#s are no read for use. *, RA) 'e$ice Setup2 Edit t"e file /etc/ssconfig/rade$ices-% and add t"e belo lines2 # !i et)sys)onfigrawde!i)es de!rawraw1 de!sd"1 de!rawraw2 de!sd)1 de!rawraw de!sdd1
o restart t"e ser$ice. # ser!i)e rawde!i)es restart
Assigning de$ices2 de!rawraw1 -- de!sd"1 de!rawraw1( "o,nd to maor 8 minor 1: de!rawraw2 -- de!sd)1 de!rawraw2( "o,nd to maor 8 minor de!rawraw -- de!sdd1 de!rawraw( "o,nd to maor 8 minor 49 done
="ange t"e oners"ip and permissions of ra de$ices # # # # # #
)hown )hown )hown )hmod )hmod )hmod
ora)%e.oinsta%% de!rawraw1 ora)%e.oinsta%% de!rawraw2 ora)%e.oinsta%% de!rawraw 600 de!rawraw1 600 de!rawraw2 600 de!rawraw
("e ASM ra dis#s are configured. >ou can start our database creation no. 7, =reate ASM Instance2 =reation of t"e ASM instance is t"e same% "et"er ou ma#e use of ASMLib or RA) de$ices. )"en using ASMLib% t"e candidate dis#s are listed using t"e stamp associated it" t"em% "ile t"e ra de$ices are listed using t"eir de$ice name. Login as oracle user and start 'atabase =onfiguration Assistant. d")a
)EL=OME Screen
=lic# on e&t to continue.
O?ERA(IOS Screen
Select =onfigure Automatic Storage Management- option clic# on e&t to continue. A arning message ill get displaed saing t"at Oracle =luster Snc"roni@ation Ser$ice +=SS,- is not currentl running.
Open a ne terminal and login as root. E&ecute t"e command s"on in t"e arning indo. # ,01a&&ora)%e&rod,)t10.2.0d""in%o)a%)onfig add
)"en t"e e&ecution is complete% clic# on O button and again clic# e&t to continue.
=REA(E ASM IS(A=E Screen
Enter passord t"at ill be used for ASM instance. =lic# on e&t. A confirmation indo ill get open for creating t"e ASM instance. =lic# on O and ASM instance ill get created as s"on in belo pic.
ASM 'IS ;ROB?S Screen
Initiall t"e indo ill be blan# as s"on abo$e. =lic# on C=reate eD and =REA(E 'IS ;ROB? screen ill get open. Enter 'is# ;roup ame2 'A(A;R? Select Redundanc2 E&ternal
)"en using ASMLib% t"e 'is# ?at" column ill contain $alues as gi$en belo ;E(A<7
)"en using ra de$ices% t"e 'is# ?at" column ill contain candidate dis#s de!rawraw1
de!rawraw2 de!rawraw
Since e are using ra de$ices% select 1st ra de$ice i.e. /de$/ra/ra1 =lic# on O and t"e ASM 'is# =reation ill start.
Similarl create AR=H;R? and LO;;R? dis# groups as s"on in abo$e steps. Once all dis# groups are configured% ou s"ould see * dis# groups similar to t"e belo pic.
o on ASM 'IS ;ROB?S Screen% clic# on inis". >ou ill get a popup indo. =lic# on o to continue.
o t"e ASM instance "as been configured. >ou can c"ec# t"e ASM instance running as belo. &s -ef J gre& &mon
6, Listener =onfiguration2 Fefore starting it" t"e database creation% configure t"e listener and register ASM instance it" it. net)a
If ou don-t see t"e ASM instance register it" t"e listener ser$ice% t"en do t"e belo steps e+&ort ;E<KLIAM3<5 s=%&%,s as sysd"a N a%ter system registerO N e+it %snr)t% stat,s
o ou ill see t"at t"e ASM instance "as been registered it" t"e listener ser$ice. 4, =reate 'atabase2 Start 'F=A. d")a
)EL=OME Screen
=lic# on e&t to continue. O?ERA(IOS Screen
Select C=reate a 'atabaseD and clic# on e&t to continue. 'A(AFASE (EM?LA(ES Screen
=lic# on e&t to continue. 'A(AFASE I'E(II=A(IO Screen
Enter t"e 'F name and clic# on e&t to continue. MAA;EME( O?(IOS Screen
If ou ant to configure our database it" Enterprise Manager% t"en c"ec# t"e option C=onfigure t"e database it" Enterprise ManagerD else unc"ec# it. =lic# on e&t to continue. 'A(AFASE =RE'E(IALS Screen
Enter common passord for all accounts and clic# on e&t to continue. S(ORA;E O?(IOS Screen
Select CAutomatic Storage Management +ASM,D =lic# on e&t to continue. It ill prompt ou for ss passord of ASM.
Enter t"e passord t"at ou configured "ile creating ASM instance. ASM 'IS ;ROB?S Screen
Select all t"e dis# groups clic# on e&t. 'A(AFASE ILE LO=A(IOS Screen
Select CBse OracleManaged ilesD and enter pat" as G'A(A;R? =lic# on CMultiple& Redo Logs and =ontrol ilesD and enter pat" as s"on belo%
RE=OER> =OI;BRA(IO Screen
If ou ant to enable las" logs% c"ec# t"e CSpecif las" Reco$er AreaD and enter t"e details as s"on. If ou ant to enable arc"i$ing mode% select CEnable Arc"i$ingD and clic# CEdit Arc"i$e Mode ?arametersD. Enter t"e pat" as s"on belo.
=lic# on e&t to continue. 'A(AFASE =O(E( Screen
=lic# on e&t to continue. II(IALIJA(IO ?ARAME(ERS Screen
=lic# on ="aracter Sets tab% Select ="aracter Set as Bnicode +AL*8B(5,. Select 'efault 'ate ormat as India. =lic# on e&t to continue. 'A(AFASE S(ORA;E Screen
>ou can see t"e OM file format for datafiles% controlfiles and redolog files. =lic# on e&t to continue. =REA(IO O?(IOS Screen
F default% t"e C=reate 'atabaseD option is selected. If ou ant to create scripts% select t"e C;enerate 'atabase =reation ScriptsD option. =lic# on inis". =OIRMA(IO Screen
=lic# on O to start t"e installation. ;EERA(IO O S=RI?(S Screen
Since e "ad selected t"e option to generate t"e database creation scripts% before starting t"e database creation t"e scripts get generated. =lic# on O. 'A(AFASE =REA(IO ?RO;RESS Screen
>ou can obser$e t"e 'atabase creation. E' O 'A(AFASE =REA(IO Screen
("e 'atabase "as been created using ASM as storage option. >ou can $erif t"e location of database files as belo% &s -ef J gre& &mon
&s -ef J gre& %sn e+&ort ;E<KLIAMasmd" s=%&%,s as sysd"a N se%e)t name from !datafi%eO N se%e)t name from !tem&fi%eO N se%e)t name from !)ontro%fi%eO N se%e)t mem"er from !%ogfi%eO N show &arameter %ogLar)hi!eLfi%eLdestO N show &arameter d"Lre)o!erO
Sitc"ing from Ra 'e$ices to ASMLib2 If ou prefer to use ASMLIF rat"er t"an RA) de$ices% follo t"e belo steps. ("is is Kust an e&tra acti$it "ic" ou mig"t tr. S"utdon an databases using t"e ASM instance% but lea$e t"e ASM instance itself running. o connect to t"e ASM instance. e+&ort ;E<KLIAM3<5 s=%&%,s as sysd"a
Alter t"e ASM dis# string to e&clude t"e ra de$ices used earlier% t"en s"utdon t"e ASM instance. N <7KE 7K5 K7 asmLdiskstring M >;E(AIQR ;PKMPIKO ystem a%tered. N H7A;BS I55KAI<7KO <5 diskgro,&s dismo,nted <5 instan)e sh,tdown N
At t"is point t"e dis#s ill not be used b ASM because t"e are not stamped. o issue t"e renamedis# command as t"e root user for eac" dis#. # et)init.dora)%easm renamedisk de!sd"1 AI1 Eenaming disk Cde!sd"1F to CT;1F( ? ; @ # et)init.dora)%easm renamedisk de!sd)1 AI2 Eenaming disk Cde!sd)1F to CT;2F( ? ; @ # et)init.dora)%easm renamedisk de!sdd1 AI Eenaming disk Cde!sdd1F to CT;F( ? ; @
otice% t"e stamp matc"es t"e disco$er string set earlier. ("e ASM instance can no be started. N 7
("e ASM instance is no using ASMLib% rat"er t"an ra de$ices. All dependent databases can no be started.
Sitc"ing from ASMLib to Ra 'e$ices2 S"utdon an databases using t"e ASM instance% but lea$e t"e ASM instance itself running. o connect to t"e ASM instance. e+&ort ;E<KLIAM3<5 s=%&%,s as sysd"a
Alter t"e ASM dis# string to matc" t"e ra de$ices t"at ou ant to use% t"en s"utdon t"e ASM instance. N <7KE 7K5 K7 asmLdiskstring M >de!rawrawQR ;PKMPIKO ystem a%tered. N H7A;BS I55KAI<7KO <5 diskgro,&s dismo,nted <5 instan)e sh,tdown N
?erform all t"e steps listed in t"e Ra 'e$ice Setup% t"en start t"e ASM instance. N 7
("e ASM instance is no using t"e dis#s as ra de$ices% rat"er t"an as ASMLib dis#s. All dependent databases can no be started "ttp2//c"otustuff.ordpress.com/8018/01/8/oracleasminstallationstepsinlinu&/ ne More!!!
Ho to =onfigure ASM dis#s using ASMLib or Ra 'is#s ?osted b Ja"id on August 8<% 800.
("e ASM dis#s can be non formatted partitions from our dis# alread installed for OS and t"e can e$en be OS files configured as dis#s. Fut if e use M)are t"en e can add more $irtual dis#s to t"e sstem it"out an cost simulating our test en$ironment it" a real time ASM configurations "ere man dis#s are used on different controllers to ta#e benefit of ASM mirroring and stripping of data. See belo "o to add more dis#s to t"e irtual mac"ine. O(E2 ("is tutorial as done on RHEL installed on M)are.
On M)are ser$er eb console ou ill see a lin# Add Hardare in t"e =ommands section on t"e rig"t side panel. =lic# it and add "ardare i@ard ill open. 1. rom "ardare tpes select Hard 'is#. Hardare (pe
8. Select =reate a ne $irtual dis# from t"e ne&t page. Hard 'is#
*. On t"e Hard 'is# ?roperties page select t"e capacit for t"e dis# along it" ot"er options. Hard 'is# ?roperties
otice t"e Allocate all dis# space no unc"ec#ed. Its best to lea$e it unc"ec#ed. 7. See t"e "ardare t"at is going to be added. Hard 'is# ?roperties
On t"is page select More Hardare and clic# Hard 'is#. Repeat t"is process for all t"e dis#s ou ant to add to t"e sstem. )"en done press finis". 6. After ou finis" t"e add "ardare i@ard ou s"ould see our c"anges in t"e "ardare on t"e summar page of t"e $irtual mac"ine. Read to =omplete
I "a$e added 7 dis#s of si@e 7; eac" and all on different S=SI dis# controller. )e usuall do t"is to get most out of t"e ASM dis# mirroring i.e. e$en if one dis# is dead% Oracle ill still be able to read data from mirrored copies from ot"er dis#s. Fut t"in# about all of our dis#s are on one dis# controller and t"at "ole controller is burnt% t"en ou loose all of our data. o poer on our irtual mac"ine from t"e commands panel on t"e rig"t side of t"e M console and login as root. # %s de!sdQ de!sda de!sda2 de!sda1 de!sda
de!sda4 de!sda/
de!sda6 de!sd"
de!sd) de!sdd
de!sde
# )at &ro)&artitions maor minor #"%o)ks name
8 8 8 8 8 8 8 8 8 8 8
0 1 2 4 / 6 16 2 48 64
26214400 10491 10482412 148:40 1 10/2226 1142218 419404 419404 419404 419404
sda sda1 sda2 sda sda4 sda/ sda6 sd" sd) sdd sde
Q in)e we added I disks so yo, sho,%d see then in de!sdQ. sda is o,r main disk where ; and other a&&s are insta%%ed and sda1 to sda6 are its &artitions. sd" to sde are the new fo,r disks that we ha!e ,st added. 7he o,t&,t from U)at &ro)&artitionsU shows they are not &artitioned yet. Be ha!e to )reate at %east one &artition in ea)h disk. Be )an ha!e more then one &artitions and ,se ea)h &artition as a
different <5 disk. I am going to )reate one &artition in a%% disks. Q # fdisk de!sd" Ae!i)e )ontains neither a !a%id A; &artition ta"%e nor ,n GI or ; disk%a"e% V,i%ding a new A; disk%a"e%. hanges wi%% remain in memory on%y ,nti% yo, de)ide to write them.
#
8 8 8 8 8 8 8 8 8 8 8 8 8 8 8
0 1 2 4 / 6 16 1: 2 48 49 64 6/
26214400 10491 10482412 148:40 1 10/2226 1142218 419404 41929 419404 41929 419404 41929 419404 41929
sda sda1 sda2 sda sda4 sda/ sda6 sd" sd"1 sd) sd)1 sdd sdd1 sde sde1
erif t"at ou "a$e one partition for e$er dis#. "se ASMLib to stam# the $isks as ASM $isks:
Oracle pro$ides ASM libraries to stamp t"e dis#s as ASM dis#s. ("ese libraries are distributed on t"e Linu& #ernel basis. >ou need to #no "ic" #ernel $ersion ou are using t"en get t"e libraries from t"e O( ebsite to donload libs for our #ernel. # ,name -r 2.6.18-164.e%/ Q 7his is the kerne% !ersion I am ,sing. Q # ,name -& i686 Q 7his is the &ro)essor ty&e. Q # ,name -i i86 Q 7his is the hardware &%atform. Q
According to t"e abo$e information I need folloing libraries. oracleasm8.4.15147.el68.0.61.el6.i454.rpm oracleasmsupport8.1.*1.el6.i*54.rpm oracleasmlib8.0.71.el6.i*54.rpm # r&m -!ih ora)%easm-s,&&ort-2.1.-1.e%/.i86.r&m W ora)%easm%i"-2.0.4-1.e%/.i86.r&m W ora)%easm-2.6.18-164.e%/-2.0./-1.e%/.i686.r&m warning( ora)%easm-s,&&ort-2.1.-1.e%/.i86.r&m( Header T A< signat,re( S;K key IA 1e/e01/9 Preå... ################################# 1(ora)%easm-s,&&ort ################################# 2(ora)%easm-2.6.18-164.e% ################################# (ora)%easm%i" #################################
?100X@ ? X@ ? 6:X@ ?100X@
)it" t"e oracleasm utilit installed% configure t"e #ernel module for ASM. # et)init.dora)%easm )onfig,re onfig,ring the ;ra)%e <5 %i"rary dri!er. 7his wi%% )onfig,re the on-"oot &ro&erties of the ;ra)%e <5 %i"rary dri!er. 7he fo%%owing =,estions wi%% determine whether the dri!er is %oaded on "oot and what &ermissions it wi%% ha!e. 7he ),rrent !a%,es wi%% "e shown in "ra)kets $U?@U'. Hitting witho,t ty&ing an answer wi%% kee& that ),rrent !a%,e. tr%- wi%% a"ort. Aefa,%t ,ser to own the dri!er interfa)e ?@( ora)%e Aefa,%t gro,& to own the dri!er interfa)e ?@( oinsta%% tart ;ra)%e <5 %i"rary dri!er on "oot $yn' ?n@( y )an for ;ra)%e <5 disks on "oot $yn' ?y@( Briting ;ra)%e <5 %i"rary dri!er )onfig,ration( done Initia%iing the ;ra)%e <5i" dri!er( )anning the system for ;ra)%e <5i" disks(
? ?
; ;
@ @
After t"e #ernel module is updated% label t"e dis#s as ASM dis#s and gi$e t"en an ASM name. # et)init.dora)%easm )reatedisk <51 de!sd"1 5arking disk Y<51Y as an <5 disk(
?
;
@
# et)init.dora)%easm )reatedisk <52 de!sd)1 5arking disk Y<52Y as an <5 disk(
?
;
@
# et)init.dora)%easm )reatedisk <5 de!sdd1 5arking disk Y<5Y as an <5 disk(
?
;
@
# et)init.dora)%easm )reatedisk <54 de!sde1 5arking disk Y<54Y as an <5 disk(
?
;
@
?
;
@
o issue a scandis#s on all ASM dis#s. # et)init.dora)%easm s)andisks )anning the system for ;ra)%e <5i" disks(
listsdis#s ill list all ASM dis#s. Ma#e sure ou see all t"e dis#s ou configured. # et)init.dora)%easm %istdisks <51 <52 <5 <54 #
Configure %A& $isks to use as ASM $isks: Open /etc/ssconfig/rade$ices and add folloing lines2 de!rawraw1 de!rawraw2 de!rawraw de!rawraw4
de!sd"1 de!sd)1 de!sdd1 de!sde1
Restart t"e rde$ices ser$ice to ma#e our c"anges effecti$e. # ser!i)e rawde!i)es restart
de!sd"1 8 minor 1: de!sd)1 8 minor de!sdd1 8 minor 49 de!sde1 8 minor 6/
("is ill bound t"e dis#s it" ra de$ices. E&ecute t"e folloing commands to set access and oners"ip on t"e ra dis#s for user oracle. Also add t"ese lines in /etc/rc.local to preser$e t"ese settings after sstem restart. # # # # # # # #
)hown )hown )hown )hown )hmod )hmod )hmod )hmod
ora)%e(oinsta%% de!rawraw1 ora)%e(oinsta%% de!rawraw2 ora)%e(oinsta%% de!rawraw ora)%e(oinsta%% de!rawraw4 660 de!rawraw1 660 de!rawraw2 660 de!rawraw 660 de!rawraw4
'(: Ra de$ices setup or t"e ASMLib setup are to different mutuall e&clusi$e as to configure ASM dis#s. >ou ill use eit"er one of t"ose not bot".
If ou are using RHEL6.0 or 6.1 t"en ou onNt find t"e rade$ices ser$ice or t"e /etc/ssconfig/rade$ices file% please refer to t"e lin#s pro$ided belo. See also2 Ho to install ASM instance on a nonasm Oracle database Ho to configure Ra 'is#s in RHEL 6 Ho to migrate Oracle datafiles to ASM storage $ia RMA Ho to migrate online redo logs to Oracle ASM storage Migrate Oracle las" Reco$er Area to ASM storage $ia RMA Add ASM Instance into Enterprise Manager