Anda di halaman 1dari 20

11gR2 ASM Inside story Part1

By Wissem EL KHLIFI
Introduction
This is a series of articles which contains several important enhancements to Automatic Storage
Management in Oracle 11gR2.
In this part1, we are going to prepare, install our 11gR2 ASM environment.
In this ASM inside stor articles, we are going to use Oracle !inu" # as the guest operating sstem,
Oracle 11gR2 as data$ase version.
Oracle %irtual&o" is our virtuali'ation software.
!rac"e Linu# Insta""ation
(ownload and install Oracle !inu".
The following rpm pac)ages must $e installed in our sstem*
binutils-2.17.50.0.6
compat-libstdc++-33-3.2.3
elfutils-libelf-0.125
elfutils-libelf-devel-0.125
elfutils-libelf-devel-static-0.125
gcc-4.1.2
gcc-c++-4.1.2
glibc-2.5-24
glibc-common-2.5
glibc-devel-2.5
glibc-headers-2.5
kernel-headers-2.6.1
ksh-20060214
libaio-0.3.106
libaio-devel-0.3.106
libgcc-4.1.2
libgomp-4.1.2
libstdc++-4.1.2
libstdc++-devel-4.1.2
make-3.1
s!sstat-7.0.2
uni"#$%&-2.2.11
uni"#$%&-devel-2.2.11
+"ample*
$$$%orac"e&c"ass%com Wissem EL KHLIFI
,or Automatic Memor Manager, ma)e the shared memor file sstem $ig enough and add the -tmpfs.
setting in the -/etc/fsta$. file*
Add the following lines in the /etc/ssctl.conf file*
Run the following command to change the current )ernel parameters*
$$$%orac"e&c"ass%com Wissem EL KHLIFI
Add the following lines to the -/etc/securit/limits.conf. file*
Ma)e sure the S+!I0123disa$led in the -/etc/selinu"/config. file.
System 'sers and (rou)s creation
Pre)are !rac"e *inaries and so+t$are directories
Set en,ironment ,aria*"es +or !rac"e system user
!ogin as Oracle sstem user. Then, edit the file .$ash4profile and add the following lines. After that,
save the changes and run the command -source .$ash4profile.*
-on+igure de,ices +or ASM using +i"e system +i"es and "oo) de,ices
In this step we are going to*
15 6reate a director to hold the files to $e used as ASM devices, as Oracle sstem user.
25 6reate 7 files to $e used as Asm devices, 18& of si'e for each, as root sstem user.
95 6hec) the created files, as root sstem user.
75 6reate the loop devices, as root sstem user.
#5 &ind the loop devices to raw devices, as root sstem user.
:5 Setup raw devices permissions and ownership, as root sstem user.
;5 +dit the -/etc/rc.local. file and add the same commands mentioned $efore. wh< &ecause after a
re$oot, the ownership and permisions will change $ac) to root and -5rw5r=r=. files attri$utes.
1
2
9
[oracle@localhost orawiss]$ mkdir asmdisk
[root@localhost orawiss]# dd if=/dev/zero
of=/u01/app/oracle/product/11.2.0/orawiss/asmdisk/disk1 s=102!k
$$$%orac"e&c"ass%com Wissem EL KHLIFI
7
#
:
;
>
?
1@
11
12
19
17
1#
1:
1;
1>
1?
2@
21
22
29
27
2#
2:
2;
2>
2?
9@
91
92
99
97
9#
9:
9;
9>
9?
7@
71
72
79
77
7#
7:
7;
7>
7?
cou"t=1000
1000#0 records i"
1000#0 records out
10!$%&'000 (tes )1.0 *+, copied- 2..%$%. seco"ds- !!.% /+/s
[root@localhost orawiss]# dd if=/dev/zero
of=/u01/app/oracle/product/11.2.0/orawiss/asmdisk/disk2 s=102!k
cou"t=1000
1000#0 records i"
1000#0 records out
10!$%&'000 (tes )1.0 *+, copied- 22.01&! seco"ds- !%.$ /+/s
[root@localhost orawiss]# dd if=/dev/zero
of=/u01/app/oracle/product/11.2.0/orawiss/asmdisk/disk. s=102!k
cou"t=1000
1000#0 records i"
1000#0 records out
10!$%&'000 (tes )1.0 *+, copied- .2.2012 seco"ds- .2.% /+/s
[root@localhost orawiss]# dd if=/dev/zero
of=/u01/app/oracle/product/11.2.0/orawiss/asmdisk/disk! s=102!k
cou"t=1000
1000#0 records i"
1000#0 records out
10!$%&'000 (tes )1.0 *+, copied- .'.11&' seco"ds- 20.0 /+/s

