首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > 其他数据库 >

LVM下实施ASM

2012-11-16 
LVM上实施ASM环境:RHEL-5.8oracle _10gR2绑定裸设备[root@localhost ~]# fdisk -lDisk /dev/sda: 32.2 GB,

LVM上实施ASM

    环境:RHEL-5.8     oracle _10gR2

 

    绑定裸设备

[root@localhost ~]# fdisk -lDisk /dev/sda: 32.2 GB, 32212254720 bytes255 heads, 63 sectors/track, 3916 cylindersUnits = 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 3chown -R oracle:oinstall /dev/raw/


    ④  校验裸设备

[root@localhost init.d]# chkconfig rawdevices on[root@localhost init.d]# partprobe[root@localhost init.d]# service rawdevices restartAssigning 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 12done[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总计 0crw------- 1 oracle oinstall 162, 10 10-31 23:35 raw10crw------- 1 oracle oinstall 162, 11 10-31 23:35 raw11crw------- 1 oracle oinstall 162, 12 10-31 23:35 raw12crw------- 1 oracle oinstall 162,  5 10-31 23:35 raw5crw------- 1 oracle oinstall 162,  6 10-31 23:35 raw6crw------- 1 oracle oinstall 162,  7 10-31 23:35 raw7crw------- 1 oracle oinstall 162,  8 10-31 23:35 raw8crw------- 1 oracle oinstall 162,  9 10-31 23:35 raw9[root@localhost raw]# chmod 660 *[root@localhost raw]# ls -l总计 0crw-rw---- 1 oracle oinstall 162, 10 10-31 23:35 raw10crw-rw---- 1 oracle oinstall 162, 11 10-31 23:35 raw11crw-rw---- 1 oracle oinstall 162, 12 10-31 23:35 raw12crw-rw---- 1 oracle oinstall 162,  5 10-31 23:35 raw5crw-rw---- 1 oracle oinstall 162,  6 10-31 23:35 raw6crw-rw---- 1 oracle oinstall 162,  7 10-31 23:35 raw7crw-rw---- 1 oracle oinstall 162,  8 10-31 23:35 raw8crw-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 initializedAdding 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.        localhostCSS 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 cssroot     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.binroot     18808  0.0  0.1   5128   676 pts/1    R+   23:45   0:00 grep css


    ⑧  DBCA过程

LVM下实施ASM

LVM下实施ASM

LVM下实施ASM

LVM下实施ASM

LVM下实施ASM

LVM下实施ASM

 

    ⑨  启动ASM实例

[oracle@localhost ~]$ export ORACLE_SID=+ASM[oracle@localhost ~]$ sqlplus /nologSQL*Plus: Release 10.2.0.1.0 - Production on Thu Nov 1 00:19:25 2012Copyright (c) 1982, 2005, Oracle.  All rights reserved.idle> conn / as sysdbaConnected to an idle instance.idle> startupASM instance startedTotal System Global Area   83886080 bytesFixed Size                  1217836 bytesVariable Size              57502420 bytesASM Cache                  25165824 bytesASM diskgroups mounted


 

    小结:

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

热点排行