将oracle10g安装在lvm映射的裸设备上

原创 2013年12月01日 22:50:02

oracle的数据文件放在裸设备上,提高了IO性能

sar命令中的“-b”选项可以用于监控裸设备I/O。裸设备一般用于存放数据库数据。

# sar -b 1 3

AIX 6f1 3 4 00023A0F4C00 06/19/02

18:16:30 bread/s   lread/s   %rcache  bwrit/s   lwrit/s   %wcache   pread/s  pwrit/s
18:16:31   0 0 0 0 0 0 0 0
18:16:32   0 0 0 0 0 0 0 0
18:16:33   0 0 0 0 0 0 0 0
                 
Average   0 0 0 0 0 0 0 0

其中bread/s 和bwrit/s显示了块裸设备(block raw device)I/O操作的数目。pread/s 和pwrit/s显示了字符裸设备(character raw device)I/O操作的数目

 

1. 创建磁盘分区
#fdisk /dev/sdc
#fdisk /dev/sdd
#fdisk /dev/sde

2. 创建pv(pvcreate)
[root@localhost ~]# pvcreate/dev/sdc1
Physical volume "/dev/sdc1" successfully created
[root@localhost ~]# pvcreate /dev/sdd1
Physical volume "/dev/sdd1" successfully created
[root@localhost ~]# pvcreate /dev/sde1
Physical volume "/dev/sde1" successfully created

[root@localhost ~]# pvs
PV        VG         Fmt Attr PSize PFree
/dev/sda2 VolGroup00 lvm2 a-    9.88G 64.00M
/dev/sdb1 VolGroup00 lvm2 a-    9.97G     0
/dev/sdc1            lvm2 --   10.00G 10.00G
/dev/sdd1            lvm2 --   10.00G 10.00G
/dev/sde1            lvm2 --   10.00G 10.00G

3. 创建VG(vgcreate)
[root@localhost ~]# vgcreateVolOracle /dev/sdc1 /dev/sdd1 /dev/sde1
Volume group "VolOracle" successfully created

[root@localhost ~]# vgs
VG         #PV #LV #SN Attr  VSize VFree
VolGroup00   2   2   0 wz--n- 19.84G 64.00M
VolOracle    3   0   0 wz--n- 29.99G 29.99G
4. 创建相关的lv
spfile 10M
control1 50M
control2 50M
control3 50M
redo1_1 200M
redo2_1 200M
redo3_1 200M
system01 1024M
sysaux01 1024M
infodb 3096M
temp 500M
users 200M
undotbs 500M

[root@localhost ~]# lvcreate -L 10M -n spfile VolOracle
Rounding up size to full physical extent 12.00 MB
Logical volume "spfile" created
[root@localhost ~]# lvcreate -L 50M -n control1 VolOracle
Rounding up size to full physical extent 52.00 MB
Logical volume "control1" created
[root@localhost ~]# lvcreate -L 50M -n control2 VolOracle
Rounding up size to full physical extent 52.00 MB
Logical volume "control2" created
[root@localhost ~]# lvcreate -L 50M -n control3 VolOracle
Rounding up size to full physical extent 52.00 MB
Logical volume "control3" created
[root@localhost ~]# lvcreate -L 200M -n redo1_1 VolOracle
Logical volume "redo1_1" created
[root@localhost ~]# lvcreate -L 200M -n redo2_1 VolOracle
Logical volume "redo2_1" created
[root@localhost ~]# lvcreate -L 200M -n redo3_1 VolOracle
Logical volume "redo3_1" created
[root@localhost ~]# lvcreate -L 1024M -n system01 VolOracle
Logical volume "system01" created
[root@localhost ~]# lvcreate -L 1024M -n sysaux01 VolOracle
Logical volume "sysaux01" created
[root@localhost ~]# lvcreate -L 3096M -n infodb VolOracle
Logical volume "infodb" created
[root@localhost ~]# lvcreate -L 500M -n temp VolOracle
Logical volume "temp" created
[root@localhost ~]# lvcreate -L 200M -n users VolOracle
Logical volume "users" created
[root@localhost ~]# lvcreate -L 500M -n undotbs1 VolOracle
Logical volume "undotbs1" created

5. 把刚创建的lv映射成裸设备
编辑:/etc/sysconfig/rawdevices
# raw device bindings
# format: <rawdev> <major> <minor>
#          <rawdev><blockdev>
# example: /dev/raw/raw1 /dev/sda1
#          /dev/raw/raw2 8 5
/dev/raw/raw1   /dev/mapper/VolOracle-control1
/dev/raw/raw2   /dev/mapper/VolOracle-control2
/dev/raw/raw3    /dev/mapper/VolOracle-control3
/dev/raw/raw4    /dev/mapper/VolOracle-infodb
/dev/raw/raw5    /dev/mapper/VolOracle-redo1_1
/dev/raw/raw6    /dev/mapper/VolOracle-redo2_1
/dev/raw/raw7    /dev/mapper/VolOracle-redo3_1
/dev/raw/raw8    /dev/mapper/VolOracle-spfile
/dev/raw/raw9    /dev/mapper/VolOracle-sysaux01
/dev/raw/raw10    /dev/mapper/VolOracle-system01
/dev/raw/raw11   /dev/mapper/VolOracle-temp
/dev/raw/raw12    /dev/mapper/VolOracle-undotbs1
/dev/raw/raw13    /dev/mapper/VolOracle-users
/dev/raw/raw14 /dev/mapper/VolOracle-redo1_2
/dev/raw/raw15 /dev/mapper/VolOracle-redo2_2
/dev/raw/raw16 /dev/mapper/VolOracle-redo3_2

