Best Asm
Best Asm
Best Asm
Lab 3 Creating The ASM Instance And Managing ASM Disk Groups
Alejandro Vargas | Principal Support Consultant
Oracle Advanced Customer Services
INDEX
1/27
ASM HANDS-ON TRAINING
Lab 3 Creating The ASM Instance And Managing ASM Disk Groups
Create The ASM Instance
Create the Cluster Synchronization Services Daemon
Connect as root and run localconfig add from thr $ORACLE_HOMR/bin directory
Adding to inittab
/etc/init.d/init.cssd: line 319: /tmp/oratz.7542: No such file or directory
/etc/init.d/init.cssd: line 319: /tmp/oratz.7600: No such file or directory
/etc/init.d/init.cssd: line 319: /tmp/oratz.7644: No such file or directory
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.
asmxpt
CSS is active on all nodes.
Oracle CSS service is installed and running under init(1M)
2/27
ASM HANDS-ON TRAINING
Lab 3 Creating The ASM Instance And Managing ASM Disk Groups
[root@asmxpt bin]# ps -efa | grep css | grep -v grep
oracle 7695 1 1 06:26 ? 00:00:02 /u01/app/oracle/10g_db/bin/ocssd.bin
SID_LIST_LISTENER_ASMXPT =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/10g_db)
(PROGRAM = extproc)
)
)
LISTENER_ASMXPT =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = sati))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
)
3/27
ASM HANDS-ON TRAINING
Lab 3 Creating The ASM Instance And Managing ASM Disk Groups
To correctly size the SHARED_POOL_SIZE initialization parameter you need to estimate the size of your database.
To do that aggregate the values from the following queries to obtain the current database storage size that is either
already on ASM or will be stored in ASM.
Next, determine the redundancy type and calculate the SHARED_POOL_SIZE using the aggregated value as input
SELECT SUM(bytes)/(1024*1024*1024)
FROM V$DATAFILE;
SELECT SUM(bytes)/(1024*1024*1024)
FROM V$LOGFILE a, V$LOG b
WHERE a.group#=b.group#;
SELECT SUM(bytes)/(1024*1024*1024)
FROM V$TEMPFILE
WHERE status='ONLINE';
• For disk groups using external redundancy, every 100 GB of space needs 1 MB of extra shared pool plus 2 MB
• For disk groups using normal redundancy, every 50 GB of space needs 1 MB of extra shared pool plus 4 MB
• For disk groups using high redundancy, every 33 GB of space needs 1 MB of extra shared pool plus 6 MB
4/27
ASM HANDS-ON TRAINING
Lab 3 Creating The ASM Instance And Managing ASM Disk Groups
The first test will be done using a minimal pfile
*.instance_type='asm'
*.large_pool_size=12582912
*.sga_max_size=120M
export ORACLE_SID=+ASM
File created.
5/27
ASM HANDS-ON TRAINING
Lab 3 Creating The ASM Instance And Managing ASM Disk Groups
Find the new Spfile
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.
Start the ASM instance from the spfile and check the diskstring parameter, set the diskstring to find the rawdevices
6/27
ASM HANDS-ON TRAINING
Lab 3 Creating The ASM Instance And Managing ASM Disk Groups
System altered.
After having set the asm_diskstring parameter we can see the disks matching the pattern /dev/raw/raw*
@chkasmdisk
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’
System altered.
SQL> @chkasmdisk
7/27
ASM HANDS-ON TRAINING
Lab 3 Creating The ASM Instance And Managing ASM Disk Groups
1 CLOSED CANDIDATE ONLINE NORMAL /dev/raw/raw3
2 CLOSED CANDIDATE ONLINE NORMAL /dev/raw/raw2
3 CLOSED CANDIDATE ONLINE NORMAL /dev/raw/raw1
4 CLOSED CANDIDATE ONLINE NORMAL /dev/sdi1
5 CLOSED CANDIDATE ONLINE NORMAL /dev/sdh1
12 CLOSED CANDIDATE ONLINE NORMAL /dev/sda
7 CLOSED CANDIDATE ONLINE NORMAL /dev/sdf1
8 CLOSED PROVISIONED ONLINE NORMAL /dev/sde1
9 CLOSED CANDIDATE ONLINE NORMAL /dev/sdg1
10 CLOSED PROVISIONED ONLINE NORMAL /dev/sdc1
11 CLOSED PROVISIONED ONLINE NORMAL /dev/sdb1
6 CLOSED PROVISIONED ONLINE NORMAL /dev/sdd1
13 rows selected.
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.
Now when we check the available devices we will be able to see also the ASMLib provisioned disks as such
SQL> @chkasmdisk.sql
8/27
ASM HANDS-ON TRAINING
Lab 3 Creating The ASM Instance And Managing ASM Disk Groups
11 rows selected.
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.
Diskgroup created.
9/27
ASM HANDS-ON TRAINING
Lab 3 Creating The ASM Instance And Managing ASM Disk Groups
Diskgroup created.
select disk_number,mount_status,header_status,mode_status,state,path
from v$asm_disk order by path ;
KFED
10/27
ASM HANDS-ON TRAINING
Lab 3 Creating The ASM Instance And Managing ASM Disk Groups
Linking KFED utility (kfed)
rm -f /u01/app/oracle/10g_db/rdbms/lib/kfed
gcc -o /u01/app/oracle/10g_db/rdbms/lib/kfed -L/u01/app/oracle/10g_db/rdbms/lib/
-L/u01/app/oracle/10g_db/lib/ -L/u01/app/oracle/10g_db/lib/stubs/ -L/usr/lib -lirc
/u01/app/oracle/10g_db/lib/s0main.o /u01/app/oracle/10g_db/rdbms/lib/sskfeded.o
/u01/app/oracle/10g_db/rdbms/lib/skfedpt.o /u01/app/oracle/10g_db/rdbms/lib/defopt.o
-ldbtools10 -lclntsh `cat /u01/app/oracle/10g_db/lib/ldflags` -lnsslb10 -lncrypt10
-lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /u01/app/oracle/10g_db/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/10g_db/lib/ldflags` -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10
-lnnz10 -lnl10 -lnro10 `cat /u01/app/oracle/10g_db/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/10g_db/lib/sysliblist` -Wl,-rpath,/u01/app/oracle/10g_db/lib -lm `cat /
u01/app/oracle/10g_db/lib/sysliblist` -ldl -lm -L/u01/app/oracle/10g_db/lib
mv -f /u01/app/oracle/10g_db/bin/kfed /u01/app/oracle/10g_db/bin/kfedO
mv: cannot stat `/u01/app/oracle/10g_db/bin/kfed': No such file or directory
make: [ikfed] Error 1 (ignored)
mv /u01/app/oracle/10g_db/rdbms/lib/kfed /u01/app/oracle/10g_db/bin/kfed
chmod 751 /u01/app/oracle/10g_db/bin/kfed
Kfed Help
11/27
ASM HANDS-ON TRAINING
Lab 3 Creating The ASM Instance And Managing ASM Disk Groups
aus/z Allocation Unit size in bytes [AUSZ=number]
blkn/um Block number to examine or update [BLKNUM=number]
blks/z Metadata block size in bytes [BLKSZ=number]
ch/ksum Update checksum before each write [CHKSUM=YES/NO]
cn/t Count of AUs to process [CNT=number]
d/ev ASM device to examine or update [DEV=string]
o/p KFED operation type [OP=READ/WRITE/MERGE/NEW/FORM/FIND/STRUCT]
p/rovnm Name for provisioning purposes [PROVNM=string]
s/eek AU number to seek to [SEEK=number]
te/xt File name for translated block text [TEXT=string]
ty/pe ASM metadata block type number [TYPE=number]
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
12/27
ASM HANDS-ON TRAINING
Lab 3 Creating The ASM Instance And Managing ASM Disk Groups
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: 32917653 ; 0x0a8: HOUR=0x15 DAYS=0x4 MNTH=0x2 YEAR=0x7d9
kfdhdb.crestmp.lo: 1344777216 ; 0x0ac: USEC=0x0 MSEC=0x1eb SECS=0x2 MINS=0x14
kfdhdb.mntstmp.hi: 32917685 ; 0x0b0: HOUR=0x15 DAYS=0x5 MNTH=0x2 YEAR=0x7d9
kfdhdb.mntstmp.lo: 2585133056 ; 0x0b4: USEC=0x0 MSEC=0x180 SECS=0x21 MINS=0x26
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
13/27
ASM HANDS-ON TRAINING
Lab 3 Creating The ASM Instance And Managing ASM Disk Groups
kfdhdb.dbcompat: 168820736 ; 0x0e0: 0x0a100000
kfdhdb.grpstmp.hi: 32917653 ; 0x0e4: HOUR=0x15 DAYS=0x4 MNTH=0x2 YEAR=0x7d9
kfdhdb.grpstmp.lo: 1344524288 ; 0x0e8: USEC=0x0 MSEC=0xf4 SECS=0x2 MINS=0x14
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
14/27
ASM HANDS-ON TRAINING
Lab 3 Creating The ASM Instance And Managing ASM Disk Groups
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
15/27
ASM HANDS-ON TRAINING
Lab 3 Creating The ASM Instance And Managing ASM Disk Groups
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
16/27
ASM HANDS-ON TRAINING
Lab 3 Creating The ASM Instance And Managing ASM Disk Groups
Diskgroup created.
Check the disks groups and the disks that are already members of a diskgroup
17/27
ASM HANDS-ON TRAINING
Lab 3 Creating The ASM Instance And Managing ASM Disk Groups
/dev/raw/raw4 UNKNOWN 500 475 ARCHDG_0001
ORCL:VOL1 UNKNOWN 2047 2017 FG1
ORCL:VOL2 UNKNOWN 2047 2024 FG1
ORCL:VOL3 UNKNOWN 2047 2019 FG2
ORCL:VOL4 UNKNOWN 2047 2022 FG2
External Normal
[oracle@asmxpt ~]$ kfed read /dev/raw/raw1 [oracle@asmxpt ~]$ kfed read /dev/oracleasm/disks/VOL1
kfbh.endian: 1 ; 0x000: 0x01 kfbh.endian: 1 ; 0x000: 0x01
kfbh.hard: 130 ; 0x001: 0x82 kfbh.hard: 130 ; 0x001: 0x82
kfbh.type: 1 ; 0x002: KFBTYP_DISKHEAD kfbh.type: 1 ; 0x002: KFBTYP_DISKHEAD
kfbh.datfmt: 1 ; 0x003: 0x01 kfbh.datfmt: 1 ; 0x003: 0x01
kfbh.block.blk: 0 ; 0x004: T=0 NUMB=0x0 kfbh.block.blk: 0 ; 0x004: T=0 NUMB=0x0
kfbh.block.obj: 2147483648 ; 0x008: TYPE=0x8 kfbh.block.obj: 2147483648 ; 0x008: TYPE=0x8
NUMB=0x0 NUMB=0x0
kfbh.check: 2273664232 ; 0x00c: 0x87855ce8 kfbh.check: 4080112120 ; 0x00c: 0xf33191f8
kfbh.fcn.base: 0 ; 0x010: 0x00000000 kfbh.fcn.base: 0 ; 0x010: 0x00000000
kfbh.fcn.wrap: 0 ; 0x014: 0x00000000 kfbh.fcn.wrap: 0 ; 0x014: 0x00000000
kfbh.spare1: 0 ; 0x018: 0x00000000 kfbh.spare1: 0 ; 0x018: 0x00000000
kfbh.spare2: 0 ; 0x01c: 0x00000000 kfbh.spare2: 0 ; 0x01c: 0x00000000
kfdhdb.driver.provstr: ORCLDISK ; 0x000: length=8 kfdhdb.driver.provstr: ORCLDISKVOL1 ; 0x000: length=12
kfdhdb.driver.reserved[0]: 0 ; 0x008: 0x00000000 kfdhdb.driver.reserved[0]: 827084630 ; 0x008: 0x314c4f56
kfdhdb.driver.reserved[1]: 0 ; 0x00c: 0x00000000 kfdhdb.driver.reserved[1]: 0 ; 0x00c: 0x00000000
kfdhdb.driver.reserved[2]: 0 ; 0x010: 0x00000000 kfdhdb.driver.reserved[2]: 0 ; 0x010: 0x00000000
kfdhdb.driver.reserved[3]: 0 ; 0x014: 0x00000000 kfdhdb.driver.reserved[3]: 0 ; 0x014: 0x00000000
kfdhdb.driver.reserved[4]: 0 ; 0x018: 0x00000000 kfdhdb.driver.reserved[4]: 0 ; 0x018: 0x00000000
kfdhdb.driver.reserved[5]: 0 ; 0x01c: 0x00000000 kfdhdb.driver.reserved[5]: 0 ; 0x01c: 0x00000000
18/27
ASM HANDS-ON TRAINING
Lab 3 Creating The ASM Instance And Managing ASM Disk Groups
kfdhdb.compat: 168820736 ; 0x020: 0x0a100000 kfdhdb.compat: 168820736 ; 0x020: 0x0a100000
kfdhdb.dsknum: 0 ; 0x024: 0x0000 kfdhdb.dsknum: 0 ; 0x024: 0x0000
kfdhdb.grptyp: 1 ; 0x026: KFDGTP_EXTERNAL kfdhdb.grptyp: 2 ; 0x026: KFDGTP_NORMAL
kfdhdb.hdrsts: 3 ; 0x027: KFDHDR_MEMBER kfdhdb.hdrsts: 3 ; 0x027: KFDHDR_MEMBER
kfdhdb.dskname: DATADG_0000 ; 0x028: length=11 kfdhdb.dskname: VOL1 ; 0x028: length=4
kfdhdb.grpname: DATADG ; 0x048: length=6 kfdhdb.grpname: DATADGNR ; 0x048: length=8
kfdhdb.fgname: DATADG_0000 ; 0x068: length=11 kfdhdb.fgname: FG1 ; 0x068: length=3
kfdhdb.capname: ; 0x088: length=0 kfdhdb.capname: ; 0x088: length=0
kfdhdb.crestmp.hi: 32917653 ; 0x0a8: HOUR=0x15 kfdhdb.crestmp.hi: 32917704 ; 0x0a8: HOUR=0x8
DAYS=0x4 MNTH=0x2 YEAR=0x7d9 DAYS=0x6 MNTH=0x2 YEAR=0x7d9
kfdhdb.crestmp.lo: 1344777216 ; 0x0ac: USEC=0x0 kfdhdb.crestmp.lo: 1951739904 ; 0x0ac: USEC=0x0
MSEC=0x1eb SECS=0x2 MINS=0x14 MSEC=0x14c SECS=0x5 MINS=0x1d
kfdhdb.mntstmp.hi: 32917653 ; 0x0b0: HOUR=0x15 kfdhdb.mntstmp.hi: 32917704 ; 0x0b0: HOUR=0x8
DAYS=0x4 MNTH=0x2 YEAR=0x7d9 DAYS=0x6 MNTH=0x2 YEAR=0x7d9
kfdhdb.mntstmp.lo: 1377978368 ; 0x0b4: USEC=0x0 kfdhdb.mntstmp.lo: 1962266624 ; 0x0b4: USEC=0x0
MSEC=0x92 SECS=0x22 MINS=0x14 MSEC=0x174 SECS=0xf MINS=0x1d
kfdhdb.secsize: 512 ; 0x0b8: 0x0200 kfdhdb.secsize: 512 ; 0x0b8: 0x0200
kfdhdb.blksize: 4096 ; 0x0ba: 0x1000 kfdhdb.blksize: 4096 ; 0x0ba: 0x1000
kfdhdb.ausize: 1048576 ; 0x0bc: 0x00100000 kfdhdb.ausize: 1048576 ; 0x0bc: 0x00100000
kfdhdb.mfact: 113792 ; 0x0c0: 0x0001bc80 kfdhdb.mfact: 113792 ; 0x0c0: 0x0001bc80
kfdhdb.dsksize: 500 ; 0x0c4: 0x000001f4 kfdhdb.dsksize: 2047 ; 0x0c4: 0x000007ff
kfdhdb.pmcnt: 2 ; 0x0c8: 0x00000002 kfdhdb.pmcnt: 2 ; 0x0c8: 0x00000002
kfdhdb.fstlocn: 1 ; 0x0cc: 0x00000001 kfdhdb.fstlocn: 1 ; 0x0cc: 0x00000001
kfdhdb.altlocn: 2 ; 0x0d0: 0x00000002 kfdhdb.altlocn: 2 ; 0x0d0: 0x00000002
kfdhdb.f1b1locn: 2 ; 0x0d4: 0x00000002 kfdhdb.f1b1locn: 2 ; 0x0d4: 0x00000002
kfdhdb.redomirrors[0]: 0 ; 0x0d8: 0x0000 kfdhdb.redomirrors[0]: 0 ; 0x0d8: 0x0000
kfdhdb.redomirrors[1]: 0 ; 0x0da: 0x0000 kfdhdb.redomirrors[1]: 0 ; 0x0da: 0x0000
kfdhdb.redomirrors[2]: 0 ; 0x0dc: 0x0000 kfdhdb.redomirrors[2]: 0 ; 0x0dc: 0x0000
kfdhdb.redomirrors[3]: 0 ; 0x0de: 0x0000 kfdhdb.redomirrors[3]: 0 ; 0x0de: 0x0000
kfdhdb.dbcompat: 168820736 ; 0x0e0: 0x0a100000 kfdhdb.dbcompat: 168820736 ; 0x0e0: 0x0a100000
kfdhdb.grpstmp.hi: 32917653 ; 0x0e4: HOUR=0x15 kfdhdb.grpstmp.hi: 32917704 ; 0x0e4: HOUR=0x8
19/27
ASM HANDS-ON TRAINING
Lab 3 Creating The ASM Instance And Managing ASM Disk Groups
DAYS=0x4 MNTH=0x2 YEAR=0x7d9 DAYS=0x6 MNTH=0x2 YEAR=0x7d9
kfdhdb.grpstmp.lo: 1344524288 ; 0x0e8: USEC=0x0 kfdhdb.grpstmp.lo: 1951291392 ; 0x0e8: USEC=0x0
MSEC=0xf4 SECS=0x2 MINS=0x14 MSEC=0x396 SECS=0x4 MINS=0x1d
kfdhdb.ub4spare[0]: 0 ; 0x0ec: 0x00000000 kfdhdb.ub4spare[0]: 0 ; 0x0ec: 0x00000000
kfdhdb.ub4spare[1]: 0 ; 0x0f0: 0x00000000 kfdhdb.ub4spare[1]: 0 ; 0x0f0: 0x00000000
kfdhdb.ub4spare[2]: 0 ; 0x0f4: 0x00000000 kfdhdb.ub4spare[2]: 0 ; 0x0f4: 0x00000000
kfdhdb.ub4spare[3]: 0 ; 0x0f8: 0x00000000 kfdhdb.ub4spare[3]: 0 ; 0x0f8: 0x00000000
kfdhdb.ub4spare[4]: 0 ; 0x0fc: 0x00000000 kfdhdb.ub4spare[4]: 0 ; 0x0fc: 0x00000000
kfdhdb.ub4spare[5]: 0 ; 0x100: 0x00000000 kfdhdb.ub4spare[5]: 0 ; 0x100: 0x00000000
kfdhdb.ub4spare[6]: 0 ; 0x104: 0x00000000 kfdhdb.ub4spare[6]: 0 ; 0x104: 0x00000000
kfdhdb.ub4spare[7]: 0 ; 0x108: 0x00000000 kfdhdb.ub4spare[7]: 0 ; 0x108: 0x00000000
kfdhdb.ub4spare[8]: 0 ; 0x10c: 0x00000000 kfdhdb.ub4spare[8]: 0 ; 0x10c: 0x00000000
kfdhdb.ub4spare[9]: 0 ; 0x110: 0x00000000 kfdhdb.ub4spare[9]: 0 ; 0x110: 0x00000000
kfdhdb.ub4spare[10]: 0 ; 0x114: 0x00000000 kfdhdb.ub4spare[10]: 0 ; 0x114: 0x00000000
kfdhdb.ub4spare[11]: 0 ; 0x118: 0x00000000 kfdhdb.ub4spare[11]: 0 ; 0x118: 0x00000000
kfdhdb.ub4spare[12]: 0 ; 0x11c: 0x00000000 kfdhdb.ub4spare[12]: 0 ; 0x11c: 0x00000000
kfdhdb.ub4spare[13]: 0 ; 0x120: 0x00000000 kfdhdb.ub4spare[13]: 0 ; 0x120: 0x00000000
kfdhdb.ub4spare[14]: 0 ; 0x124: 0x00000000 kfdhdb.ub4spare[14]: 0 ; 0x124: 0x00000000
kfdhdb.ub4spare[15]: 0 ; 0x128: 0x00000000 kfdhdb.ub4spare[15]: 0 ; 0x128: 0x00000000
kfdhdb.ub4spare[16]: 0 ; 0x12c: 0x00000000 kfdhdb.ub4spare[16]: 0 ; 0x12c: 0x00000000
kfdhdb.ub4spare[17]: 0 ; 0x130: 0x00000000 kfdhdb.ub4spare[17]: 0 ; 0x130: 0x00000000
kfdhdb.ub4spare[18]: 0 ; 0x134: 0x00000000 kfdhdb.ub4spare[18]: 0 ; 0x134: 0x00000000
kfdhdb.ub4spare[19]: 0 ; 0x138: 0x00000000 kfdhdb.ub4spare[19]: 0 ; 0x138: 0x00000000
kfdhdb.ub4spare[20]: 0 ; 0x13c: 0x00000000 kfdhdb.ub4spare[20]: 0 ; 0x13c: 0x00000000
kfdhdb.ub4spare[21]: 0 ; 0x140: 0x00000000 kfdhdb.ub4spare[21]: 0 ; 0x140: 0x00000000
kfdhdb.ub4spare[22]: 0 ; 0x144: 0x00000000 kfdhdb.ub4spare[22]: 0 ; 0x144: 0x00000000
kfdhdb.ub4spare[23]: 0 ; 0x148: 0x00000000 kfdhdb.ub4spare[23]: 0 ; 0x148: 0x00000000
kfdhdb.ub4spare[24]: 0 ; 0x14c: 0x00000000 kfdhdb.ub4spare[24]: 0 ; 0x14c: 0x00000000
kfdhdb.ub4spare[25]: 0 ; 0x150: 0x00000000 kfdhdb.ub4spare[25]: 0 ; 0x150: 0x00000000
kfdhdb.ub4spare[26]: 0 ; 0x154: 0x00000000 kfdhdb.ub4spare[26]: 0 ; 0x154: 0x00000000
kfdhdb.ub4spare[27]: 0 ; 0x158: 0x00000000 kfdhdb.ub4spare[27]: 0 ; 0x158: 0x00000000
20/27
ASM HANDS-ON TRAINING
Lab 3 Creating The ASM Instance And Managing ASM Disk Groups
kfdhdb.ub4spare[28]: 0 ; 0x15c: 0x00000000 kfdhdb.ub4spare[28]: 0 ; 0x15c: 0x00000000
kfdhdb.ub4spare[29]: 0 ; 0x160: 0x00000000 kfdhdb.ub4spare[29]: 0 ; 0x160: 0x00000000
kfdhdb.ub4spare[30]: 0 ; 0x164: 0x00000000 kfdhdb.ub4spare[30]: 0 ; 0x164: 0x00000000
kfdhdb.ub4spare[31]: 0 ; 0x168: 0x00000000 kfdhdb.ub4spare[31]: 0 ; 0x168: 0x00000000
kfdhdb.ub4spare[32]: 0 ; 0x16c: 0x00000000 kfdhdb.ub4spare[32]: 0 ; 0x16c: 0x00000000
kfdhdb.ub4spare[33]: 0 ; 0x170: 0x00000000 kfdhdb.ub4spare[33]: 0 ; 0x170: 0x00000000
kfdhdb.ub4spare[34]: 0 ; 0x174: 0x00000000 kfdhdb.ub4spare[34]: 0 ; 0x174: 0x00000000
kfdhdb.ub4spare[35]: 0 ; 0x178: 0x00000000 kfdhdb.ub4spare[35]: 0 ; 0x178: 0x00000000
kfdhdb.ub4spare[36]: 0 ; 0x17c: 0x00000000 kfdhdb.ub4spare[36]: 0 ; 0x17c: 0x00000000
kfdhdb.ub4spare[37]: 0 ; 0x180: 0x00000000 kfdhdb.ub4spare[37]: 0 ; 0x180: 0x00000000
kfdhdb.ub4spare[38]: 0 ; 0x184: 0x00000000 kfdhdb.ub4spare[38]: 0 ; 0x184: 0x00000000
kfdhdb.ub4spare[39]: 0 ; 0x188: 0x00000000 kfdhdb.ub4spare[39]: 0 ; 0x188: 0x00000000
kfdhdb.ub4spare[40]: 0 ; 0x18c: 0x00000000 kfdhdb.ub4spare[40]: 0 ; 0x18c: 0x00000000
kfdhdb.ub4spare[41]: 0 ; 0x190: 0x00000000 kfdhdb.ub4spare[41]: 0 ; 0x190: 0x00000000
kfdhdb.ub4spare[42]: 0 ; 0x194: 0x00000000 kfdhdb.ub4spare[42]: 0 ; 0x194: 0x00000000
kfdhdb.ub4spare[43]: 0 ; 0x198: 0x00000000 kfdhdb.ub4spare[43]: 0 ; 0x198: 0x00000000
kfdhdb.ub4spare[44]: 0 ; 0x19c: 0x00000000 kfdhdb.ub4spare[44]: 0 ; 0x19c: 0x00000000
kfdhdb.ub4spare[45]: 0 ; 0x1a0: 0x00000000 kfdhdb.ub4spare[45]: 0 ; 0x1a0: 0x00000000
kfdhdb.ub4spare[46]: 0 ; 0x1a4: 0x00000000 kfdhdb.ub4spare[46]: 0 ; 0x1a4: 0x00000000
kfdhdb.ub4spare[47]: 0 ; 0x1a8: 0x00000000 kfdhdb.ub4spare[47]: 0 ; 0x1a8: 0x00000000
kfdhdb.ub4spare[48]: 0 ; 0x1ac: 0x00000000 kfdhdb.ub4spare[48]: 0 ; 0x1ac: 0x00000000
kfdhdb.ub4spare[49]: 0 ; 0x1b0: 0x00000000 kfdhdb.ub4spare[49]: 0 ; 0x1b0: 0x00000000
kfdhdb.ub4spare[50]: 0 ; 0x1b4: 0x00000000 kfdhdb.ub4spare[50]: 0 ; 0x1b4: 0x00000000
kfdhdb.ub4spare[51]: 0 ; 0x1b8: 0x00000000 kfdhdb.ub4spare[51]: 0 ; 0x1b8: 0x00000000
kfdhdb.ub4spare[52]: 0 ; 0x1bc: 0x00000000 kfdhdb.ub4spare[52]: 0 ; 0x1bc: 0x00000000
kfdhdb.ub4spare[53]: 0 ; 0x1c0: 0x00000000 kfdhdb.ub4spare[53]: 0 ; 0x1c0: 0x00000000
kfdhdb.ub4spare[54]: 0 ; 0x1c4: 0x00000000 kfdhdb.ub4spare[54]: 0 ; 0x1c4: 0x00000000
kfdhdb.ub4spare[55]: 0 ; 0x1c8: 0x00000000 kfdhdb.ub4spare[55]: 0 ; 0x1c8: 0x00000000
kfdhdb.ub4spare[56]: 0 ; 0x1cc: 0x00000000 kfdhdb.ub4spare[56]: 0 ; 0x1cc: 0x00000000
kfdhdb.ub4spare[57]: 0 ; 0x1d0: 0x00000000 kfdhdb.ub4spare[57]: 0 ; 0x1d0: 0x00000000
kfdhdb.acdb.aba.seq: 0 ; 0x1d4: 0x00000000 kfdhdb.acdb.aba.seq: 0 ; 0x1d4: 0x00000000
21/27
ASM HANDS-ON TRAINING
Lab 3 Creating The ASM Instance And Managing ASM Disk Groups
kfdhdb.acdb.aba.blk: 0 ; 0x1d8: 0x00000000 kfdhdb.acdb.aba.blk: 0 ; 0x1d8: 0x00000000
kfdhdb.acdb.ents: 0 ; 0x1dc: 0x0000 kfdhdb.acdb.ents: 0 ; 0x1dc: 0x0000
kfdhdb.acdb.ub2spare: 0 ; 0x1de: 0x0000 kfdhdb.acdb.ub2spare: 0 ; 0x1de: 0x0000
The files we created on Lab1 for this test are located on directory /u01/app/asm_filesystem_devices.
To use these files as ASM disks we need to setups the following parameters :
_asm_allow_only_raw_disks = FALSE
System altered.
22/27
ASM HANDS-ON TRAINING
Lab 3 Creating The ASM Instance And Managing ASM Disk Groups
System altered.
SQL> shutdown
ASM diskgroups dismounted
ASM instance shutdown
SQL> startup
ASM instance started
23/27
ASM HANDS-ON TRAINING
Lab 3 Creating The ASM Instance And Managing ASM Disk Groups
Start the ASM instance and check the discovery of our devices
PATH
---------------------------------------------------
/u01/app/asm_filesystem_devices/asm_filesystem_dsk2
/u01/app/asm_filesystem_devices/asm_filesystem_dsk1
/u01/app/asm_filesystem_devices/asm_filesystem_dsk3
/u01/app/asm_filesystem_devices/asm_filesystem_dsk4
24/27
ASM HANDS-ON TRAINING
Lab 3 Creating The ASM Instance And Managing ASM Disk Groups
Diskgroup created.
25/27
ASM HANDS-ON TRAINING
Lab 3 Creating The ASM Instance And Managing ASM Disk Groups
Scripts
-- chkasmdisk
set pages 50000 lines 120
col path for a30
select disk_number,
mount_status,
header_status,
mode_status,
state,path
from v$asm_disk ;
-- eof chkasmdisk
-- chkasmdisk2
set pages 50000 lines 120
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;
-- eof chkasmdisk2
#!/bin/ksh
# chkasmmaping
/etc/init.d/oracleasm querydisk `/etc/init.d/oracleasm listdisks` | cut -f2,10,11 -d" " |
perl -pe 's/"(.*)".*\[(.*), *(.*)\]/$1 $2 $3/g;' | while read v_asmdisk v_minor v_major
26/27
ASM HANDS-ON TRAINING
Lab 3 Creating The ASM Instance And Managing ASM Disk Groups
do
v_device=`ls -la /dev | grep " $v_minor, *$v_major " | awk '{print $10}'`
echo "ASM disk $v_asmdisk based on /dev/$v_device [$v_minor, $v_major]"
done
# eof chkasmmapping
End of Lab3
27/27