没做过,在AIX下使用裸设备做数据文件失败,把过程贴出来,大家帮我找下原因说明一下,请不要“搜索一下”这样的回复,我找过很久都没好的答案 谢谢:)
# oslevel
5.2.0.0
# mklv -y 'raw000' -t 'raw' oravg 4
raw000
# ls -l /dev/raw000
brw-rw---- 1 root system 35, 16 Jan 14 10:38 /dev/raw000
# chmod 777 /dev/raw000
# chown oracle:dba /dev/raw000
# ls -l /dev/raw000
brwxrwxrwx 1 oracle dba 35, 16 Jan 14 10:38 /dev/raw000
# su - oracle
$ sqlplus "/ as sysdba"
SQL> create tablespace raw000
2 datafile '/dev/raw000' size 100m;
create tablespace raw000
*
ERROR at line 1:
ORA-01119: error in creating database file '/dev/raw000'
ORA-27038: skgfrcre: file exists
$ lslv raw000
LOGICAL VOLUME: raw000 VOLUME GROUP: oravg
LV IDENTIFIER: 005d666a00004c000000010cf7316165.16 PERMISSION: read/write
VG STATE: active/complete LV STATE: closed/syncd
TYPE: raw WRITE VERIFY: off
MAX LPs: 512 PP SIZE: 64 megabyte(s)
COPIES: 1 SCHED POLICY: parallel
LPs: 4 PPs: 4
STALE PPs: 0 BB POLICY: relocatable
INTER-POLICY: minimum RELOCATABLE: yes
INTRA-POLICY: middle UPPER BOUND: 32
MOUNT POINT: N/A LABEL: None
MIRROR WRITE CONSISTENCY: on/ACTIVE
EACH LP COPY ON A SEPARATE PV ?: yes
Serialize IO ?: NO
$
解决方法:
数据文件的名字写错了
你要用rraw000这个设备,不是那个块设备
chown oracle:dba /dev/rraw000
create tablespace raw000
datafile '/dev/rraw000' size 100m;
谢谢版主和各位朋友,问题解决了,是我概念理解的问题
创建lv时会同时生成2个设备,一个为字符设备,一个为块设备。
字符设备,C打头,在传输数据时一次传输一个字符,被称为裸设备,空间管理由数据库引擎来完成,而且由于使用的是原始分区避免了空间管理的开销,所以比文件系统在i/o方面更快些。
块设备,B打头,在传输时要经过cache。
再次试验:
# mklv -y 'rawtbs' -t 'raw' oravg 4
rawtbs
# ls -l /dev/*rawtbs*
brw-rw---- 1 root system 35, 17 Jan 14 15:08 /dev/rawtbs
crw-rw---- 1 root system 35, 17 Jan 14 15:08 /dev/rrawtbs
# lslv rawtbs
LOGICAL VOLUME: rawtbs VOLUME GROUP: oravg
LV IDENTIFIER: 005d666a00004c000000010cf7316165.17 PERMISSION: read/write
VG STATE: active/complete LV STATE: closed/syncd
TYPE: raw WRITE VERIFY: off
MAX LPs: 512 PP SIZE: 64 megabyte(s)
COPIES: 1 SCHED POLICY: parallel
LPs: 4 PPs: 4
STALE PPs: 0 BB POLICY: relocatable
INTER-POLICY: minimum RELOCATABLE: yes
INTRA-POLICY: middle UPPER BOUND: 32
MOUNT POINT: N/A LABEL: None
MIRROR WRITE CONSISTENCY: on/ACTIVE
EACH LP COPY ON A SEPARATE PV ?: yes
Serialize IO ?: NO
# chmod 775 /dev/rrawtbs
# chown oracle:dba /dev/rrawtbs
# ls -l /dev/*rawtbs*
brw-rw---- 1 root system 35, 17 Jan 14 15:08 /dev/rawtbs
crwxrwxr-x 1 oracle dba 35, 17 Jan 14 15:08 /dev/rrawtbs
# su - oracle
$ sqlplus "/ as sysdba"
SQL*Plus: Release 9.2.0.1.0 - Production on Sun Jan 14 15:10:10 2007
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
SQL> drop tablespace rawtbs including contents and datafiles;
drop tablespace rawtbs including contents and datafiles
*
ERROR at line 1:
ORA-00959: tablespace 'RAWTBS' does not exist
SQL> create tablespace rawtbs
2 datafile '/dev/rrawtbs' size 255m;
Tablespace created.
SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
$ ls -l /dev/*rawtbs*
brw-rw---- 1 root system 35, 17 Jan 14 15:08 /dev/rawtbs
crwxrwxr-x 1 oracle dba 35, 17 Jan 14 15:11 /dev/rrawtbs
$
用祼设备做数据文件建议创建软LINK,这样就像维护文件系统一样简单了,如:
ln -s /dev/rlv_test_8g_138 /u01/oracle/oradata/test/test_34.dbf
这样添加数据文件时,直接add datafile '/u01/oracle/oradata/test/test_34.dbf '
阅读(6217) | 评论(0) | 转发(0) |