ASM Using OS Files Instead of Real Raw Devices On Windows. [ID 602620.1]
2011-04-20 14:43
495 查看
Windows 平台下,使用OS files 代替raw devices,步骤如下:
1) If the ASM instance was not created, then create an ASM instance thru the DBCA .
2) Update the initialization parameter file with the next hidden parameter:
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, Oracle Label Security, OLAP and Data Mining options
INSTANCE_NAME
----------------
+asm
SQL> alter system set "_asm_allow_only_raw_disks"=false scope=spfile;
System altered.
3) If you have real raw devices you will see them after create the ASM instance:
SQL> select path from v$asm_disk;
PATH
--------------------------------------------------------------------------------
//./ORCLDISKDG0
//./ORCLDISKDG1
//./ORCLDISKDATA0
//./ORCLDISKDATA1
//./ORCLDISKDATA2
//./ORCLDISKDATA3
//./ORCLDISKFRA0
//./ORCLDISKFRA1
8 rows selected.
4) Create the new directory to allocate the fake files/disks:
SQL> host mkdir d:/asmfake
5) Update the ASM instance with the new path associated with the fake directory:
SQL> alter system set asm_diskstring='//./ORCLDISK*','d:/asmfake/*' scope=both;
System altered.
6) Shutdown and startup the ASM instance to apply the changes:
SQL> shutdown
ASM diskgroups dismounted
ASM instance shutdown
SQL> startup
ASM instance started
Total System Global Area 83886080 bytes
Fixed Size 1289028 bytes
Variable Size 57431228 bytes
ASM Cache 25165824 bytes
ASM diskgroups mounted
SQL> show parameter asm
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
_asm_allow_only_raw_disks boolean FALSE
asm_diskgroups string DATADG, FRADG
asm_diskstring string //./ORCLDISK*, d:/asmfake/*
asm_power_limit integer 1
7) In order to create fake files to be used as ASM disks you will need to create them thru the dd command, therefore please install the dd command for windows, you can download it from: http://www.chrysocome.net/dd
8) Then create the desired fake disks/files on the fake directory:
SQL> host dd if=/dev/zero of=d:/asmfake/fakeasm1 bs=1k count=1000000
1000000+0 records in
1000000+0 records out
SQL> host dd if=/dev/zero of=d:/asmfake/fakeasm2 bs=1k count=1000000
1000000+0 records in
1000000+0 records out
SQL> host dd if=/dev/zero of=d:/asmfake/fakeasm3 bs=1k count=1000000
1000000+0 records in
1000000+0 records out
SQL> host dd if=/dev/zero of=d:/asmfake/fakeasm4 bs=1k count=1000000
1000000+0 records in
1000000+0 records out
SQL> host dir d:/asmfake/*
Volume in drive D is New Volume
Volume Serial Number is 94B6-1FC7
Directory of d:/asmfake
06/11/2008 03:00 PM <DIR> .
06/11/2008 03:00 PM <DIR> ..
06/11/2008 02:58 PM 1,024,000,000 fakeasm1
06/11/2008 02:59 PM 1,024,000,000 fakeasm2
06/11/2008 03:00 PM 1,024,000,000 fakeasm3
06/11/2008 03:01 PM 1,024,000,000 fakeasm4
4 File(s) 4,096,000,000 bytes
2 Dir(s) 19,148,734,464 bytes free
9) Connect to the ASM instance and make sure the fake disks are visible:
SQL> select path from v$asm_disk;
PATH
----------------------------------------------------------
D:/ASMFAKE/FAKEASM1
D:/ASMFAKE/FAKEASM2
D:/ASMFAKE/FAKEASM3
D:/ASMFAKE/FAKEASM4
//./ORCLDISKDG0
//./ORCLDISKDG1
//./ORCLDISKDATA0
//./ORCLDISKDATA1
//./ORCLDISKDATA2
//./ORCLDISKDATA3
//./ORCLDISKFRA0
//./ORCLDISKFRA1
12 rows selected.
10) Then create diskgroup(s) using the fake disks:
SQL> create diskgroup TEST external redundancy disk 'D:/ASMFAKE/FAKEASM1',
2 'D:/ASMFAKE/FAKEASM2',
3 'D:/ASMFAKE/FAKEASM3',
4 'D:/ASMFAKE/FAKEASM4';
Diskgroup created.
SQL> select name, state from v$asm_diskgroup;
NAME STATE
------------------------------ -----------
DATADG MOUNTED
FRADG MOUNTED
TEST MOUNTED
SQL> select name, path from v$asm_disk where group_number =3;
NAME PATH
------------------------------ ----------------------------------
TEST_0000 D:/ASMFAKE/FAKEASM1
TEST_0001 D:/ASMFAKE/FAKEASM2
TEST_0002 D:/ASMFAKE/FAKEASM3
TEST_0003 D:/ASMFAKE/FAKEASM4
11) Now your new diskgroup was created using OS files.
From Oracle
-------------------------------------------------------------------------------------------------------
Blog: http://blog.csdn.net/tianlesoftware
Email: dvd.dba@gmail.com
DBA1 群:62697716(满); DBA2 群:62697977(满) DBA3 群:62697850(满)
DBA 超级群:63306533(满); DBA4 群: 83829929 DBA5群: 142216823
聊天 群:40132017 聊天2群:69087192
--加群需要在备注说明Oracle表空间和数据文件的关系,否则拒绝申请
1) If the ASM instance was not created, then create an ASM instance thru the DBCA .
2) Update the initialization parameter file with the next hidden parameter:
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, Oracle Label Security, OLAP and Data Mining options
INSTANCE_NAME
----------------
+asm
SQL> alter system set "_asm_allow_only_raw_disks"=false scope=spfile;
System altered.
3) If you have real raw devices you will see them after create the ASM instance:
SQL> select path from v$asm_disk;
PATH
--------------------------------------------------------------------------------
//./ORCLDISKDG0
//./ORCLDISKDG1
//./ORCLDISKDATA0
//./ORCLDISKDATA1
//./ORCLDISKDATA2
//./ORCLDISKDATA3
//./ORCLDISKFRA0
//./ORCLDISKFRA1
8 rows selected.
4) Create the new directory to allocate the fake files/disks:
SQL> host mkdir d:/asmfake
5) Update the ASM instance with the new path associated with the fake directory:
SQL> alter system set asm_diskstring='//./ORCLDISK*','d:/asmfake/*' scope=both;
System altered.
6) Shutdown and startup the ASM instance to apply the changes:
SQL> shutdown
ASM diskgroups dismounted
ASM instance shutdown
SQL> startup
ASM instance started
Total System Global Area 83886080 bytes
Fixed Size 1289028 bytes
Variable Size 57431228 bytes
ASM Cache 25165824 bytes
ASM diskgroups mounted
SQL> show parameter asm
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
_asm_allow_only_raw_disks boolean FALSE
asm_diskgroups string DATADG, FRADG
asm_diskstring string //./ORCLDISK*, d:/asmfake/*
asm_power_limit integer 1
7) In order to create fake files to be used as ASM disks you will need to create them thru the dd command, therefore please install the dd command for windows, you can download it from: http://www.chrysocome.net/dd
8) Then create the desired fake disks/files on the fake directory:
SQL> host dd if=/dev/zero of=d:/asmfake/fakeasm1 bs=1k count=1000000
1000000+0 records in
1000000+0 records out
SQL> host dd if=/dev/zero of=d:/asmfake/fakeasm2 bs=1k count=1000000
1000000+0 records in
1000000+0 records out
SQL> host dd if=/dev/zero of=d:/asmfake/fakeasm3 bs=1k count=1000000
1000000+0 records in
1000000+0 records out
SQL> host dd if=/dev/zero of=d:/asmfake/fakeasm4 bs=1k count=1000000
1000000+0 records in
1000000+0 records out
SQL> host dir d:/asmfake/*
Volume in drive D is New Volume
Volume Serial Number is 94B6-1FC7
Directory of d:/asmfake
06/11/2008 03:00 PM <DIR> .
06/11/2008 03:00 PM <DIR> ..
06/11/2008 02:58 PM 1,024,000,000 fakeasm1
06/11/2008 02:59 PM 1,024,000,000 fakeasm2
06/11/2008 03:00 PM 1,024,000,000 fakeasm3
06/11/2008 03:01 PM 1,024,000,000 fakeasm4
4 File(s) 4,096,000,000 bytes
2 Dir(s) 19,148,734,464 bytes free
9) Connect to the ASM instance and make sure the fake disks are visible:
SQL> select path from v$asm_disk;
PATH
----------------------------------------------------------
D:/ASMFAKE/FAKEASM1
D:/ASMFAKE/FAKEASM2
D:/ASMFAKE/FAKEASM3
D:/ASMFAKE/FAKEASM4
//./ORCLDISKDG0
//./ORCLDISKDG1
//./ORCLDISKDATA0
//./ORCLDISKDATA1
//./ORCLDISKDATA2
//./ORCLDISKDATA3
//./ORCLDISKFRA0
//./ORCLDISKFRA1
12 rows selected.
10) Then create diskgroup(s) using the fake disks:
SQL> create diskgroup TEST external redundancy disk 'D:/ASMFAKE/FAKEASM1',
2 'D:/ASMFAKE/FAKEASM2',
3 'D:/ASMFAKE/FAKEASM3',
4 'D:/ASMFAKE/FAKEASM4';
Diskgroup created.
SQL> select name, state from v$asm_diskgroup;
NAME STATE
------------------------------ -----------
DATADG MOUNTED
FRADG MOUNTED
TEST MOUNTED
SQL> select name, path from v$asm_disk where group_number =3;
NAME PATH
------------------------------ ----------------------------------
TEST_0000 D:/ASMFAKE/FAKEASM1
TEST_0001 D:/ASMFAKE/FAKEASM2
TEST_0002 D:/ASMFAKE/FAKEASM3
TEST_0003 D:/ASMFAKE/FAKEASM4
11) Now your new diskgroup was created using OS files.
From Oracle
-------------------------------------------------------------------------------------------------------
Blog: http://blog.csdn.net/tianlesoftware
Email: dvd.dba@gmail.com
DBA1 群:62697716(满); DBA2 群:62697977(满) DBA3 群:62697850(满)
DBA 超级群:63306533(满); DBA4 群: 83829929 DBA5群: 142216823
聊天 群:40132017 聊天2群:69087192
--加群需要在备注说明Oracle表空间和数据文件的关系,否则拒绝申请
相关文章推荐
- Example Source Code: Using Face Detection To Create The Illusion Of Real 3D On iOS Devices
- Issue 71 - pymssql - Undefined symbols on Mac, CentOS, Redhat with pre-compiled build - A fast MS SQL Server client library for Python directly using C API instead of ODBC. It is Python DB-API 2.0 compliant. Works on Linux, *BSD, Solaris, Mac OS X and Win
- Recusively change the owner of files (chown) on Mac OS X
- How to restore ASM based OCR after complete loss of the CRS diskgroup on Linux systems[ID 1062983.1]
- How To Get The Size of RAW Devices On Linux
- Mount Options for Oracle files when used with NFS on NAS devices (文档 ID 359515.1)
- Using Raw Devices in Oracle ASM
- Plan9 Files -- Notes of Introduction to OS Abstractions Using Plan 9 from Bell Labs(IV)
- Configuring raw devices (multipath) for Oracle Clusterware 10g Release 2 (10.2.0) on RHEL5-OEL5 [ID 564580.1]
- Using freewheel.labs.autodesk.com to auto generate preview images of DWF files on your web site
- use JDBC connact postgres on os of linux and windows
- Configuring raw devices (multipath) for Oracle Clusterware 10g Release 2 (10.2.0) on RHEL5-OEL5 [ID 564580.1]
- How to collect the full path name of the files in ASM diskgroups (文档 ID 888943.1)
- Mount Options for Oracle files when used with NFS on NAS devices (文档 ID 359515.1)
- Configuring raw devices (multipath) for Oracle Clusterware 10g Release 2 (10.2.0) on RHEL5-OEL5 [ID 564580.1]
- CRS-4258: Addition and deletion of voting files are not allowed because the voting files are on ASM
- Configuring raw devices (multipath) for Oracle Clusterware 10g Release 2 (10.2.0) on RHEL5-OEL5 [ID 564580.1]
- Configuring raw devices (multipath) for Oracle Clusterware 10g Release 2 (10.2.0) on RHEL5-OEL5 [ID
- CRS-4258: Addition and deletion of voting files are not allowed because the voting files are on ASM
- Configuring raw devices (multipath) for Oracle Clusterware 10g Release 2 (10.2.0) on RHEL5-OEL5 [ID 564580.1]