AIX 5.3 裸设备建库

时间:2021-02-27 08:20:34
裸设备建库


1.首先查看要创建逻辑卷上的卷组datavg
datavg ppsize 为32M

[aix /] #lsvg datavg
VOLUME GROUP: datavg VG IDENTIFIER: 00cd04ce00004c00000001215271137f
VG STATE: active PP SIZE: 32 megabyte(s)
VG PERMISSION: read/write TOTAL PPs: 2187 (69984 megabytes)
MAX LVs: 256 FREE PPs: 625 (20000 megabytes)
LVs: 17 USED PPs: 1562 (49984 megabytes)
OPEN LVs: 15 QUORUM: 2
TOTAL PVs: 1 VG DESCRIPTORS: 2
STALE PVs: 0 STALE PPs: 0
ACTIVE PVs: 1 AUTO ON: yes
MAX PPs per VG: 30480
MAX PPs per PV: 3048 MAX PVs: 10
LTG size (Dynamic): 256 kilobyte(s) AUTO SYNC: no
HOT SPARE: no BB POLICY: relocatable



2.在datavg上建立好相应的裸设备

mklv -y'ctl01' -w'n' -s'n' -r'n' -t 'raw' datavg 2

mklv -y'ctl02' -w'n' -s'n' -r'n' -t 'raw' datavg 2

mklv -y'ctl03' -w'n' -s'n' -r'n' -t 'raw' datavg 2

mklv -y'redo01' -w'n' -s'n' -r'n' -t 'raw' datavg 2

mklv -y'redo02' -w'n' -s'n' -r'n' -t 'raw' datavg 2

mklv -y'redo03' -w'n' -s'n' -r'n' -t 'raw' datavg 2

mklv -y'system01' -w'n' -s'n' -r'n' -t 'raw' datavg 19

mklv -y'sysaux01' -w'n' -s'n' -r'n' -t 'raw' datavg 19

mklv -y'users01' -w'n' -s'n' -r'n' -t 'raw' datavg 19

mklv -y'undotbs01' -w'n' -s'n' -r'n' -t 'raw' datavg 19

mklv -y'temp01' -w'n' -s'n' -r'n' -t 'raw' datavg 19


3.建好后赋予相应的属主及其权限
注:是r开头的设备

chown -R oracle:oinstall /dev/rctl0*

chown -R oracle:oinstall /dev/rredo0*

chown -R oracle:oinstall /dev/rsys*

chown -R oracle:oinstall /dev/rundotbs01*

chown -R oracle:oinstall /dev/rtemp01*

chown -R oracle:oinstall /dev/rusers01*




查看复权后的结果

[aix94 /] #ls -al /dev/rctl0*
crwxrwxr-x 1 oracle oinstall 45, 5 Jun 8 16:11 /dev/rctl01
crwxrwxr-x 1 oracle oinstall 45, 6 Jun 8 16:11 /dev/rctl02
crwxrwxr-x 1 oracle oinstall 45, 7 Jun 8 16:11 /dev/rctl03

[aix94 /] #ls -al /dev/rredo0*
crwxrwxr-x 1 oracle oinstall 45, 8 Jun 8 22:00 /dev/rredo01
crwxrwxr-x 1 oracle oinstall 45, 10 Jun 8 16:14 /dev/rredo02
crwxrwxr-x 1 oracle oinstall 45, 11 Jun 8 22:00 /dev/rredo03

[aix94 /] #ls -al /dev/rsys*
crw-rw---- 1 oracle oinstall 45, 13 Jun 8 22:00 /dev/rsysaux01
crw-rw---- 1 oracle oinstall 45, 12 Jun 8 16:11 /dev/rsystem01

[aix94 /] #ls -al /dev/rusers01
crw-rw---- 1 oracle oinstall 45, 14 Jun 8 16:11 /dev/rusers01

[aix94 /] #ls -al /dev/rtemp01
crw-rw---- 1 oracle oinstall 45, 16 Jun 8 16:12 /dev/rtemp01

[aix94 /] #ls -al /dev/rundotbs01
crw-rw---- 1 oracle oinstall 45, 15 Jun 8 16:11 /dev/rundotbs01




[aix94 /] #lsvg -l datavg
TYPE均为RAW设备类

datavg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
ctl01 raw 2 2 1 open/syncd N/A
ctl02 raw 2 2 1 open/syncd N/A
ctl03 raw 2 2 1 open/syncd N/A
redo01 raw 2 2 1 open/syncd N/A
redo02 raw 2 2 1 open/syncd N/A
redo03 raw 2 2 1 open/syncd N/A
system01 raw 19 19 1 open/syncd N/A
sysaux01 raw 19 19 1 open/syncd N/A
users01 raw 19 19 1 open/syncd N/A
undotbs01 raw 19 19 1 open/syncd N/A
temp01 raw 19 19 1 open/syncd N/A



[aix94 /] #su -oracle
添加裸设备mapping文件

oracle$ vi raw.txt

添加以下内容

system=/dev/rsystem01
undotbs1=/dev/rundotbs01
redo1_1=/dev/rredo01
redo1_2=/dev/rredo02
redo1_3=/dev/rredo03
control1=/dev/rctl01
control2=/dev/rctl02
control3=/dev/rctl03
users=/dev/rusers01
temp=/dev/rtemp01
sysaux=/dev/rsysaux01

bash-3.2$ more .profile

添加
DBCA_RAW_CONFIG=/u01/oracle/product/10.2.0/db_2/dbs/raw.txt export DBCA_RAW_CONFIG

完成就就可以DBCA创建数据库了