[root@localhost orawiss]# /si"/losetup /dev/loop1
/u01/app/oracle/product/11.2.0/orawiss/asmdisk/disk1
[root@localhost orawiss]# /si"/losetup /dev/loop2
/u01/app/oracle/product/11.2.0/orawiss/asmdisk/disk2
[root@localhost orawiss]# /si"/losetup /dev/loop.
/u01/app/oracle/product/11.2.0/orawiss/asmdisk/disk.
[root@localhost orawiss]# /si"/losetup /dev/loop!
/u01/app/oracle/product/11.2.0/orawiss/asmdisk/disk!

[root@localhost orawiss]# raw /dev/raw/raw1 /dev/loop1
/dev/raw/raw11 ou"d to ma2or &- mi"or 1
[root@localhost orawiss]# raw /dev/raw/raw2 /dev/loop2
/dev/raw/raw21 ou"d to ma2or &- mi"or 2
[root@localhost orawiss]# raw /dev/raw/raw. /dev/loop.
/dev/raw/raw.1 ou"d to ma2or &- mi"or .
[root@localhost orawiss]# raw /dev/raw/raw! /dev/loop!
/dev/raw/raw!1 ou"d to ma2or &- mi"or !
[root@localhost orawiss]# cd /dev/raw
[root@localhost raw]# ls 3ltr
total 0
crw3333333 1 root root 1'2- 1 4e 2$ 2012& raw1
crw3333333 1 root root 1'2- 2 4e 2$ 2012& raw2
$$$%orac"e&c"ass%com Wissem EL KHLIFI
#@
#1
#2
#9
#7
##
#:
#;
#>
#?
:@
:1
:2
:9
crw3333333 1 root root 1'2- . 4e 2$ 2012$ raw.
crw3333333 1 root root 1'2- ! 4e 2$ 2012$ raw!
[root@localhost raw]# 333cha"5e ow"er raw devices

[root@localhost raw]# chow" 36 oracle1oi"stall 7
[root@localhost raw]# chmod ''0 7
[root@localhost raw]# ls 3ltr
total 0
crw3rw3333 1 oracle oi"stall 1'2- 1 4e 2$ 2012& raw1
crw3rw3333 1 oracle oi"stall 1'2- 2 4e 2$ 2012& raw2
crw3rw3333 1 oracle oi"stall 1'2- . 4e 2$ 2012$ raw.
crw3rw3333 1 oracle oi"stall 1'2- ! 4e 2$ 2012$ raw!
[root@wissem tmp]# chow" 36 oracle1oi"stall
/u01/app/oracle/product/11.2.0/orawiss/7
[root@localhost raw]# vi /etc/rc.local
Also add in the -/etc/rc.local. file -chown 5R oracle*oinstall A. and -chmod ::@ A. lines*
0ote that to delete a loop device, ou can use the following sinta"* -losetup =d /dev/loop2.
!rac"e *inary +i"es insta""ation
This is m own method I useB I first install the Oracle $inaries, install the grid infrastructure for
standalone server and then use the d$ca to install the Oracle data$ase.
To install the Oracle $inaries, ou can follow the screen shots $elow.
1[oracle@wissem dataase]$ ./ru"8"staller
Insert ou Oracle metalin) credentials*
$$$%orac"e&c"ass%com Wissem EL KHLIFI
6hoose to install the Oracle software onl*
6hoose a single instance installation against Real Application 6lusters installation method*
Select the Oracle software languages*
6hoose enterprise edition*
$$$%orac"e&c"ass%com Wissem EL KHLIFI
6onfirm the Oracle $ase and software locations*
6hoose our OS(&A and OSOC+R groups*
Automatic verification of the configuration reDuirements*
6onfirm the glo$al settings resume*
$$$%orac"e&c"ass%com Wissem EL KHLIFI
The installation progress*
Open a new terminal window, login as root and run the -A.root.sh. scripts. After that clic) on -o)..
0ow the Oracle $inaries are installed. !etEs configure ASM when installing the Oracle grid
infrastructure for standalone server.
(rid In+rastructure Insta""ation +or standa"one ser,er
To configure ASM, we are going to install the grid infrastructure for standalone server.
The following screen shots $est descri$e the steps ou need to perform.
1[oracle@wissem 5rid]$ ./ru"8"staller
6hoose to install 8rid Infrastructure for standalone server option*
$$$%orac"e&c"ass%com Wissem EL KHLIFI
Select the software languages*
Select the ASM dis) files we alread created in the previous section*
6hoose the ss password for SFSASM new privilege appeared with Oracle 11g version.
$$$%orac"e&c"ass%com Wissem EL KHLIFI