[root@localhost etc]# raw -qa
[root@infodb sysconfig]# service rawdevices restart
Assigning devices:
           /dev/raw/raw1-->   /dev/mapper/VolOracle-control1
Error setting raw device (Device or resource busy)
           /dev/raw/raw2-->   /dev/mapper/VolOracle-control2
Error setting raw device (Device or resource busy)
           /dev/raw/raw3-->   /dev/mapper/VolOracle-control3
Error setting raw device (Device or resource busy)
           /dev/raw/raw4-->   /dev/mapper/VolOracle-infodb
/dev/raw/raw4: bound to major 253, minor 11
           /dev/raw/raw5-->   /dev/mapper/VolOracle-redo1_1
Error setting raw device (Device or resource busy)
           /dev/raw/raw6-->   /dev/mapper/VolOracle-redo2_1
/dev/raw/raw6: bound to major 253, minor 7
           /dev/raw/raw7-->   /dev/mapper/VolOracle-redo3_1
/dev/raw/raw7: bound to major 253, minor 8
           /dev/raw/raw8-->   /dev/mapper/VolOracle-spfile
/dev/raw/raw8: bound to major 253, minor 2
           /dev/raw/raw9-->   /dev/mapper/VolOracle-sysaux01
Error setting raw device (Device or resource busy)
           /dev/raw/raw10-->   /dev/mapper/VolOracle-system01
Error setting raw device (Device or resource busy)
           /dev/raw/raw11-->   /dev/mapper/VolOracle-temp
Error setting raw device (Device or resource busy)
           /dev/raw/raw12-->   /dev/mapper/VolOracle-undotbs1
Error setting raw device (Device or resource busy)
           /dev/raw/raw13-->   /dev/mapper/VolOracle-users
Error setting raw device (Device or resource busy)
           /dev/raw/raw14-->   /dev/mapper/VolOracle-redo1_2
Error setting raw device (Device or resource busy)
           /dev/raw/raw15-->   /dev/mapper/VolOracle-redo2_2
/dev/raw/raw15: bound to major 253, minor 17
           /dev/raw/raw16-->   /dev/mapper/VolOracle-redo3_2
/dev/raw/raw16: bound to major 253, minor 18
done
[root@infodb sysconfig]# raw -qa
/dev/raw/raw1: bound to major 253, minor 3
/dev/raw/raw2: bound to major 253, minor 4
/dev/raw/raw3: bound to major 253, minor 5
/dev/raw/raw4: bound to major 253, minor 11
/dev/raw/raw5: bound to major 253, minor 6
/dev/raw/raw6: bound to major 253, minor 7
/dev/raw/raw7: bound to major 253, minor 8
/dev/raw/raw8: bound to major 253, minor 2
/dev/raw/raw9: bound to major 253, minor 10
/dev/raw/raw10: bound to major 253, minor 9
/dev/raw/raw11: bound to major 253, minor 12
/dev/raw/raw12: bound to major 253, minor 14
/dev/raw/raw13: bound to major 253, minor 13
/dev/raw/raw14: bound to major 253, minor 16
/dev/raw/raw15: bound to major 253, minor 17
/dev/raw/raw16: bound to major 253, minor 18

[root@infodb sysconfig]# ll /dev/raw
total 0
crw-rw---- 1 oracle dba 162, 1 Aug 19 10:55 raw1
crw-rw---- 1 oracle dba 162, 10 Aug 19 10:55 raw10
crw-rw---- 1 oracle dba 162, 11 Aug 19 10:55 raw11
crw-rw---- 1 oracle dba 162, 12 Aug 19 10:55 raw12
crw-rw---- 1 oracle dba 162, 13 Aug 19 10:55 raw13
crw-rw---- 1 oracle dba 162, 14 Aug 19 10:55 raw14
crw-rw---- 1 oracle dba 162, 15 Aug 19 11:17 raw15
crw-rw---- 1 oracle dba 162, 16 Aug 19 11:17 raw16
crw-rw---- 1 oracle dba 162, 2 Aug 19 10:55 raw2
crw-rw---- 1 oracle dba 162, 3 Aug 19 10:55 raw3
crw-rw---- 1 oracle dba 162, 4 Aug 19 11:17 raw4
crw-rw---- 1 oracle dba 162, 5 Aug 19 10:55 raw5
crw-rw---- 1 oracle dba 162, 6 Aug 19 11:17 raw6
crw-rw---- 1 oracle dba 162, 7 Aug 19 11:17 raw7
crw-rw---- 1 oracle dba 162, 8 Aug 19 11:17 raw8
crw-rw---- 1 oracle dba 162, 9 Aug 19 10:55 raw9

