Basic ASM Steps on Linux
===================
$ df -h
$ ll
$ vi /etc/oratab
$ su root
OR
All the steps is to be done in terminal.
*1. * Login as root user and create the /u01/asmdisks directories.
mkdir -p /u01/asmdisks
*2. * Create five 400MB files that will be used as ASM disks. Create
those files in /u01/asmdisks.
cd /u01/asmdisks
dd if=/dev/zero of=asm_disk1 bs=1024k count=1000
dd if=/dev/zero of=asm_disk2 bs=1024k count=1000
dd if=/dev/zero of=asm_disk3 bs=1024k count=1000
dd if=/dev/zero of=asm_disk4 bs=1024k count=1000
dd if=/dev/zero of=asm_disk5 bs=1024k count=1000
dd if=/dev/zero of=asm_disk6 bs=1024k count=1000
cd /u01/asmdisks
chmod 770 asm_disk*
cd /u01/asmdisks
losetup /dev/loop1 asm_disk1
losetup /dev/loop2 asm_disk2
losetup /dev/loop3 asm_disk3
losetup /dev/loop4 asm_disk4
losetup /dev/loop5 asm_disk5
losetup /dev/loop6 asm_disk6
cd
cd /dev/
ls -al | grep loop
cd /u01/asmdisks
raw /dev/raw/raw1 /dev/loop1
raw /dev/raw/raw2 /dev/loop2
raw /dev/raw/raw3 /dev/loop3
raw /dev/raw/raw4 /dev/loop4
raw /dev/raw/raw5 /dev/loop5
raw /dev/raw/raw6 /dev/loop6
[root@testserver]raw /dev/raw/raw1 /dev/loop1
/dev/raw/raw1: bound to major 7, minor 1
[root@testserver]raw /dev/raw/raw2 /dev/loop2
/dev/raw/raw2: bound to major 7, minor 2
[root@testserver]raw /dev/raw/raw3 /dev/loop3
/dev/raw/raw3: bound to major 7, minor 3
[root@testserver]raw /dev/raw/raw4 /dev/loop4
/dev/raw/raw4: bound to major 7, minor 4
[root@testserver]raw /dev/raw/raw5 /dev/loop5
/dev/raw/raw4: bound to major 7, minor 5
[root@testserver]raw /dev/raw/raw6 /dev/loop6
/dev/raw/raw4: bound to major 7, minor 6
[root@testserver]raw -qa
/dev/raw/raw1: bound to major 7, minor 1
/dev/raw/raw2: bound to major 7, minor 2
/dev/raw/raw3: bound to major 7, minor 3
/dev/raw/raw4: bound to major 7, minor 4
Assigb permission to oracle user :
raw -qa
ls /dev/raw/ -l
cd /u01/asmdisks
chown oracle:oinstall /dev/raw/raw1
chown oracle:oinstall /dev/raw/raw2
chown oracle:oinstall /dev/raw/raw3
chown oracle:oinstall /dev/raw/raw4
chown oracle:oinstall /dev/raw/raw5
chown oracle:oinstall /dev/raw/raw6
ls /dev/raw/ -l
vi /etc/oratab
*3. * Make sure that the asm_disk files are associated to raw devices,
and have the right permissions:
vi /etc/rc.local
chmod 770 asm_disk*
losetup /dev/loop1 asm_disk1
losetup /dev/loop2 asm_disk2
losetup /dev/loop3 asm_disk3
losetup /dev/loop4 asm_disk4
losetup /dev/loop5 asm_disk5
losetup /dev/loop6 asm_disk6
raw /dev/raw/raw1 /dev/loop1
raw /dev/raw/raw2 /dev/loop2
raw /dev/raw/raw3 /dev/loop3
raw /dev/raw/raw4 /dev/loop4
raw /dev/raw/raw5 /dev/loop5
raw /dev/raw/raw6 /dev/loop6
chown oracle:oinstall /dev/raw/raw1
chown oracle:oinstall /dev/raw/raw2
chown oracle:oinstall /dev/raw/raw3
chown oracle:oinstall /dev/raw/raw4
chown oracle:oinstall /dev/raw/raw5
chown oracle:oinstall /dev/raw/raw6
# raw -qa
# ls /dev/raw/ -l
/u01/oracle/product/10.2.0/db_1/bin/localconfig add
/u01/oracle/product/10.2.0/db_1/bin/localconfig delete
==============================
Show parameter spfile
show parameter limit% //rebalance
show parameter instance% //instance type
==============================
connect +ASM
export ORACLE_SID=+ASM
sqlplus '/ as sysdba'
==============================================
when restart the pc system not read ASM files so temporary work go
1. Run this commands on Linux Terminal Copy & paste on terminal
cd /u01/asmdisks
losetup /dev/loop1 asm_disk1
losetup /dev/loop2 asm_disk2
losetup /dev/loop3 asm_disk3
losetup /dev/loop4 asm_disk4
losetup /dev/loop5 asm_disk5
losetup /dev/loop6 asm_disk6
raw /dev/raw/raw1 /dev/loop1
raw /dev/raw/raw2 /dev/loop2
raw /dev/raw/raw3 /dev/loop3
raw /dev/raw/raw4 /dev/loop4
raw /dev/raw/raw5 /dev/loop5
raw /dev/raw/raw6 /dev/loop6
chown oracle:oinstall /dev/raw/raw1
chown oracle:oinstall /dev/raw/raw2
chown oracle:oinstall /dev/raw/raw3
chown oracle:oinstall /dev/raw/raw4
chown oracle:oinstall /dev/raw/raw5
chown oracle:oinstall /dev/raw/raw6
2.Then after Connect the +ASM instance & triger the startup command.
3. Connect database & startup database.
Keep goin............................!!!!
No comments:
Post a Comment