Create The ASM Instance
Create the Cluster Synchronization Services Daemon
On a single instance ASM running "localconfig add" as root configures CSS.
On a RAC environment CSS is one of the Oracle Clusterware processes.
[root@vasm ~]# /u01/app/oracle/product/10.2.0/db_1/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 initialized Adding to inittab Startup will be queued to init within 30 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. vasm CSS is active on all nodes. Oracle CSS service is installed and running under init(1M)
Check that the CSS process is up
[root@vasm ~]# ps -ef|grep css |grep -v grep root 13083 1 0 16:29 ? 00:00:00 /bin/sh /etc/init.d/init.cssd run oracle 13293 13083 0 16:29 ? 00:00:00 /u01/app/oracle/product/10.2.0/db_1/bin/ocssd.bin
Configure and Start a Listener
[oracle@vasm ~]$ cat /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora # listener.ora Network Configuration File: /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora # Generated by Oracle configuration tools. SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = zhongwc) (ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1) (SID_NAME = zhongwc) ) ) LISTENER = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = vasm)(PORT = 1521)) ) [oracle@vasm ~]$ lsnrctl start LSNRCTL for Linux: Version 10.2.0.5.0 - Production on 20-FEB-2013 16:34:59 Copyright (c) 1991, 2010, Oracle. All rights reserved. Starting /u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait... TNSLSNR for Linux: Version 10.2.0.5.0 - Production System parameter file is /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora Log messages written to /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=vasm)(PORT=1521))) Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=vasm)(PORT=1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 10.2.0.5.0 - Production Start Date 20-FEB-2013 16:34:59 Uptime 0 days 0 hr. 0 min. 0 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=vasm)(PORT=1521))) Services Summary... Service "zhongwc" has 1 instance(s). Instance "zhongwc", status UNKNOWN, has 1 handler(s) for this service... The command completed successfully
Setup a minimal ASM Pfile
[oracle@vasm ~]$ cat /u01/app/oracle/product/10.2.0/db_1/dbs/init+ASM.ora *.instance_type='asm' *.large_pool_size=12582912 *.sga_max_size=120M
With this pfile we can start the ASM Instance
[oracle@vasm ~]$ export ORACLE_SID=+ASM [oracle@vasm ~]$ sqlplus / as sysdba SQL*Plus: Release 10.2.0.5.0 - Production on Wed Feb 20 16:41:23 2013 Copyright (c) 1982, 2010, Oracle. All Rights Reserved. Connected to an idle instance. SQL> startup ASM instance started Total System Global Area 130023424 bytes Fixed Size 2094544 bytes Variable Size 102763056 bytes ASM Cache 25165824 bytes ORA-15110: no diskgroups mounted
SQL> create spfile from pfile; File created. SQL> shutdown immediate ORA-15100: invalid or missing diskgroup name ASM instance shutdown
Disk Discovery
On lab2 we defined 4 types of devices, Loop devices binded to files, Block devices, Block devices stamped as ASM disks with ASMLib and Files on filesystem (not binded to raw devices).
On this part of the lab we will discover these devices from within ASM.
Discovering Raw Devices
Start the ASM instance from the spfile and check the diskstring parameter, set the diskstring to find the rawdevices
[oracle@vasm ~]$ export ORACLE_SID=+ASM [oracle@vasm ~]$ sqlplus / as sysdba SQL*Plus: Release 10.2.0.5.0 - Production on Wed Feb 20 16:44:12 2013 Copyright (c) 1982, 2010, Oracle. All Rights Reserved. Connected to an idle instance. SQL> startup ASM instance started Total System Global Area 130023424 bytes Fixed Size 2094544 bytes Variable Size 102763056 bytes ASM Cache 25165824 bytes ORA-15110: no diskgroups mounted SQL> set lines 200 SQL> show parameter asm_diskstring NAME TYPE VALUE ------------------------------------ ---------------------- ------------------------------ asm_diskstring string
SQL> alter system set asm_diskstring='/dev/raw/raw*'; System altered. SQL> show parameter asm_diskstring NAME TYPE VALUE ------------------------------------ ---------------------- ------------------------------ asm_diskstring string /dev/raw/raw*
After having set the asm_diskstring parameter we can see the disks matching the pattern /dev/raw/raw*
SQL> select disk_number,mount_status,header_status,mode_status,state,path from v$asm_disk ; DISK_NUMBER MOUNT_STATUS HEADER_STATUS MODE_STATUS STATE PATH ----------- -------------- ------------------------ -------------- ---------------- ------------------------------ 0 CLOSED CANDIDATE ONLINE NORMAL /dev/raw/raw4 3 CLOSED CANDIDATE ONLINE NORMAL /dev/raw/raw1 2 CLOSED CANDIDATE ONLINE NORMAL /dev/raw/raw2 1 CLOSED CANDIDATE ONLINE NORMAL /dev/raw/raw3
Discovering Block Devices
We also defined block devices like /dev/sdb1, /dev/sdc1 etc. We will add this definition also to the diskstring.
We can see the the devices used to create disks with ASMLib appear as "PROVISIONED"
SQL> SELECT a.ksppinm "parameter", b.ksppstvl "session value", c.ksppstvl "instance value" FROM x$ksppi a, x$ksppcv b, x$ksppsv c WHERE a.indx = b.indx AND a.indx = c.indx AND a.ksppinm LIKE '/_%' escape '/' 8 AND a.ksppinm LIKE '%_asm_allow_only_raw_disks%'; parameter session value instance value ------------------------------ ------------------------------ ------------------------------ _asm_allow_only_raw_disks TRUE TRUE SQL> alter system set "_asm_allow_only_raw_disks"=false scope=spfile; System altered. SQL> shutdown immediate ORA-15100: invalid or missing diskgroup name ASM instance shutdown SQL> startup ASM instance started Total System Global Area 130023424 bytes Fixed Size 2094544 bytes Variable Size 102763056 bytes ASM Cache 25165824 bytes ORA-15110: no diskgroups mounted SQL> alter system set asm_diskstring='/dev/raw/raw*','/dev/sd*'; System altered. SQL> select disk_number,mount_status,header_status,mode_status,state,path from v$asm_disk order by 6; DISK_NUMBER MOUNT_STATUS HEADER_STATUS MODE_STATUS STATE PATH ----------- -------------- ------------------------ -------------- ---------------- ------------------------------ 3 CLOSED CANDIDATE ONLINE NORMAL /dev/raw/raw1 2 CLOSED CANDIDATE ONLINE NORMAL /dev/raw/raw2 1 CLOSED CANDIDATE ONLINE NORMAL /dev/raw/raw3 0 CLOSED CANDIDATE ONLINE NORMAL /dev/raw/raw4 19 CLOSED PROVISIONED ONLINE NORMAL /dev/sdb1 16 CLOSED PROVISIONED ONLINE NORMAL /dev/sdc1 15 CLOSED PROVISIONED ONLINE NORMAL /dev/sdd1 17 CLOSED PROVISIONED ONLINE NORMAL /dev/sde1 18 CLOSED CANDIDATE ONLINE NORMAL /dev/sdf1 14 CLOSED CANDIDATE ONLINE NORMAL /dev/sdg1 13 CLOSED CANDIDATE ONLINE NORMAL /dev/sdh1 12 CLOSED CANDIDATE ONLINE NORMAL /dev/sdi1 11 CLOSED CANDIDATE ONLINE NORMAL /dev/sdj1 10 CLOSED CANDIDATE ONLINE NORMAL /dev/sdk1 9 CLOSED CANDIDATE ONLINE NORMAL /dev/sdl1 8 CLOSED CANDIDATE ONLINE NORMAL /dev/sdm1 7 CLOSED CANDIDATE ONLINE NORMAL /dev/sdn1 6 CLOSED CANDIDATE ONLINE NORMAL /dev/sdo1 5 CLOSED CANDIDATE ONLINE NORMAL /dev/sdp1 4 CLOSED CANDIDATE ONLINE NORMAL /dev/sdq1 20 rows selected.
Discovering ASMLib Devices
We did set on Lab2 devices /dev/sdb1,sdc1,sdd1 and sde1 as ASM disks. The diskstring we are using show them as
“PROVISIONED” block devices.
We will change the diskstring to see them as ASM disks
Now when we check the available devices we will be able to see also the ASMLib provisioned disks as such
SQL> alter system set asm_diskstring='ORCL:VOL*','/dev/raw/raw*','/dev/sdf1','/dev/sdg1','/dev/sdh1','/dev/sdi1','/dev/sdj1','/dev/sdk1','/dev/sdl1','/dev/sdm1','/dev/sdn1','/dev/sdo1','/dev/sdp1','/dev/sdq1'; System altered. SQL> select disk_number,mount_status,header_status,mode_status,state,path from v$asm_disk order by 6; DISK_NUMBER MOUNT_STATUS HEADER_STATUS MODE_STATUS STATE PATH ----------- -------------- ------------------------ -------------- ---------------- ------------------------------ 3 CLOSED CANDIDATE ONLINE NORMAL /dev/raw/raw1 2 CLOSED CANDIDATE ONLINE NORMAL /dev/raw/raw2 1 CLOSED CANDIDATE ONLINE NORMAL /dev/raw/raw3 0 CLOSED CANDIDATE ONLINE NORMAL /dev/raw/raw4 18 CLOSED CANDIDATE ONLINE NORMAL /dev/sdf1 14 CLOSED CANDIDATE ONLINE NORMAL /dev/sdg1 13 CLOSED CANDIDATE ONLINE NORMAL /dev/sdh1 12 CLOSED CANDIDATE ONLINE NORMAL /dev/sdi1 11 CLOSED CANDIDATE ONLINE NORMAL /dev/sdj1 10 CLOSED CANDIDATE ONLINE NORMAL /dev/sdk1 9 CLOSED CANDIDATE ONLINE NORMAL /dev/sdl1 8 CLOSED CANDIDATE ONLINE NORMAL /dev/sdm1 7 CLOSED CANDIDATE ONLINE NORMAL /dev/sdn1 6 CLOSED CANDIDATE ONLINE NORMAL /dev/sdo1 5 CLOSED CANDIDATE ONLINE NORMAL /dev/sdp1 4 CLOSED CANDIDATE ONLINE NORMAL /dev/sdq1 15 CLOSED PROVISIONED ONLINE NORMAL ORCL:VOL1 16 CLOSED PROVISIONED ONLINE NORMAL ORCL:VOL2 17 CLOSED PROVISIONED ONLINE NORMAL ORCL:VOL3 19 CLOSED PROVISIONED ONLINE NORMAL ORCL:VOL4 20 rows selected.
Creating Disk Groups Using Loop Devices
Disk Groups can be created using DBCA if we do build the ASM instance with it. Otherwise we may use either command
line or Enterprise Manager.
Create 2 disk groups on the loop devices
SQL> create diskgroup DATADG external redundancy disk '/dev/raw/raw1','/dev/raw/raw2'; Diskgroup created. SQL> create diskgroup ARCHDG external redundancy disk '/dev/raw/raw3','/dev/raw/raw4'; Diskgroup created.
Check the ASM disks again
SQL> select disk_number,mount_status,header_status,mode_status,state,path from v$asm_disk order by 6; DISK_NUMBER MOUNT_STATUS HEADER_STATUS MODE_STATUS STATE PATH ----------- -------------- ------------------------ -------------- ---------------- ------------------------------ 0 CACHED MEMBER ONLINE NORMAL /dev/raw/raw1 1 CACHED MEMBER ONLINE NORMAL /dev/raw/raw2 0 CACHED MEMBER ONLINE NORMAL /dev/raw/raw3 1 CACHED MEMBER ONLINE NORMAL /dev/raw/raw4 18 CLOSED CANDIDATE ONLINE NORMAL /dev/sdf1 14 CLOSED CANDIDATE ONLINE NORMAL /dev/sdg1 13 CLOSED CANDIDATE ONLINE NORMAL /dev/sdh1 12 CLOSED CANDIDATE ONLINE NORMAL /dev/sdi1 11 CLOSED CANDIDATE ONLINE NORMAL /dev/sdj1 10 CLOSED CANDIDATE ONLINE NORMAL /dev/sdk1 9 CLOSED CANDIDATE ONLINE NORMAL /dev/sdl1 8 CLOSED CANDIDATE ONLINE NORMAL /dev/sdm1 7 CLOSED CANDIDATE ONLINE NORMAL /dev/sdn1 6 CLOSED CANDIDATE ONLINE NORMAL /dev/sdo1 5 CLOSED CANDIDATE ONLINE NORMAL /dev/sdp1 4 CLOSED CANDIDATE ONLINE NORMAL /dev/sdq1 15 CLOSED PROVISIONED ONLINE NORMAL ORCL:VOL1 16 CLOSED PROVISIONED ONLINE NORMAL ORCL:VOL2 17 CLOSED PROVISIONED ONLINE NORMAL ORCL:VOL3 19 CLOSED PROVISIONED ONLINE NORMAL ORCL:VOL4 20 rows selected.
KFED
Build the Kfed Utility
This procedure can be used from version 10.2
[oracle@vasm ~]$ cd $ORACLE_HOME/rdbms/lib [oracle@vasm lib]$ make -f ins_rdbms.mk ikfed Linking KFED utility (kfed) rm -f /u01/app/oracle/product/10.2.0/db_1/rdbms/lib/kfed gcc -o /u01/app/oracle/product/10.2.0/db_1/rdbms/lib/kfed -L/u01/app/oracle/product/10.2.0/db_1/rdbms/lib/ -L/u01/app/oracle/product/10.2.0/db_1/lib/ -L/u01/app/oracle/product/10.2.0/db_1/lib/stubs/ /u01/app/oracle/product/10.2.0/db_1/lib/s0main.o /u01/app/oracle/product/10.2.0/db_1/rdbms/lib/sskfeded.o /u01/app/oracle/product/10.2.0/db_1/rdbms/lib/skfedpt.o /u01/app/oracle/product/10.2.0/db_1/rdbms/lib/defopt.o -ldbtools10 -lclntsh `cat /u01/app/oracle/product/10.2.0/db_1/lib/ldflags` -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /u01/app/oracle/product/10.2.0/db_1/lib/ldflags` -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lclient10 -lnnetd10 -lvsn10 -lcommon10 -lgeneric10 -lmm -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 `cat /u01/app/oracle/product/10.2.0/db_1/lib/ldflags` -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /u01/app/oracle/product/10.2.0/db_1/lib/ldflags` -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lclient10 -lnnetd10 -lvsn10 -lcommon10 -lgeneric10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 -lclient10 -lnnetd10 -lvsn10 -lcommon10 -lgeneric10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 `cat /u01/app/oracle/product/10.2.0/db_1/lib/sysliblist` -Wl,-rpath,/u01/app/oracle/product/10.2.0/db_1/lib -lm `cat /u01/app/oracle/product/10.2.0/db_1/lib/sysliblist` -ldl -lm -L/u01/app/oracle/product/10.2.0/db_1/lib mv -f /u01/app/oracle/product/10.2.0/db_1/bin/kfed /u01/app/oracle/product/10.2.0/db_1/bin/kfedO mv: cannot stat `/u01/app/oracle/product/10.2.0/db_1/bin/kfed': No such file or directory make: [ikfed] Error 1 (ignored) mv /u01/app/oracle/product/10.2.0/db_1/rdbms/lib/kfed /u01/app/oracle/product/10.2.0/db_1/bin/kfed chmod 751 /u01/app/oracle/product/10.2.0/db_1/bin/kfed
Check Disk Headers Using Kfed
Kfed run as oracle need to have read permissions on the device, in this example we run kfed against the raw device we used to bind to the physical device
[oracle@vasm ~]$ kfed read /dev/raw/raw1 kfbh.endian: 1 ; 0x000: 0x01 kfbh.hard: 130 ; 0x001: 0x82 kfbh.type: 1 ; 0x002: KFBTYP_DISKHEAD kfbh.datfmt: 1 ; 0x003: 0x01 kfbh.block.blk: 0 ; 0x004: T=0 NUMB=0x0 kfbh.block.obj: 2147483648 ; 0x008: TYPE=0x8 NUMB=0x0 kfbh.check: 3975800556 ; 0x00c: 0xecf9e6ec kfbh.fcn.base: 0 ; 0x010: 0x00000000 kfbh.fcn.wrap: 0 ; 0x014: 0x00000000 kfbh.spare1: 0 ; 0x018: 0x00000000 kfbh.spare2: 0 ; 0x01c: 0x00000000 kfdhdb.driver.provstr: ORCLDISK ; 0x000: length=8 kfdhdb.driver.reserved[0]: 0 ; 0x008: 0x00000000 kfdhdb.driver.reserved[1]: 0 ; 0x00c: 0x00000000 kfdhdb.driver.reserved[2]: 0 ; 0x010: 0x00000000 kfdhdb.driver.reserved[3]: 0 ; 0x014: 0x00000000 kfdhdb.driver.reserved[4]: 0 ; 0x018: 0x00000000 kfdhdb.driver.reserved[5]: 0 ; 0x01c: 0x00000000 kfdhdb.compat: 168820736 ; 0x020: 0x0a100000 kfdhdb.dsknum: 0 ; 0x024: 0x0000 kfdhdb.grptyp: 1 ; 0x026: KFDGTP_EXTERNAL kfdhdb.hdrsts: 3 ; 0x027: KFDHDR_MEMBER kfdhdb.dskname: DATADG_0000 ; 0x028: length=11 kfdhdb.grpname: DATADG ; 0x048: length=6 kfdhdb.fgname: DATADG_0000 ; 0x068: length=11 kfdhdb.capname: ; 0x088: length=0 kfdhdb.crestmp.hi: 32983697 ; 0x0a8: HOUR=0x11 DAYS=0x14 MNTH=0x2 YEAR=0x7dd kfdhdb.crestmp.lo: 948619264 ; 0x0ac: USEC=0x0 MSEC=0x2b2 SECS=0x8 MINS=0xe kfdhdb.mntstmp.hi: 32983697 ; 0x0b0: HOUR=0x11 DAYS=0x14 MNTH=0x2 YEAR=0x7dd kfdhdb.mntstmp.lo: 962037760 ; 0x0b4: USEC=0x0 MSEC=0x1e2 SECS=0x15 MINS=0xe kfdhdb.secsize: 512 ; 0x0b8: 0x0200 kfdhdb.blksize: 4096 ; 0x0ba: 0x1000 kfdhdb.ausize: 1048576 ; 0x0bc: 0x00100000 kfdhdb.mfact: 113792 ; 0x0c0: 0x0001bc80 kfdhdb.dsksize: 500 ; 0x0c4: 0x000001f4 kfdhdb.pmcnt: 2 ; 0x0c8: 0x00000002 kfdhdb.fstlocn: 1 ; 0x0cc: 0x00000001 kfdhdb.altlocn: 2 ; 0x0d0: 0x00000002 kfdhdb.f1b1locn: 2 ; 0x0d4: 0x00000002 kfdhdb.redomirrors[0]: 0 ; 0x0d8: 0x0000 kfdhdb.redomirrors[1]: 0 ; 0x0da: 0x0000 kfdhdb.redomirrors[2]: 0 ; 0x0dc: 0x0000 kfdhdb.redomirrors[3]: 0 ; 0x0de: 0x0000 kfdhdb.dbcompat: 168820736 ; 0x0e0: 0x0a100000 kfdhdb.grpstmp.hi: 32983697 ; 0x0e4: HOUR=0x11 DAYS=0x14 MNTH=0x2 YEAR=0x7dd kfdhdb.grpstmp.lo: 948358144 ; 0x0e8: USEC=0x0 MSEC=0x1b3 SECS=0x8 MINS=0xe kfdhdb.ub4spare[0]: 0 ; 0x0ec: 0x00000000 kfdhdb.ub4spare[1]: 0 ; 0x0f0: 0x00000000 kfdhdb.ub4spare[2]: 0 ; 0x0f4: 0x00000000 kfdhdb.ub4spare[3]: 0 ; 0x0f8: 0x00000000 kfdhdb.ub4spare[4]: 0 ; 0x0fc: 0x00000000 kfdhdb.ub4spare[5]: 0 ; 0x100: 0x00000000 kfdhdb.ub4spare[6]: 0 ; 0x104: 0x00000000 kfdhdb.ub4spare[7]: 0 ; 0x108: 0x00000000 kfdhdb.ub4spare[8]: 0 ; 0x10c: 0x00000000 kfdhdb.ub4spare[9]: 0 ; 0x110: 0x00000000 kfdhdb.ub4spare[10]: 0 ; 0x114: 0x00000000 kfdhdb.ub4spare[11]: 0 ; 0x118: 0x00000000 kfdhdb.ub4spare[12]: 0 ; 0x11c: 0x00000000 kfdhdb.ub4spare[13]: 0 ; 0x120: 0x00000000 kfdhdb.ub4spare[14]: 0 ; 0x124: 0x00000000 kfdhdb.ub4spare[15]: 0 ; 0x128: 0x00000000 kfdhdb.ub4spare[16]: 0 ; 0x12c: 0x00000000 kfdhdb.ub4spare[17]: 0 ; 0x130: 0x00000000 kfdhdb.ub4spare[18]: 0 ; 0x134: 0x00000000 kfdhdb.ub4spare[19]: 0 ; 0x138: 0x00000000 kfdhdb.ub4spare[20]: 0 ; 0x13c: 0x00000000 kfdhdb.ub4spare[21]: 0 ; 0x140: 0x00000000 kfdhdb.ub4spare[22]: 0 ; 0x144: 0x00000000 kfdhdb.ub4spare[23]: 0 ; 0x148: 0x00000000 kfdhdb.ub4spare[24]: 0 ; 0x14c: 0x00000000 kfdhdb.ub4spare[25]: 0 ; 0x150: 0x00000000 kfdhdb.ub4spare[26]: 0 ; 0x154: 0x00000000 kfdhdb.ub4spare[27]: 0 ; 0x158: 0x00000000 kfdhdb.ub4spare[28]: 0 ; 0x15c: 0x00000000 kfdhdb.ub4spare[29]: 0 ; 0x160: 0x00000000 kfdhdb.ub4spare[30]: 0 ; 0x164: 0x00000000 kfdhdb.ub4spare[31]: 0 ; 0x168: 0x00000000 kfdhdb.ub4spare[32]: 0 ; 0x16c: 0x00000000 kfdhdb.ub4spare[33]: 0 ; 0x170: 0x00000000 kfdhdb.ub4spare[34]: 0 ; 0x174: 0x00000000 kfdhdb.ub4spare[35]: 0 ; 0x178: 0x00000000 kfdhdb.ub4spare[36]: 0 ; 0x17c: 0x00000000 kfdhdb.ub4spare[37]: 0 ; 0x180: 0x00000000 kfdhdb.ub4spare[38]: 0 ; 0x184: 0x00000000 kfdhdb.ub4spare[39]: 0 ; 0x188: 0x00000000 kfdhdb.ub4spare[40]: 0 ; 0x18c: 0x00000000 kfdhdb.ub4spare[41]: 0 ; 0x190: 0x00000000 kfdhdb.ub4spare[42]: 0 ; 0x194: 0x00000000 kfdhdb.ub4spare[43]: 0 ; 0x198: 0x00000000 kfdhdb.ub4spare[44]: 0 ; 0x19c: 0x00000000 kfdhdb.ub4spare[45]: 0 ; 0x1a0: 0x00000000 kfdhdb.ub4spare[46]: 0 ; 0x1a4: 0x00000000 kfdhdb.ub4spare[47]: 0 ; 0x1a8: 0x00000000 kfdhdb.ub4spare[48]: 0 ; 0x1ac: 0x00000000 kfdhdb.ub4spare[49]: 0 ; 0x1b0: 0x00000000 kfdhdb.ub4spare[50]: 0 ; 0x1b4: 0x00000000 kfdhdb.ub4spare[51]: 0 ; 0x1b8: 0x00000000 kfdhdb.ub4spare[52]: 0 ; 0x1bc: 0x00000000 kfdhdb.ub4spare[53]: 0 ; 0x1c0: 0x00000000 kfdhdb.ub4spare[54]: 0 ; 0x1c4: 0x00000000 kfdhdb.ub4spare[55]: 0 ; 0x1c8: 0x00000000 kfdhdb.ub4spare[56]: 0 ; 0x1cc: 0x00000000 kfdhdb.ub4spare[57]: 0 ; 0x1d0: 0x00000000 kfdhdb.acdb.aba.seq: 0 ; 0x1d4: 0x00000000 kfdhdb.acdb.aba.blk: 0 ; 0x1d8: 0x00000000 kfdhdb.acdb.ents: 0 ; 0x1dc: 0x0000 kfdhdb.acdb.ub2spare: 0 ; 0x1de: 0x0000
Kfed run against empty ASM disks /dev/sdb1 and empty block device /dev/sdf1
[oracle@vasm ~]$ kfed read /dev/sdb1 kfbh.endian: 0 ; 0x000: 0x00 kfbh.hard: 0 ; 0x001: 0x00 kfbh.type: 0 ; 0x002: KFBTYP_INVALID kfbh.datfmt: 0 ; 0x003: 0x00 kfbh.block.blk: 0 ; 0x004: T=0 NUMB=0x0 kfbh.block.obj: 0 ; 0x008: TYPE=0x0 NUMB=0x0 kfbh.check: 827084630 ; 0x00c: 0x314c4f56 kfbh.fcn.base: 0 ; 0x010: 0x00000000 kfbh.fcn.wrap: 0 ; 0x014: 0x00000000 kfbh.spare1: 0 ; 0x018: 0x00000000 kfbh.spare2: 0 ; 0x01c: 0x00000000
[oracle@vasm ~]$ kfed read /dev/sdf1 kfbh.endian: 0 ; 0x000: 0x00 kfbh.hard: 0 ; 0x001: 0x00 kfbh.type: 0 ; 0x002: KFBTYP_INVALID kfbh.datfmt: 0 ; 0x003: 0x00 kfbh.block.blk: 0 ; 0x004: T=0 NUMB=0x0 kfbh.block.obj: 0 ; 0x008: TYPE=0x0 NUMB=0x0 kfbh.check: 0 ; 0x00c: 0x00000000 kfbh.fcn.base: 0 ; 0x010: 0x00000000 kfbh.fcn.wrap: 0 ; 0x014: 0x00000000 kfbh.spare1: 0 ; 0x018: 0x00000000 kfbh.spare2: 0 ; 0x01c: 0x00000000
Creating Normal Redundancy Disk Groups Using Block Devices
SQL> create diskgroup datadgnr normal redundancy failgroup fg1 disk 'ORCL:VOL1','ORCL:VOL2' failgroup fg2 disk 'ORCL:VOL3','ORCL:VOL4'; Diskgroup created.
Check the disks groups and the disks that are already members of a diskgroup
SQL> select group_number, name, total_mb, free_mb, state, type from v$asm_diskgroup ; GROUP_NUMBER NAME TOTAL_MB FREE_MB STATE TYPE ------------ ---------- ---------- ---------- ---------------------- ------------ 1 DATADG 1000 948 MOUNTED EXTERN 2 ARCHDG 1000 948 MOUNTED EXTERN 3 DATADGNR 20461 20355 MOUNTED NORMAL SQL> select path,redundancy,total_mb,free_mb,failgroup from v$asm_disk where mount_status='CACHED' and header_status='MEMBER' and mode_status='ONLINE' and state='NORMAL' order by path ; PATH REDUNDANCY TOTAL_MB FREE_MB FAILGROUP ------------------------------ -------------- ---------- ---------- ------------------------- /dev/raw/raw1 UNKNOWN 500 473 DATADG_0000 /dev/raw/raw2 UNKNOWN 500 475 DATADG_0001 /dev/raw/raw3 UNKNOWN 500 473 ARCHDG_0000 /dev/raw/raw4 UNKNOWN 500 475 ARCHDG_0001 ORCL:VOL1 UNKNOWN 5114 5088 FG1 ORCL:VOL2 UNKNOWN 5119 5092 FG1 ORCL:VOL3 UNKNOWN 5114 5085 FG2 ORCL:VOL4 UNKNOWN 5114 5090 FG2 8 rows selected.
Comparing External And Normal Redundancy Disk Using Kfed
[oracle@vasm ~]$ kfed read /dev/raw/raw1 kfbh.endian: 1 ; 0x000: 0x01 kfbh.hard: 130 ; 0x001: 0x82 kfbh.type: 1 ; 0x002: KFBTYP_DISKHEAD kfbh.datfmt: 1 ; 0x003: 0x01 kfbh.block.blk: 0 ; 0x004: T=0 NUMB=0x0 kfbh.block.obj: 2147483648 ; 0x008: TYPE=0x8 NUMB=0x0 kfbh.check: 3975800556 ; 0x00c: 0xecf9e6ec kfbh.fcn.base: 0 ; 0x010: 0x00000000 kfbh.fcn.wrap: 0 ; 0x014: 0x00000000 kfbh.spare1: 0 ; 0x018: 0x00000000 kfbh.spare2: 0 ; 0x01c: 0x00000000 kfdhdb.driver.provstr: ORCLDISK ; 0x000: length=8 kfdhdb.driver.reserved[0]: 0 ; 0x008: 0x00000000 kfdhdb.driver.reserved[1]: 0 ; 0x00c: 0x00000000 kfdhdb.driver.reserved[2]: 0 ; 0x010: 0x00000000 kfdhdb.driver.reserved[3]: 0 ; 0x014: 0x00000000 kfdhdb.driver.reserved[4]: 0 ; 0x018: 0x00000000 kfdhdb.driver.reserved[5]: 0 ; 0x01c: 0x00000000 kfdhdb.compat: 168820736 ; 0x020: 0x0a100000 kfdhdb.dsknum: 0 ; 0x024: 0x0000 kfdhdb.grptyp: 1 ; 0x026: KFDGTP_EXTERNAL kfdhdb.hdrsts: 3 ; 0x027: KFDHDR_MEMBER kfdhdb.dskname: DATADG_0000 ; 0x028: length=11 kfdhdb.grpname: DATADG ; 0x048: length=6 kfdhdb.fgname: DATADG_0000 ; 0x068: length=11 kfdhdb.capname: ; 0x088: length=0 kfdhdb.crestmp.hi: 32983697 ; 0x0a8: HOUR=0x11 DAYS=0x14 MNTH=0x2 YEAR=0x7dd kfdhdb.crestmp.lo: 948619264 ; 0x0ac: USEC=0x0 MSEC=0x2b2 SECS=0x8 MINS=0xe kfdhdb.mntstmp.hi: 32983697 ; 0x0b0: HOUR=0x11 DAYS=0x14 MNTH=0x2 YEAR=0x7dd kfdhdb.mntstmp.lo: 962037760 ; 0x0b4: USEC=0x0 MSEC=0x1e2 SECS=0x15 MINS=0xe kfdhdb.secsize: 512 ; 0x0b8: 0x0200 kfdhdb.blksize: 4096 ; 0x0ba: 0x1000 kfdhdb.ausize: 1048576 ; 0x0bc: 0x00100000 kfdhdb.mfact: 113792 ; 0x0c0: 0x0001bc80 kfdhdb.dsksize: 500 ; 0x0c4: 0x000001f4 kfdhdb.pmcnt: 2 ; 0x0c8: 0x00000002 kfdhdb.fstlocn: 1 ; 0x0cc: 0x00000001 kfdhdb.altlocn: 2 ; 0x0d0: 0x00000002 kfdhdb.f1b1locn: 2 ; 0x0d4: 0x00000002 kfdhdb.redomirrors[0]: 0 ; 0x0d8: 0x0000 kfdhdb.redomirrors[1]: 0 ; 0x0da: 0x0000 kfdhdb.redomirrors[2]: 0 ; 0x0dc: 0x0000 kfdhdb.redomirrors[3]: 0 ; 0x0de: 0x0000 kfdhdb.dbcompat: 168820736 ; 0x0e0: 0x0a100000 kfdhdb.grpstmp.hi: 32983697 ; 0x0e4: HOUR=0x11 DAYS=0x14 MNTH=0x2 YEAR=0x7dd kfdhdb.grpstmp.lo: 948358144 ; 0x0e8: USEC=0x0 MSEC=0x1b3 SECS=0x8 MINS=0xe kfdhdb.ub4spare[0]: 0 ; 0x0ec: 0x00000000 kfdhdb.ub4spare[1]: 0 ; 0x0f0: 0x00000000 kfdhdb.ub4spare[2]: 0 ; 0x0f4: 0x00000000 kfdhdb.ub4spare[3]: 0 ; 0x0f8: 0x00000000 kfdhdb.ub4spare[4]: 0 ; 0x0fc: 0x00000000 kfdhdb.ub4spare[5]: 0 ; 0x100: 0x00000000 kfdhdb.ub4spare[6]: 0 ; 0x104: 0x00000000 kfdhdb.ub4spare[7]: 0 ; 0x108: 0x00000000 kfdhdb.ub4spare[8]: 0 ; 0x10c: 0x00000000 kfdhdb.ub4spare[9]: 0 ; 0x110: 0x00000000 kfdhdb.ub4spare[10]: 0 ; 0x114: 0x00000000 kfdhdb.ub4spare[11]: 0 ; 0x118: 0x00000000 kfdhdb.ub4spare[12]: 0 ; 0x11c: 0x00000000 kfdhdb.ub4spare[13]: 0 ; 0x120: 0x00000000 kfdhdb.ub4spare[14]: 0 ; 0x124: 0x00000000 kfdhdb.ub4spare[15]: 0 ; 0x128: 0x00000000 kfdhdb.ub4spare[16]: 0 ; 0x12c: 0x00000000 kfdhdb.ub4spare[17]: 0 ; 0x130: 0x00000000 kfdhdb.ub4spare[18]: 0 ; 0x134: 0x00000000 kfdhdb.ub4spare[19]: 0 ; 0x138: 0x00000000 kfdhdb.ub4spare[20]: 0 ; 0x13c: 0x00000000 kfdhdb.ub4spare[21]: 0 ; 0x140: 0x00000000 kfdhdb.ub4spare[22]: 0 ; 0x144: 0x00000000 kfdhdb.ub4spare[23]: 0 ; 0x148: 0x00000000 kfdhdb.ub4spare[24]: 0 ; 0x14c: 0x00000000 kfdhdb.ub4spare[25]: 0 ; 0x150: 0x00000000 kfdhdb.ub4spare[26]: 0 ; 0x154: 0x00000000 kfdhdb.ub4spare[27]: 0 ; 0x158: 0x00000000 kfdhdb.ub4spare[28]: 0 ; 0x15c: 0x00000000 kfdhdb.ub4spare[29]: 0 ; 0x160: 0x00000000 kfdhdb.ub4spare[30]: 0 ; 0x164: 0x00000000 kfdhdb.ub4spare[31]: 0 ; 0x168: 0x00000000 kfdhdb.ub4spare[32]: 0 ; 0x16c: 0x00000000 kfdhdb.ub4spare[33]: 0 ; 0x170: 0x00000000 kfdhdb.ub4spare[34]: 0 ; 0x174: 0x00000000 kfdhdb.ub4spare[35]: 0 ; 0x178: 0x00000000 kfdhdb.ub4spare[36]: 0 ; 0x17c: 0x00000000 kfdhdb.ub4spare[37]: 0 ; 0x180: 0x00000000 kfdhdb.ub4spare[38]: 0 ; 0x184: 0x00000000 kfdhdb.ub4spare[39]: 0 ; 0x188: 0x00000000 kfdhdb.ub4spare[40]: 0 ; 0x18c: 0x00000000 kfdhdb.ub4spare[41]: 0 ; 0x190: 0x00000000 kfdhdb.ub4spare[42]: 0 ; 0x194: 0x00000000 kfdhdb.ub4spare[43]: 0 ; 0x198: 0x00000000 kfdhdb.ub4spare[44]: 0 ; 0x19c: 0x00000000 kfdhdb.ub4spare[45]: 0 ; 0x1a0: 0x00000000 kfdhdb.ub4spare[46]: 0 ; 0x1a4: 0x00000000 kfdhdb.ub4spare[47]: 0 ; 0x1a8: 0x00000000 kfdhdb.ub4spare[48]: 0 ; 0x1ac: 0x00000000 kfdhdb.ub4spare[49]: 0 ; 0x1b0: 0x00000000 kfdhdb.ub4spare[50]: 0 ; 0x1b4: 0x00000000 kfdhdb.ub4spare[51]: 0 ; 0x1b8: 0x00000000 kfdhdb.ub4spare[52]: 0 ; 0x1bc: 0x00000000 kfdhdb.ub4spare[53]: 0 ; 0x1c0: 0x00000000 kfdhdb.ub4spare[54]: 0 ; 0x1c4: 0x00000000 kfdhdb.ub4spare[55]: 0 ; 0x1c8: 0x00000000 kfdhdb.ub4spare[56]: 0 ; 0x1cc: 0x00000000 kfdhdb.ub4spare[57]: 0 ; 0x1d0: 0x00000000 kfdhdb.acdb.aba.seq: 0 ; 0x1d4: 0x00000000 kfdhdb.acdb.aba.blk: 0 ; 0x1d8: 0x00000000 kfdhdb.acdb.ents: 0 ; 0x1dc: 0x0000 kfdhdb.acdb.ub2spare: 0 ; 0x1de: 0x0000
[oracle@vasm ~]$ kfed read /dev/oracleasm/disks/VOL1 kfbh.endian: 1 ; 0x000: 0x01 kfbh.hard: 130 ; 0x001: 0x82 kfbh.type: 1 ; 0x002: KFBTYP_DISKHEAD kfbh.datfmt: 1 ; 0x003: 0x01 kfbh.block.blk: 0 ; 0x004: T=0 NUMB=0x0 kfbh.block.obj: 2147483648 ; 0x008: TYPE=0x8 NUMB=0x0 kfbh.check: 4238712740 ; 0x00c: 0xfca59fa4 kfbh.fcn.base: 0 ; 0x010: 0x00000000 kfbh.fcn.wrap: 0 ; 0x014: 0x00000000 kfbh.spare1: 0 ; 0x018: 0x00000000 kfbh.spare2: 0 ; 0x01c: 0x00000000 kfdhdb.driver.provstr: ORCLDISKVOL1 ; 0x000: length=12 kfdhdb.driver.reserved[0]: 827084630 ; 0x008: 0x314c4f56 kfdhdb.driver.reserved[1]: 0 ; 0x00c: 0x00000000 kfdhdb.driver.reserved[2]: 0 ; 0x010: 0x00000000 kfdhdb.driver.reserved[3]: 0 ; 0x014: 0x00000000 kfdhdb.driver.reserved[4]: 0 ; 0x018: 0x00000000 kfdhdb.driver.reserved[5]: 0 ; 0x01c: 0x00000000 kfdhdb.compat: 168820736 ; 0x020: 0x0a100000 kfdhdb.dsknum: 0 ; 0x024: 0x0000 kfdhdb.grptyp: 2 ; 0x026: KFDGTP_NORMAL kfdhdb.hdrsts: 3 ; 0x027: KFDHDR_MEMBER kfdhdb.dskname: VOL1 ; 0x028: length=4 kfdhdb.grpname: DATADGNR ; 0x048: length=8 kfdhdb.fgname: FG1 ; 0x068: length=3 kfdhdb.capname: ; 0x088: length=0 kfdhdb.crestmp.hi: 32983697 ; 0x0a8: HOUR=0x11 DAYS=0x14 MNTH=0x2 YEAR=0x7dd kfdhdb.crestmp.lo: 2057425920 ; 0x0ac: USEC=0x0 MSEC=0x75 SECS=0x2a MINS=0x1e kfdhdb.mntstmp.hi: 32983697 ; 0x0b0: HOUR=0x11 DAYS=0x14 MNTH=0x2 YEAR=0x7dd kfdhdb.mntstmp.lo: 2068136960 ; 0x0b4: USEC=0x0 MSEC=0x151 SECS=0x34 MINS=0x1e kfdhdb.secsize: 512 ; 0x0b8: 0x0200 kfdhdb.blksize: 4096 ; 0x0ba: 0x1000 kfdhdb.ausize: 1048576 ; 0x0bc: 0x00100000 kfdhdb.mfact: 113792 ; 0x0c0: 0x0001bc80 kfdhdb.dsksize: 5114 ; 0x0c4: 0x000013fa kfdhdb.pmcnt: 2 ; 0x0c8: 0x00000002 kfdhdb.fstlocn: 1 ; 0x0cc: 0x00000001 kfdhdb.altlocn: 2 ; 0x0d0: 0x00000002 kfdhdb.f1b1locn: 2 ; 0x0d4: 0x00000002 kfdhdb.redomirrors[0]: 0 ; 0x0d8: 0x0000 kfdhdb.redomirrors[1]: 0 ; 0x0da: 0x0000 kfdhdb.redomirrors[2]: 0 ; 0x0dc: 0x0000 kfdhdb.redomirrors[3]: 0 ; 0x0de: 0x0000 kfdhdb.dbcompat: 168820736 ; 0x0e0: 0x0a100000 kfdhdb.grpstmp.hi: 32983697 ; 0x0e4: HOUR=0x11 DAYS=0x14 MNTH=0x2 YEAR=0x7dd kfdhdb.grpstmp.lo: 2057252864 ; 0x0e8: USEC=0x0 MSEC=0x3cc SECS=0x29 MINS=0x1e kfdhdb.ub4spare[0]: 0 ; 0x0ec: 0x00000000 kfdhdb.ub4spare[1]: 0 ; 0x0f0: 0x00000000 kfdhdb.ub4spare[2]: 0 ; 0x0f4: 0x00000000 kfdhdb.ub4spare[3]: 0 ; 0x0f8: 0x00000000 kfdhdb.ub4spare[4]: 0 ; 0x0fc: 0x00000000 kfdhdb.ub4spare[5]: 0 ; 0x100: 0x00000000 kfdhdb.ub4spare[6]: 0 ; 0x104: 0x00000000 kfdhdb.ub4spare[7]: 0 ; 0x108: 0x00000000 kfdhdb.ub4spare[8]: 0 ; 0x10c: 0x00000000 kfdhdb.ub4spare[9]: 0 ; 0x110: 0x00000000 kfdhdb.ub4spare[10]: 0 ; 0x114: 0x00000000 kfdhdb.ub4spare[11]: 0 ; 0x118: 0x00000000 kfdhdb.ub4spare[12]: 0 ; 0x11c: 0x00000000 kfdhdb.ub4spare[13]: 0 ; 0x120: 0x00000000 kfdhdb.ub4spare[14]: 0 ; 0x124: 0x00000000 kfdhdb.ub4spare[15]: 0 ; 0x128: 0x00000000 kfdhdb.ub4spare[16]: 0 ; 0x12c: 0x00000000 kfdhdb.ub4spare[17]: 0 ; 0x130: 0x00000000 kfdhdb.ub4spare[18]: 0 ; 0x134: 0x00000000 kfdhdb.ub4spare[19]: 0 ; 0x138: 0x00000000 kfdhdb.ub4spare[20]: 0 ; 0x13c: 0x00000000 kfdhdb.ub4spare[21]: 0 ; 0x140: 0x00000000 kfdhdb.ub4spare[22]: 0 ; 0x144: 0x00000000 kfdhdb.ub4spare[23]: 0 ; 0x148: 0x00000000 kfdhdb.ub4spare[24]: 0 ; 0x14c: 0x00000000 kfdhdb.ub4spare[25]: 0 ; 0x150: 0x00000000 kfdhdb.ub4spare[26]: 0 ; 0x154: 0x00000000 kfdhdb.ub4spare[27]: 0 ; 0x158: 0x00000000 kfdhdb.ub4spare[28]: 0 ; 0x15c: 0x00000000 kfdhdb.ub4spare[29]: 0 ; 0x160: 0x00000000 kfdhdb.ub4spare[30]: 0 ; 0x164: 0x00000000 kfdhdb.ub4spare[31]: 0 ; 0x168: 0x00000000 kfdhdb.ub4spare[32]: 0 ; 0x16c: 0x00000000 kfdhdb.ub4spare[33]: 0 ; 0x170: 0x00000000 kfdhdb.ub4spare[34]: 0 ; 0x174: 0x00000000 kfdhdb.ub4spare[35]: 0 ; 0x178: 0x00000000 kfdhdb.ub4spare[36]: 0 ; 0x17c: 0x00000000 kfdhdb.ub4spare[37]: 0 ; 0x180: 0x00000000 kfdhdb.ub4spare[38]: 0 ; 0x184: 0x00000000 kfdhdb.ub4spare[39]: 0 ; 0x188: 0x00000000 kfdhdb.ub4spare[40]: 0 ; 0x18c: 0x00000000 kfdhdb.ub4spare[41]: 0 ; 0x190: 0x00000000 kfdhdb.ub4spare[42]: 0 ; 0x194: 0x00000000 kfdhdb.ub4spare[43]: 0 ; 0x198: 0x00000000 kfdhdb.ub4spare[44]: 0 ; 0x19c: 0x00000000 kfdhdb.ub4spare[45]: 0 ; 0x1a0: 0x00000000 kfdhdb.ub4spare[46]: 0 ; 0x1a4: 0x00000000 kfdhdb.ub4spare[47]: 0 ; 0x1a8: 0x00000000 kfdhdb.ub4spare[48]: 0 ; 0x1ac: 0x00000000 kfdhdb.ub4spare[49]: 0 ; 0x1b0: 0x00000000 kfdhdb.ub4spare[50]: 0 ; 0x1b4: 0x00000000 kfdhdb.ub4spare[51]: 0 ; 0x1b8: 0x00000000 kfdhdb.ub4spare[52]: 0 ; 0x1bc: 0x00000000 kfdhdb.ub4spare[53]: 0 ; 0x1c0: 0x00000000 kfdhdb.ub4spare[54]: 0 ; 0x1c4: 0x00000000 kfdhdb.ub4spare[55]: 0 ; 0x1c8: 0x00000000 kfdhdb.ub4spare[56]: 0 ; 0x1cc: 0x00000000 kfdhdb.ub4spare[57]: 0 ; 0x1d0: 0x00000000 kfdhdb.acdb.aba.seq: 0 ; 0x1d4: 0x00000000 kfdhdb.acdb.aba.blk: 0 ; 0x1d8: 0x00000000 kfdhdb.acdb.ents: 0 ; 0x1dc: 0x0000 kfdhdb.acdb.ub2spare: 0 ; 0x1de: 0x0000
Using File System Based Files As ASM Disks
The files we created on Lab1 for this test are located on directory /u01/app/asm_filesystem_devices
[oracle@vasm ~]$ ls -ltrh /u01/app/asm_filesystem_devices total 2.0G -rw-rw---- 1 oracle oinstall 500M Feb 20 09:50 asm_filesystem_dsk1 -rw-rw---- 1 oracle oinstall 500M Feb 20 09:51 asm_filesystem_dsk2 -rw-rw---- 1 oracle oinstall 500M Feb 20 09:51 asm_filesystem_dsk3 -rw-rw---- 1 oracle oinstall 500M Feb 20 09:51 asm_filesystem_dsk4
To use these files as ASM disks we need to setups the following parameters "_asm_allow_only_raw_disks = FALSE" and add to the disktring the files to be used: "/u01/app/asm_filesystem_devices/*"
SQL> alter system set asm_diskstring='ORCL:VOL*','/dev/raw/raw*','/dev/sdf1','/dev/sdg1','/dev/sdh1','/dev/sdi1','/dev/sdj1','/dev/sdk1','/dev/sdl1','/dev/sdm1','/dev/sdn1','/dev/sdo1','/dev/sdp1','/dev/sdq1','/u01/app/asm_filesystem_devices/*'; System altered. SQL> show parameters asm_diskstring NAME TYPE VALUE ------------------------------------ ---------------------- ------------------------------ asm_diskstring string ORCL:VOL*, /dev/raw/raw*, /dev /sdf1, /dev/sdg1, /dev/sdh1, / dev/sdi1, /dev/sdj1, /dev/sdk1 , /dev/sdl1, /dev/sdm1, /dev/s dn1, /dev/sdo1, /dev/sdp1, /de v/sdq1, /u01/app/asm_filesyste m_devices/*
Check the discovery of our devices
SQL> select path from v$asm_disk order by 1; PATH -------------------------------------------------------------------------------- /dev/raw/raw1 /dev/raw/raw2 /dev/raw/raw3 /dev/raw/raw4 /dev/sdf1 /dev/sdg1 /dev/sdh1 /dev/sdi1 /dev/sdj1 /dev/sdk1 /dev/sdl1 /dev/sdm1 /dev/sdn1 /dev/sdo1 /dev/sdp1 /dev/sdq1 /u01/app/asm_filesystem_devices/asm_filesystem_dsk1 /u01/app/asm_filesystem_devices/asm_filesystem_dsk2 /u01/app/asm_filesystem_devices/asm_filesystem_dsk3 /u01/app/asm_filesystem_devices/asm_filesystem_dsk4 ORCL:VOL1 ORCL:VOL2 ORCL:VOL3 ORCL:VOL4 24 rows selected.
SQL> select disk_number,mount_status,header_status,mode_status,state,path from v$asm_disk where path like '/u01/%'; DISK_NUMBER MOUNT_STATUS HEADER_STATUS MODE_STATUS STATE PATH ----------- -------------- --------------- -------------- ------ ------------------------------------------------------- 0 CLOSED CANDIDATE ONLINE NORMAL /u01/app/asm_filesystem_devices/asm_filesystem_dsk4 3 CLOSED CANDIDATE ONLINE NORMAL /u01/app/asm_filesystem_devices/asm_filesystem_dsk3 2 CLOSED CANDIDATE ONLINE NORMAL /u01/app/asm_filesystem_devices/asm_filesystem_dsk1 1 CLOSED CANDIDATE ONLINE NORMAL /u01/app/asm_filesystem_devices/asm_filesystem_dsk2
Creating a diskgroup on ASM based on files
SQL> create diskgroup dataonfs external redundancy disk 2 '/u01/app/asm_filesystem_devices/asm_filesystem_dsk1', 3 '/u01/app/asm_filesystem_devices/asm_filesystem_dsk2', 4 '/u01/app/asm_filesystem_devices/asm_filesystem_dsk3', 5 '/u01/app/asm_filesystem_devices/asm_filesystem_dsk4'; Diskgroup created.
SQL> select disk_number,mount_status,header_status,mode_status,state,path from v$asm_disk where path like '/u01/%'; DISK_NUMBER MOUNT_STATUS HEADER_STATUS MODE_STATUS STATE PATH ----------- -------------- --------------- -------------- ------ ------------------------------------------------------- 3 CACHED MEMBER ONLINE NORMAL /u01/app/asm_filesystem_devices/asm_filesystem_dsk4 1 CACHED MEMBER ONLINE NORMAL /u01/app/asm_filesystem_devices/asm_filesystem_dsk2 0 CACHED MEMBER ONLINE NORMAL /u01/app/asm_filesystem_devices/asm_filesystem_dsk1 2 CACHED MEMBER ONLINE NORMAL /u01/app/asm_filesystem_devices/asm_filesystem_dsk3
Check the diskgroups created on this Lab
[oracle@vasm ~]$ asmcmd lsdg State Type Rebal Unbal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Name MOUNTED EXTERN N N 512 4096 1048576 1000 948 0 948 0 ARCHDG/ MOUNTED EXTERN N N 512 4096 1048576 1000 948 0 948 0 DATADG/ MOUNTED NORMAL N N 512 4096 1048576 20461 20355 5119 7618 0 DATADGNR/ MOUNTED EXTERN N N 512 4096 1048576 2000 1944 0 1944 0 DATAONFS/