6hoose the operating sstem groups for OS(&A, OSOC+R and OSASM.
6onfirm the Oracle $ase and the grid infrastructure software locations*
6onfiguration reDuirements verification status*
$$$%orac"e&c"ass%com Wissem EL KHLIFI
6onfirm the Oracle grid infrastructure resume*
Installation progress*
Open a new terminal window, login as root and run the -root.sh. script. After that clic) on -o)..
$$$%orac"e&c"ass%com Wissem EL KHLIFI
1
2
9
7
#
:
;
>
?
1@
11
12
19
17
1#
1:
1;
1>
1?
2@
21
22
29
27
2#
2:
2;
2>
2?
9@
91
92
99
[root@wissem 9]# /u01/app/oracle/product/11.2.0/5rid/root.sh
6u""i"5 :racle 115 root.sh script...

;he followi"5 e"viro"me"t variales are set as1
:6<=>?@:AB?6= oracle
:6<=>?@C:/?= /u01/app/oracle/product/11.2.0/5rid

?"ter the full path"ame of the local i" director(1
[/usr/local/i"]1
;he file DdhomeD alread( eEists i" /usr/local/i". :verwrite itF
)(/",
["]1
;he file Dorae"vD alread( eEists i" /usr/local/i". :verwrite itF
)(/",
["]1
;he file Dcorae"vD alread( eEists i" /usr/local/i". :verwrite itF
)(/",
["]1

?"tries will e added to the /etc/orata file as "eeded (
Gataase =o"fi5uratio" <ssista"t whe" a dataase is created
4i"ished ru""i"5 5e"eric part of root.sh script.
Bow product3specific root actio"s will e performed.
201130.301 111201221 =hecki"5 for super user privile5es
201130.301 111201221 Hser has super user privile5es
201130.301 111201221 Iarsi"5 the host "ame
Hsi"5 co"fi5uratio" parameter file1
/u01/app/oracle/product/11.2.0/5rid/crs/i"stall/crsco"fi5@params
=reati"5 trace director(
/home/oracle/.ash@profile1 li"e 11 racle1 comma"d "ot fou"d
>:=<> <GG /:G?
=reati"5 :=6 ke(s for user JoracleJ- priv5rp Joi"stallJ..
$$$%orac"e&c"ass%com Wissem EL KHLIFI
97
9#
9:
9;
9>
9?
7@
71
72
79
77
7#
:peratio" successful.
=6K3!''!1 Bode wissem successfull( pi""ed.
<ddi"5 daemo" to i"itta
=6K3!12.1 :racle Ci5h <vailailit( Kervices has ee" started.
ohasd is starti"5

wissem 2011/0./01 111..100
/
u01/app/oracle/product/11.2.0/5rid/cdata/wissem/ackup@20110.01@11.
.00.olr
Kuccessfull( co"fi5ured :racle *rid 8"frastructure for a Kta"dalo"e
Kerver
Hpdati"5 i"ve"tor( properties for clusterware
Ktarti"5 :racle H"iversal 8"staller...

=hecki"5 swap space1 must e 5reater tha" %00 /+. <ctual 1&02
/+ Iassed
;he i"ve"tor( poi"ter is located at /etc/ora8"st.loc
;he i"ve"tor( is located at /u01/app/ora8"ve"tor(
JHpdateBode>istJ was successful.
[root@wissem 9]#
Installation progress*
The installation confirmation message*
$$$%orac"e&c"ass%com Wissem EL KHLIFI
.ata*ase insta""ation
1sing d$ca, we are going to install the Oracle 11gR2 data$ase.
The screen shots $elow $est descri$e the installation steps.
1[oracle@wissem dataase]$ dca
6lic) ne"t*
6hoose to create a data$ase against a tempalte*
$$$%orac"e&c"ass%com Wissem EL KHLIFI
6hoose our data$ase template*
Insert our 8lo$al data$ase name, SI( identifier*
6hoose to configure +nterprise manager, data$ase control*
$$$%orac"e&c"ass%com Wissem EL KHLIFI
Insert and confirm the user accounts password*
6hoose ASM for storage management tpe and G(ATA for Oracle managed files data$ase area*
Specif ASMS0MC password*
$$$%orac"e&c"ass%com Wissem EL KHLIFI
In the recover configuration screen clic) ne"t*
6hoose or not to add the sample schemas in our data$ase*
Specif the glo$al memor si'e and the data$ase character Set*
$$$%orac"e&c"ass%com Wissem EL KHLIFI
6onfirm and clic) ne"t*
6hoose to create a data$ase and generate a creation data$ase script for future Duic) data$ase
installation*
$$$%orac"e&c"ass%com Wissem EL KHLIFI
6onfirm the ne"t window*
$$$%orac"e&c"ass%com Wissem EL KHLIFI
%erif our data$ase installation using ASM to manage the storage*
0ice reading ,
$$$%orac"e&c"ass%com Wissem EL KHLIFI