Database Reference
In-Depth Information
SQL> SELECT path, header_status, library, total_mb, free_mb FROM v$asm_disk;
PATH HEADER_STATUS LIBRARY TOTAL_MB FREE_MB
----------------------- ------------- ------- ---------- ----------
C:\ORADATA\ARRAY1_DISK1 CANDIDATE System 512 0
C:\ORADATA\ARRAY2_DISK2 CANDIDATE System 512 0
C:\ORADATA\ARRAY2_DISK1 CANDIDATE System 512 0
C:\ORADATA\ARRAY1_DISK2 CANDIDATE System 512 0
This time ASM did recognize the cooked files as disks for use in a disk group, so we may go
ahead and create a disk group with external redundancy. By assigning the failure group array1
to the disks in the first disk array (files ARRAY1_DISK1 and ARRAY1_DISK2 ) and the failure group
array2 to the second disk array (files ARRAY2_DISK1 and ARRAY2_DISK2 ), ASM is instructed to
mirror across the two disk arrays. It will automatically stripe the data within each disk array.
SQL> CREATE DISKGROUP cooked_dg NORMAL REDUNDANCY
FAILGROUP array1
DISK
'C:\ORADATA\ARRAY1_DISK1' NAME array1_disk1,
'C:\ORADATA\ARRAY1_DISK2' NAME array1_disk2
FAILGROUP array2
DISK
'C:\ORADATA\ARRAY2_DISK1' NAME array2_disk1,
'C:\ORADATA\ARRAY2_DISK2' NAME array2_disk2;
Diskgroup created.
The disks that were formerly candidates are now members of a disk group.
SQL> SELECT path, header_status, library, total_mb, free_mb FROM v$asm_disk;
PATH HEADER_STATUS LIBRARY TOTAL_MB FREE_MB
----------------------- ------------- ------- ---------- ----------
C:\ORADATA\ARRAY1_DISK1 MEMBER System 512 482
C:\ORADATA\ARRAY1_DISK2 MEMBER System 512 489
C:\ORADATA\ARRAY2_DISK1 MEMBER System 512 484
C:\ORADATA\ARRAY2_DISK2 MEMBER System 512 487
As you can see by comparing the columns TOTAL_MB and FREE_MB , ASM uses quite a bit of
space for internal purposes. The view V$ASM_DISKGROUP gives access to information on disk groups.
If you have read the overview of hidden ASM parameters at the beginning of this chapter atten-
tively, you will recognize the settings of two hidden parameters in the following output:
SQL> SELECT name, block_size, allocation_unit_size, state,
type, total_mb, usable_file_mb
FROM v$asm_diskgroup;
NAME BLOCK_SIZE ALLOCATION_UNIT_SIZE STATE TYPE TOTAL_MB USABLE_FILE_MB
---------- ---------- -------------------- -------- ------ -------- --------------
COOKED_DG 4096 1048576 MOUNTED NORMAL 2048 715
The value in column BLOCK_SIZE is derived from the parameter _ASM_BLKSIZE , while
ALLOCATION_UNIT_SIZE is derived from _ASM_AUSIZE . You may now use DBCA to create a
database in the disk group. Make sure you choose ASM storage for all data files.
 
Search WWH ::




Custom Search