Creating Disk Groups
Using the CREATE DISKGROUP SQL Statement
The CREATE DISKGROUP
SQL statement is used to create disk groups. When creating a disk group, you:
·
Specify the redundancy level of the disk group.
·
Specify the disks that are to be formatted as
Oracle ASM disks belonging to the disk group.
·
Optionally specify the disks as belonging to
specific failure groups.
·
Optionally specify the type of failure group.
·
Optionally specify disk group attributes, such
as software compatibility or allocation unit size.
Example: Creating a Disk Group
The following examples assume that the ASM_DISKSTRING
initialization parameter is set to the '/devices/*
'
string. Oracle ASM disk discovery identifies disks in the /devices
directory, including the
following disks:Controller 1:
/devices/diska1
/devices/diska2
/devices/diska3
/devices/diska4
Controller 2:
/devices/diskb1
/devices/diskb2
/devices/diskb3
/devices/diskb4
The
SQL statement Example creates a disk group named data
with normal redundancy consisting of two failure groups controller1 or controller2
with four disks in each failure group. The data
disk group is typically used to store database data files.
Example
Creating the DATA disk group
CREATE DISKGROUP data NORMAL REDUNDANCY
FAILGROUP controller1 DISK
'/devices/diska1' NAME diska1,
'/devices/diska2' NAME diska2,
'/devices/diska3' NAME diska3,
'/devices/diska4' NAME diska4
FAILGROUP controller2 DISK
'/devices/diskb1' NAME diskb1,
'/devices/diskb2' NAME diskb2,
'/devices/diskb3' NAME diskb3,
'/devices/diskb4' NAME diskb4
ATTRIBUTE 'au_size'='4M',
'compatible.asm' = '11.2',
'compatible.rdbms' = '11.2',
'compatible.advm' = '11.2';
In
above Example the NAME clauses enable you to explicitly
assign names to the disks rather than the default system-generated names. The
system-generated names are in the form diskgroup_nnnn, where nnnn is the disk number for the disk in
the disk group. For ASMLib disks, the disk name defaults to the ASMLib name
that is the user label of the disk; for example, mydisk
is the default Oracle ASM disk name for ORCL:mydisk.
When
creating the disk group in above
example, the values of following disk group attributes were explicitly set:
- AU_SIZE
Specifies the size of the allocation
unit for the disk group. You can view the value of the AU_SIZE disk group attribute in the ALLOCATION_UNIT_SIZE column of the V$ASM_DISKGROUP view.
- COMPATIBLE.ASM
Determines the minimum software
version for any Oracle ASM instance that uses a disk group. COMPATIBLE.RDBMS
Determines the minimum software
version for any database instance that uses a disk group. COMPATIBLE.ADVM
Determines whether the disk group
can contain Oracle ASM volumes.
No comments:
Post a Comment