LVM上实施ASM

    环境:RHEL-5.8     oracle _10gR2

 

    绑定裸设备

[root@localhost ~]# fdisk -l

Disk /dev/sda: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14        1288    10241437+  83  Linux
/dev/sda4            1289        3916    21109410    5  Extended
/dev/sda5            1289        1301      104391   8e  Linux LVM
/dev/sda6            1302        1314      104391   8e  Linux LVM
/dev/sda7            1315        1327      104391   8e  Linux LVM
/dev/sda8            1328        1340      104391   8e  Linux LVM
/dev/sda9            1341        1353      104391   8e  Linux LVM
/dev/sda10           1354        1366      104391   8e  Linux LVM
/dev/sda11           1367        1379      104391   8e  Linux LVM
/dev/sda12           1380        1392      104391   8e  Linux LVM


    ②  在 /etc/sysconfig/rawdevices、添加:

/dev/raw/raw5    /dev/sda5
/dev/raw/raw6    /dev/sda6
/dev/raw/raw7    /dev/sda7
/dev/raw/raw8    /dev/sda8
/dev/raw/raw9    /dev/sda9
/dev/raw/raw10   /dev/sda10
/dev/raw/raw11   /dev/sda11
/dev/raw/raw12   /dev/sda12


    ③  在 /etc/rc.d/init.d/rawdevices的start处的assign_raw下、添加:

sleep 3
chown -R oracle:oinstall /dev/raw/


    ④  校验裸设备

[root@localhost init.d]# chkconfig rawdevices on
[root@localhost init.d]# partprobe
[root@localhost init.d]# service rawdevices restart
Assigning devices: 
           /dev/raw/raw5  -->   /dev/sda5
/dev/raw/raw5:  bound to major 8, minor 5
           /dev/raw/raw6  -->   /dev/sda6
/dev/raw/raw6:  bound to major 8, minor 6
           /dev/raw/raw7  -->   /dev/sda7
/dev/raw/raw7:  bound to major 8, minor 7
           /dev/raw/raw8  -->   /dev/sda8
/dev/raw/raw8:  bound to major 8, minor 8
           /dev/raw/raw9  -->   /dev/sda9
/dev/raw/raw9:  bound to major 8, minor 9
           /dev/raw/raw10  -->   /dev/sda10
/dev/raw/raw10: bound to major 8, minor 10
           /dev/raw/raw11  -->   /dev/sda11
/dev/raw/raw11: bound to major 8, minor 11
           /dev/raw/raw12  -->   /dev/sda12
/dev/raw/raw12: bound to major 8, minor 12
done
[root@localhost init.d]# raw -qa
/dev/raw/raw5:  bound to major 8, minor 5
/dev/raw/raw6:  bound to major 8, minor 6
/dev/raw/raw7:  bound to major 8, minor 7
/dev/raw/raw8:  bound to major 8, minor 8
/dev/raw/raw9:  bound to major 8, minor 9
/dev/raw/raw10: bound to major 8, minor 10
/dev/raw/raw11: bound to major 8, minor 11
/dev/raw/raw12: bound to major 8, minor 12


    ⑤  增加权限

[root@localhost init.d]# cd /dev/raw/
[root@localhost raw]# ls -l
总计 0
crw------- 1 oracle oinstall 162, 10 10-31 23:35 raw10
crw------- 1 oracle oinstall 162, 11 10-31 23:35 raw11
crw------- 1 oracle oinstall 162, 12 10-31 23:35 raw12
crw------- 1 oracle oinstall 162,  5 10-31 23:35 raw5
crw------- 1 oracle oinstall 162,  6 10-31 23:35 raw6
crw------- 1 oracle oinstall 162,  7 10-31 23:35 raw7
crw------- 1 oracle oinstall 162,  8 10-31 23:35 raw8
crw------- 1 oracle oinstall 162,  9 10-31 23:35 raw9
[root@localhost raw]# chmod 660 *
[root@localhost raw]# ls -l
总计 0
crw-rw---- 1 oracle oinstall 162, 10 10-31 23:35 raw10
crw-rw---- 1 oracle oinstall 162, 11 10-31 23:35 raw11
crw-rw---- 1 oracle oinstall 162, 12 10-31 23:35 raw12
crw-rw---- 1 oracle oinstall 162,  5 10-31 23:35 raw5
crw-rw---- 1 oracle oinstall 162,  6 10-31 23:35 raw6
crw-rw---- 1 oracle oinstall 162,  7 10-31 23:35 raw7
crw-rw---- 1 oracle oinstall 162,  8 10-31 23:35 raw8
crw-rw---- 1 oracle oinstall 162,  9 10-31 23:35 raw9


    ⑥  启动css服务

[root@localhost ~]# cd /u01/app/oracle/product/10.2.0/db_1/bin
[root@localhost bin]# ./localconfig add
/etc/oracle does not exist. Creating it now.
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Configuration for local CSS has been initialized

Adding to inittab 
Startup will be queued to init within 90 seconds.
Checking the status of new Oracle init process...
Expecting the CRS daemons to be up within 600 seconds.
CSS is active on these nodes.
        localhost
CSS is active on all nodes.
Oracle CSS service is installed and running under init(1M)


    ⑦  检查css

[root@localhost ~]# strings /etc/inittab
...
...
h1:35:respawn:/etc/init.d/init.cssd run >/dev/null 2>&1 </dev/null
[root@localhost ~]# ps aux | grep css
root     18650  0.0  0.1   2952  1160 ?        S<s  23:43   0:00 /bin/su -l oracle -c sh -c 'cd /u01/app/oracle/product/10.2.0/db_1/log/localhost/cssd;  ulimit -c unlimited; exec /u01/app/oracle/product/10.2.0/db_1/bin/ocssd '
oracle   18749  0.0  1.3 149296  8660 ?        S<sl 23:44   0:00 /u01/app/oracle/product/10.2.0/db_1/bin/ocssd.bin
root     18808  0.0  0.1   5128   676 pts/1    R+   23:45   0:00 grep css


    ⑧  DBCA过程

LVM上实施ASM_第1张图片

LVM上实施ASM_第2张图片

LVM上实施ASM_第3张图片

LVM上实施ASM_第4张图片

LVM上实施ASM_第5张图片

 

    ⑨  启动ASM实例

[oracle@localhost ~]$ export ORACLE_SID=+ASM
[oracle@localhost ~]$ sqlplus /nolog

SQL*Plus: Release 10.2.0.1.0 - Production on Thu Nov 1 00:19:25 2012

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

idle> conn / as sysdba
Connected to an idle instance.
idle> startup
ASM instance started

Total System Global Area   83886080 bytes
Fixed Size                  1217836 bytes
Variable Size              57502420 bytes
ASM Cache                  25165824 bytes
ASM diskgroups mounted


 

    小结:

            尽管官网上不建议在LVM上布局ASM、但我所在的环境便是在lvm上折腾的.....。当然、在搭建ASM中还有很多问题需要注意、我会在后续补上、这里只作简要了解。

你可能感兴趣的:(LVM上实施ASM)