6. 创建oracle的安装卷
[root@localhost etc]# lvm
lvm> lvcreate -L 3g -n lv_oracle VolOracle
Logical volume "lv_oracle" created
lvm> exit
Exiting.
格式化刚创建的lv_oracle
[root@localhost ~]# mkfs.ext3 /dev/mapper/VolOracle-lv_oracle
创建要挂载到的目录:
[root@localhost ~]#mkdir /oracle
修改/etc/fstab,挂载文件系统
[root@localhost ~]#vi /etc/fstab
/dev/mapper/VolOracle-lv_oracle/oracle         auto   defaults        1 1
重启机器:
[root@localhost ~]#shutdown -ry 0

7. 更改系统的裸设备配置文件
[root@localhost ~]# vi/etc/udev/permissions.d/50-udev.permissions
[root@localhost ~]# cat /etc/udev/permissions.d/50-udev.permissions |grep raw
# raw devices
#raw/*:root:disk:0660
raw/*:oracle:dba:0660

设置相应的oracle环境和参数。
安装oracle软件(不创建数据库),用dbca单独创建数据库。

配置裸设备和数据库文件的映射:
$ORACLE_HOME/dbs/dbca_raw_config

control1=/dev/raw/raw1
control2=/dev/raw/raw2
control3=/dev/raw/raw3
infodb=/dev/raw/raw4
redo1_1=/dev/raw/raw5
redo1_2=/dev/raw/raw14
redo2_1=/dev/raw/raw6
redo2_2=/dev/raw/raw15
redo3_1=/dev/raw/raw7
redo3_2=/dev/raw/raw16
spfile=/dev/raw/raw8
sysaux=/dev/raw/raw9
system=/dev/raw/raw10
temp=/dev/raw/raw11
undotbs1=/dev/raw/raw12
users=/dev/raw/raw13

版权声明:本文为博主原创文章,未经博主允许不得转载。 举报

相关文章推荐

LVM裸设备建库oracle10g

[root@oel4 ~]# fdisk /dev/sdd\> [root@oel4 ~]# fdisk /dev/sddDevice contains neither a valid DOS par...

RedHat5.5+IBM DS4800+Oracle10g RAC+LVM安装

作者 阿九【转载时请务必以超链接形式标明文章原始出处和作者信息】 目        录... 1 一、硬件环境... 3 二、软件环境... 3 三、IP地址及主机名规划... 3 ...

我是如何成为一名python大咖的?

人生苦短,都说必须python,那么我分享下我是如何从小白成为Python资深开发者的吧。2014年我大学刚毕业..

aix上使用裸设备安装oracle10g数据库

aix上使用裸设备安装oracle10g数据库

Oracle10g 裸设备数据文件恢复,ORA-19501、ORA-27063

环境说明: OS:aix 6.1 DB:Oracle 10gR2  裸设备 使用rman备份整个数据库备份失败,提示71数据文件失败,单独备份这个数据文件 $ rman target / ...

Oracle10g Bug 4612267 补丁安装备忘录

一、bug症状和描述 症状: 当主机运行时间达198天或248天,cpu占用率就突然达到100%。此时操作系统命令可以执行,但Oracle的命令象lsnrctl、sqlplus、dbca等都会...
  • wocjj
  • wocjj
  • 2012-08-31 12:30
  • 445

Oracle10g客户端的安装配置详解

Oracle 10g客户端的安装配置对我们使用Oracle的用户来说是相当重要的,合理地安装配置好Oracle客户端会给我们的工作带来很大的方便。本文我们主要介绍一下Oracle 10g客户端的安...

CentOS5下oracle10g安装配置

1.  资源需要:至少1024 MB物理内存1024-2048 需1.5倍的交互空间2048-8192 需1倍的交互空间8192-更大 需0.75倍的交互空间至少400 MB临时目录空间oracle软...
  • wzhhe
  • wzhhe
  • 2011-03-15 09:56
  • 517

linux安装oracle10g

如转载,请注明出处:http://blog.csdn.net/robinson_0612/archive/2010/03/30/5431428.aspx             虽然 Oracle...

oracle10g安装

具体步骤如下: 1、执行Oracle10g中的安装文件,双击文件setup.exe。 (图1-1) 2、双击后将出现图1-1所示介面,等待数秒后,将显示图1-2所示介面,在这里我们选择“高级...
返回顶部
收藏助手
不良信息举报
您举报文章:深度学习:神经网络中的前向传播和反向传播算法推导
举报原因:
原因补充:

(最多只允许输入30个字)