Oracle ASM Interview Questions
1. What is the use of ASM (or) Why ASM preferred over filesystem?
Answer:
ASM provides striping and mirroring.
a) Provides automatic load balancing over all the available
disks, thus reducing hot spots in the file system.
b) Prevents fragmentation of disks, so you don’t need to manually relocate data to tune I/O performance.
c) Adding disks is straight forward – ASM automatically performs online disk reorganization when you add or remove storage.
d) Uses redundancy features available in intelligent storage arrays.
e)The storage system can store all types of database files.
f) Using disk group makes configuration easier, as files are placed into disk groups.
2. What are the init parameters related to ASM?
Answer:
INSTANCE_TYPE = ASM
ASM_POWER_LIMIT = 11
ASM_DISKSTRING = '/dev/rdsk/*s2', '/dev/rdsk/c1*'
ASM_DISKGROUPS = DG_DATA, DG_FRA
3. What is rebalancing (or) what is the use of ASM_POWER_LIMIT?
Answer:
ASM_POWER_LIMIT is dynamic parameter, which will be useful for rebalancing the data across disks.
Value can be 1(lowest) to 11 (highest).
4. What are different types of redundancies in ASM & explain?
Answer:
b) Prevents fragmentation of disks, so you don’t need to manually relocate data to tune I/O performance.
c) Adding disks is straight forward – ASM automatically performs online disk reorganization when you add or remove storage.
d) Uses redundancy features available in intelligent storage arrays.
e)The storage system can store all types of database files.
f) Using disk group makes configuration easier, as files are placed into disk groups.
2. What are the init parameters related to ASM?
Answer:
INSTANCE_TYPE = ASM
ASM_POWER_LIMIT = 11
ASM_DISKSTRING = '/dev/rdsk/*s2', '/dev/rdsk/c1*'
ASM_DISKGROUPS = DG_DATA, DG_FRA
3. What is rebalancing (or) what is the use of ASM_POWER_LIMIT?
Answer:
ASM_POWER_LIMIT is dynamic parameter, which will be useful for rebalancing the data across disks.
Value can be 1(lowest) to 11 (highest).
4. What are different types of redundancies in ASM & explain?
Answer:
Normal
redundancy - for 2-way mirroring,
requiring two failure groups, when ASM allocates an extent for a normal
redundancy file, ASM allocates a primary copy and a secondary copy. ASM chooses
the disk on which to store the secondary copy in a different failure group
other than the primary copy.
High
redundancy - for 3-way mirroring,
requiring three failure groups, in this case the extent is mirrored across
3 disks.
External
redundancy - do not use ASM mirroring.
This is used if you are using hardware mirroring or third-party redundancy
mechanism like RAID, Storage arrays.
7. How to find out the databases, which are using the
ASM instance?
Answer :
ASMCMD> lsct
SQL> select DB_NAME from V$ASM_CLIENT;
8. What are different types of stripings in ASM & their differences?
Answer:
Fine-grained striping
Coarse-grained striping
9. What happen if you miss "+" sign while adding datafile in ASM disk group ?
10. What is allocation unit and what is default value of au_size and how to change?
Answer:
Every ASM disk is divided into allocation units (AU). An AU is the fundamental unit of allocation within a disk group. A file extent consists of one or more AU. An ASM file consists of one or more file extents.
Answer
ASMCMD> lsct
SQL> select DB_NAME from V$ASM_CLIENT;
8. What are different types of stripings in ASM & their differences?
Answer:
Fine-grained striping
Coarse-grained striping
9. What happen if you miss "+" sign while adding datafile in ASM disk group ?
10. What is allocation unit and what is default value of au_size and how to change?
Answer:
Every ASM disk is divided into allocation units (AU). An AU is the fundamental unit of allocation within a disk group. A file extent consists of one or more AU. An ASM file consists of one or more file extents.
CREATE DISKGROUP disk_group_2 EXTERNAL
REDUNDANCY DISK '/dev/sde1' ATRRIBUTE 'au_size' = '32M';
lsdg
select NAME,ALLOCATION_UNIT_SIZE from v$asm_diskgroup;
11. What are the background processes in ASM?
Answer:
select NAME,ALLOCATION_UNIT_SIZE from v$asm_diskgroup;
11. What are the background processes in ASM?
Answer:
ASMB - This ASMB process is used to provide information to and from cluster
synchronization services used by ASM to manage the disk resources. It's also used to update statistics
and provide a heartbeat mechanism.
RBAL, Re-Balance - RBAL is the ASM related process that performs
rebalancing of disk resources controlled by ASM.
ARBx, Actual Rebalance - ARBx is configured by ASM_POWER_LIMIT, a
slave for rebalancing operations.
12. What processes does the rebalancing?
Answer:
RBAL, ARBx
14. How to add/remove disk to/from disk group?
Answer:
ALTER DISKGROUP data1 ADD DISK '/devices/diska5';
ALTER DISKGROUP disk_group_1 DROP DISK diska2;
ALTER DISKGROUP data1 ADD DISK '/devices/diska5';
ALTER DISKGROUP disk_group_1 DROP DISK diska2;
Question 1 What is ASM in
Oracle?
Answer
Oracle ASM is Oracle’s volume
manager specially designed for Oracle database data. It is available since
Oracle database version 10g and many improvements have been made in versions
11g release 1 and 2 and 12c
ASM offers support for Oracle RAC clusters without the
requirement to install 3rd party software, such as cluster aware volume
managers or file systems.
ASM is shipped as part of the database server software
(Enterprise and Standard editions) and does not cost extra money to run.
ASM simplifies administration of Oracle related files by
allowing the administrator to reference disk groups rather than individual
disks and files, which are managed by ASM.
The ASM functionality is an extension of the Oracle Managed
Files (OMF) functionality that also includes
striping and mirroring to provide balanced and secure storage. The new ASM
functionality can be used in combination with existing raw and cooked file
systems, along with OMF and manually managed files.
Question 2 What is ASM
instance in Oracle?
Answer The ASM functionality
is controlled by an ASM instance. This is not a full database instance, just the memory structures and as such
is very small and lightweight.
Characteristics of Oracle ASM instance
1)The ASM instance, which is generally named +ASM1, is started
with the INSTANCE_TYPE=ASM in init.ora
parameter
2) Do not mount the database but manage metadata required to make ASM files available for DB instances
3) DB Instance access ASM files directly and contact ASM instance only for the layout of ASM files
4) Requires only the init.ora file for startup
5)Instance Name is +ASM or +ASM1.for RAC
6) ASM instance can be started in same database home or seperate home also
2) Do not mount the database but manage metadata required to make ASM files available for DB instances
3) DB Instance access ASM files directly and contact ASM instance only for the layout of ASM files
4) Requires only the init.ora file for startup
5)Instance Name is +ASM or +ASM1.for RAC
6) ASM instance can be started in same database home or seperate home also
Question
3 What are ASM Background Processes in Oracle?
Answer RBAL – Oracle background
process. In an ASM instance coordinated rebalancing operations. In a DB
instance, opens and mount diskgroups from the local ASM instance.
ARBx – Oracle backgroud processes. In an ASM instance, a slave for rebalancing operations
PSPx – Oracle backgroud processes. In an ASM instance, Process Spawners
GMON – Oracle backgroud processes. In an ASM instance, diskgroup monitor.
ASMB – Oracle background process. In an DB instance, keeps a (bequeath) persistent DB connection to the local ASM instance. Provides heart-beat and ASM statistics. During a diskgroups rebalancing operation ASM communicates to the DB AU changes via this connection.
O00x – Oracle backgroud processes. Slaves used to connected from the DB to the ASM instance for ‘short operations’.
ARBx – Oracle backgroud processes. In an ASM instance, a slave for rebalancing operations
PSPx – Oracle backgroud processes. In an ASM instance, Process Spawners
GMON – Oracle backgroud processes. In an ASM instance, diskgroup monitor.
ASMB – Oracle background process. In an DB instance, keeps a (bequeath) persistent DB connection to the local ASM instance. Provides heart-beat and ASM statistics. During a diskgroups rebalancing operation ASM communicates to the DB AU changes via this connection.
O00x – Oracle backgroud processes. Slaves used to connected from the DB to the ASM instance for ‘short operations’.
Question 4 What are ASM
instance initialization parameters?
Answer INSTANCE_TYPE – Set to ASM or
RDBMS depending on the instance type. The default is RDBMS.
DB_UNIQUE_NAME – Specifies a globally unique name for the
database. This defaults to +ASM but must be altered if you intend to run
multiple ASM instances.
ASM_POWER_LIMIT -The
maximum power for a rebalancing operation on an ASM instance. The valid
values range from 1 to 11, with 1 being the default. The higher the limit the
more resources are allocated resulting in faster rebalancing operations. This
value is also used as the default when the POWER clause is omitted from a
rebalance operation.
ASM_DISKGROUPS – The list of disk groups that should be mounted
by an ASM instance during instance startup, or by the ALTER DISKGROUP ALL MOUNT
statement. ASM configuration changes are automatically reflected in this
parameter.
ASM_DISKSTRING – Specifies a value that can be used to limit the
disks considered for discovery. Altering the default value may improve the
speed of disk group mount time and the speed of adding a disk to a disk group.
Changing the parameter to a value which prevents the discovery of already
mounted disks results in an error. The default value is NULL allowing all
suitable disks to be considered.
What
are Advantages of ASM in Oracle?
a) Provides automatic load balancing over all the available
disks, thus reducing hot spots in the file system
b) Prevents fragmentation of disks, so you don’t need to manually relocate data to tune I/O performance
c) Adding disks is straight forward – ASM automatically performs online disk reorganization when you add or remove storage
d) Uses redundancy features available in intelligent storage arrays
e)The storage system can store all types of database files
f) Using disk group makes configuration easier, as files are placed into disk groups
g)ASM provides stripping and mirroring
h) ASM and non-ASM oracle files can coexist
b) Prevents fragmentation of disks, so you don’t need to manually relocate data to tune I/O performance
c) Adding disks is straight forward – ASM automatically performs online disk reorganization when you add or remove storage
d) Uses redundancy features available in intelligent storage arrays
e)The storage system can store all types of database files
f) Using disk group makes configuration easier, as files are placed into disk groups
g)ASM provides stripping and mirroring
h) ASM and non-ASM oracle files can coexist
Question
5 How Oracle ASM instance works?
Answer the ASM instance manages and communicates the map as to where each file extent resides. It also controls the process of rebalancing the placement of the extents when the storage allocation is changed i.e., when the disk is added or removed from ASM. As an ASM instance uses only about 64-MB for its system global area, it requires a relatively small amount of system resource. In a RAC configuration, an ASM instance on each node in the cluster manages all disk groups for that node, in coordination with the other nodes in the cluster.
Answer the ASM instance manages and communicates the map as to where each file extent resides. It also controls the process of rebalancing the placement of the extents when the storage allocation is changed i.e., when the disk is added or removed from ASM. As an ASM instance uses only about 64-MB for its system global area, it requires a relatively small amount of system resource. In a RAC configuration, an ASM instance on each node in the cluster manages all disk groups for that node, in coordination with the other nodes in the cluster.
The ASM instance creates an extent
map which has a pointer to each 1MB extent of the data file is located.
When a database instance creates or opens a database file that is managed by
ASM, the database instance messages the ASM instance and ASM returns an extent
map for that file. From that point the database instance performs all I/O
directly to the disks unless the location of that file is being changed. Three
things might cause the extent map for a database instance to be updated: 1)
Rebalancing the disk layout following a storage configuration change (adding or
dropping a disk from a disk group), 2) Opening of a new database file and 3)
extending an existing database file when a tablespace is enlarged.
Question
6 What is ASM Disks ?
Answer The physical disks are known as ASM disks
Answer The physical disks are known as ASM disks
Question 7 What is ASM disk
groups?
Answer ASM disk groups, each of
which comprise of several physical disks
that are controlled as a single unit
Question 8 What is Failure
groups
Answer They are defined within a
disk group to support the required level
of redundancy. For two-way mirroring you would expect a disk group to
contain two failure groups so individual files are written to two locations.
Question 9 Why should we use
separate ASM home?
Answer ASM should be installed
separately from the database software in its own ORACLE_HOME directory. This
will allow you the flexibility to patch and upgrade ASM and the database
software independently.
Question 10 How many ASM
instances should one have?
Answer Several databases can share a
single ASM instance. So, although one can create multiple ASM instances on a
single system, normal configurations should have one and only one ASM instance
per system.
For clustered systems, create one ASM instance per node (called
+ASM1, +ASM2, etc.).
Question 11 How many disk
groups should one have?
Answer One should have only one disk group for all database files –
and, optionally a second for recovery
files i.e. +DATA for datafile and
+FRA for Recovery files
Here is an example:
CREATE DISKGROUP DATA EXTERNAL REDUNDANCY DISK ‘/dev/raw1′,
‘/dev/raw2′;
CREATE DISKGROUP FRA EXTERNAL REDUNDANCY DISK ‘/dev/raw3′, ‘/dev/raw4′;
CREATE DISKGROUP FRA EXTERNAL REDUNDANCY DISK ‘/dev/raw3′, ‘/dev/raw4′;
Here is an example how you can enable automatic file management
with such a setup in each database served by that ASM instance:
ALTER SYSTEM SET db_create_file_dest = ‘+DATA’ SCOPE=SPFILE;
ALTER SYSTEM SET db_recovery_file_dest = ‘+FRA’ SCOPE=SPFILE;
ALTER SYSTEM SET db_recovery_file_dest = ‘+FRA’ SCOPE=SPFILE;
You may also decide to introduce additional disk groups – for
example, if you decide to put historic data on low cost disks, or if you want
ASM to mirror critical data across 2 storage cabinets.
Data with different storage characteristics should be stored in
different disk groups. Each disk group can have different redundancy
(mirroring) settings (high, normal and external), different fail-groups, etc.
However, it is generally not necessary to create many disk groups with the same
storage characteristics (i.e. +DATA1, +DATA2, etc. all on the same type of
disks).
Question 12 What is stripping and
mirroring.
Answer Striping is spreading data across
multiple disks so that IO is spread across multiple disks and hence
increase in throughput. It provides read/write performance but fail over
support.
ASM offers two types of striping, with the choice depending on the type of database file. Coarse striping uses a stripe size of 1MB, and you can use coarse striping for every file in your database, except for the control files, online redo log files, and flashback files. Fine grain striping uses a stripe size of 128KB. You can use fine striping for control files, online redo log files, and flashback files.
ASM offers two types of striping, with the choice depending on the type of database file. Coarse striping uses a stripe size of 1MB, and you can use coarse striping for every file in your database, except for the control files, online redo log files, and flashback files. Fine grain striping uses a stripe size of 128KB. You can use fine striping for control files, online redo log files, and flashback files.
Mirroring
means redundancy. It may add performance benefit for read operations but
overhead for write operations. Its basic purpose is to provide fail over
support.
There are three ASM mirroring options:
There are three ASM mirroring options:
High Redundancy – In this configuration, for each primary
extent, there are two mirrored extents. For Oracle Database Appliance this
means, during normal operations there would be three extents (one primary and
two secondary) containing the same data, thus providing “high” level of
protection. Since ASM distributes the partnering extents in a way that prevents
all extents to be unable due to a component failure in the IO path, this
configuration can sustain at least two simultaneous disk failures on Oracle
Database Appliance (which should be rare but is possible).
Normal Redundancy – In this configuration, for each primary
extent, there is one mirrored (secondary) extent. This configuration protects
against at least one disk failure. Note that in the event a disk fails in this
configuration, although there is typically no outage or data loss, the system
operates in a vulnerable state, should a second disk fail while the old failed
disk replacement has not completed. Many Oracle Database Appliance customers
thus prefer the High Redundancy configuration to mitigate the lack of
additional protection during this time.
External Redundancy – In this configuration there are only
primary extents and no mirrored extents. This option is typically used in
traditional non-appliance environments when the storage sub-system may have
existing redundancy such as hardware mirroring or other types of third-party
mirroring in place. Oracle Database Appliance does not support External
Redundancy.8. What is a diskgroup?
A disk group consists of multiple disks and is the fundamental object that ASM manages. Each disk group contains the metadata that is required for the management of space in the disk group. The ASM instance manages the metadata about the files in a Disk Group in the same way that a file system manages metadata about its files. However, the vast majority of I/O operations do not pass through the ASM instance. In a moment we will look at how file
I/O works with respect to the ASM instance.
A disk group consists of multiple disks and is the fundamental object that ASM manages. Each disk group contains the metadata that is required for the management of space in the disk group. The ASM instance manages the metadata about the files in a Disk Group in the same way that a file system manages metadata about its files. However, the vast majority of I/O operations do not pass through the ASM instance. In a moment we will look at how file
I/O works with respect to the ASM instance.
Question
13 What is ASM Rebalancing?
Answer The rebalancing speed is
controlled by the ASM_POWER_LIMIT initialization parameter. Setting it to 0
will disable disk rebalancing.
ALTER DISKGROUP DATA REBALANCE POWER 11;
Question 14 What happens when
an Oracle ASM disk group is created?
Answer When an ASM disk group
is created, a hierarchical filesystem structure is created.
Question 15 How does this
filesystem structure appear?
Answer Oracle ASM disk group’s
filesystem structure is like UNIX filesystem hierarchy or Windows filesystem
hierarchy.
Question 16 Where are the
Oracle ASM files stored?
Answer Oracle ASM files are stored
within the Oracle ASM disk group. If we dig into internals, oracle ASM files
are stored within the Oracle ASM filesystem structures.
Question 17 How are the
Oracle ASM files stored within the Oracle ASM filesystem structure?
Answer Oracle ASM files are stored
within the Oracle ASM filesystem structures as objects that RDBMS
instances/Oracle database instance access. RDBMS/Oracle instance treats the
Oracle ASM files as standard filesystem files.
Question 18 What are the Oracle ASM files
that are stored within the Oracle ASM file hierarchy?
Answer Files stored in Oracle ASM disk
group/Oracle ASM file structures include:
1) Datafile
2) Control files
3) Server Parameter Files(SPFILE)
4) Redo Log files
1) Datafile
2) Control files
3) Server Parameter Files(SPFILE)
4) Redo Log files
Que 19 How can you access a database
file in ASM disk group under RDBMS?
Answer Once the ASM file is created
in ASM disk group, a filename is generated. This file is now visible to the
user via the standard RDBMS view V$DATAFILE.
Question
20 What
will be the syntax of ASM filenames?
Answer ASM filename syntax is
given below
+diskgroup_name/database_name/database_file_type/tag_name.file_number.incarnation
where,
+diskgroup_name/database_name/database_file_type/tag_name.file_number.incarnation
where,
+diskgroup_name – Name of the disk group that contains this file
database_name – Name of the database that contains this file
datafile – Can be one among 20 different ASM file types
tag_name – corresponds to tablespace name for datafiles, groupnumber for redo log files
file_number – file_number in ASM instance is used to correlate filenames in database instance
incarnation_number – It is derived from the timestamp. IT is used to provide uniqueness
datafile – Can be one among 20 different ASM file types
tag_name – corresponds to tablespace name for datafiles, groupnumber for redo log files
file_number – file_number in ASM instance is used to correlate filenames in database instance
incarnation_number – It is derived from the timestamp. IT is used to provide uniqueness
Question 21 What is an
incarnation number?
Answer An incarnation number is a
part of ASM filename syntax. It is
derived from the time stamp. Once the
file is created, its incarnation number doesn’t change.
Question 22 What is the use
of an incarnation number in Oracle ASM filename?
Answer Incarnation number
distinguishes between a new file that has been created using the same file
number and another file that has been deleted
Question 23 What is an oracle
flex ASM?
Answer Oracle flex ASM is a feature that enables an ASM instance to run on separate physical servers from the database servers
Answer Oracle flex ASM is a feature that enables an ASM instance to run on separate physical servers from the database servers
Question 24 What is the use
of asmadmin?
Answer asmadmin
is the operating system group that holds
users who have sysasm database privilege. This privilege is needed for
operations like mounting disk group, dismounting disk group, storage
administration
Question 25 What is the
purpose of asmoper operating system group?
Answer asmoper operating system group is used for users that have the privilege to startup and stop the oracle ASM instance. The database privilege for these users will be sysoper for asm
Answer asmoper operating system group is used for users that have the privilege to startup and stop the oracle ASM instance. The database privilege for these users will be sysoper for asm
Question 26 What is the
difference between asmdba and asmoper?
Answer The users belonging to asmdba group have sysdba database privilege at ASM level. This is the highest administrative privilege needed for oracle ASM. Whereas, asmoper is given sysoper privilege which is less than asmdba
Answer The users belonging to asmdba group have sysdba database privilege at ASM level. This is the highest administrative privilege needed for oracle ASM. Whereas, asmoper is given sysoper privilege which is less than asmdba
Question
27 How to copy files between asm disk groups?
Answer ASMCMD command cp can be used to copy files between ASM disk groups on local instance as well as remote instances
Answer ASMCMD command cp can be used to copy files between ASM disk groups on local instance as well as remote instances
Question 28 What is ASM
metadata and where is it present?
Answer ASM metadata is the information that ASM uses to control the disk group. It is present within a disk group.
Answer ASM metadata is the information that ASM uses to control the disk group. It is present within a disk group.
Question 29 What is an ASM metadata composed of?
Answer An ASM metadata includes the following:
1) The disks that belong to a disk group
2) Amount of space available within a disk group
3) The filenames of the files within a disk group
4) The location of disk group datafile data extents
5) A redo log that records information about automatically changing data blocks
1) The disks that belong to a disk group
2) Amount of space available within a disk group
3) The filenames of the files within a disk group
4) The location of disk group datafile data extents
5) A redo log that records information about automatically changing data blocks
Question
30 What is oracle ASM filter driver?
Answer Oracle ASM filter driver is a new feature in Oracle database 12c release 2 12.1.0.2. As an abbreviation this is called Oracle ASMFD that happens to be a kernel module. this kernel modules are included in path of I/O path of oracle asm disks. this module is included to protect the underlying ASM disks from unnecessary typically non-oracle writes related I/O operations which in turn protects disks from being corrupt
Answer Oracle ASM filter driver is a new feature in Oracle database 12c release 2 12.1.0.2. As an abbreviation this is called Oracle ASMFD that happens to be a kernel module. this kernel modules are included in path of I/O path of oracle asm disks. this module is included to protect the underlying ASM disks from unnecessary typically non-oracle writes related I/O operations which in turn protects disks from being corrupt
Question 31 What it the ASM
POWER_LIMIT?
Answer This is the parameter which
controls the number of Allocation units the ASM instance will try to rebalance
at any given time. In ASM versions less than 11.2.0.3 the default value is 11
however it has been changed to unlimited in later versions.
Question 32 What is a rolling
upgrade?
Answer A patch is considered a
rolling if it is can be applied to the cluster binaries without having to
shutting down the database in a RAC environment. All nodes in the cluster are
patched in a rolling manner, one by one, with only the node which is being
patched unavailable while all other instance open.
Question
33 How does ASM provides Redundancy?
Answer When you create a disk group, you specify an ASM disk group type based on one of the following three redundancy levels:
1) Normal for 2-way mirroring – When ASM allocates an extent for a normal redundancy file; ASM allocates a primary copy and a secondary copy. ASM chooses the disk on which to store the secondary copy in a different failure group other than the primary copy.
2) High for 3-way mirroring. In this case the extent is mirrored across 3 disks.
3)External to not use ASM mirroring. This is used if you are using Third party Redundancy mechanism like RAID, Storage arrays.
Answer When you create a disk group, you specify an ASM disk group type based on one of the following three redundancy levels:
1) Normal for 2-way mirroring – When ASM allocates an extent for a normal redundancy file; ASM allocates a primary copy and a secondary copy. ASM chooses the disk on which to store the secondary copy in a different failure group other than the primary copy.
2) High for 3-way mirroring. In this case the extent is mirrored across 3 disks.
3)External to not use ASM mirroring. This is used if you are using Third party Redundancy mechanism like RAID, Storage arrays.
Question
34 Can we change the Redundancy for Disk group after its
creation?
Answer No, we cannot modify the
redundancy for Diskgroup once it has been created. To alter it we will be
required to create a new Diskgroup and move the files to it. This can also be
done by restoring full back up on the new Diskgroup.
Question 35 Does ASM instance
automatically rebalances and takes care of hot spots?
Answer No.
This is a myth and ASM does not do it. It will initiate automatic rebalance
only when a new disk is added to Diskgroup or we drop a disk from existing
Diskgroup.
Question
36 What is ASMLIB?
Answer ASMLIB is the support library for the ASM. ASMLIB allows an Oracle database using ASM more efficient and capable access to diskgroups. The purpose of ASMLIB, is to provide an alternative interface to identify and access block devices. Additionally, the ASMLIB API enables storage and operating system vendors to supply extended storage-related features.
Answer ASMLIB is the support library for the ASM. ASMLIB allows an Oracle database using ASM more efficient and capable access to diskgroups. The purpose of ASMLIB, is to provide an alternative interface to identify and access block devices. Additionally, the ASMLIB API enables storage and operating system vendors to supply extended storage-related features.
Question 37 What is SYSASM role?
Answer Starting from Oracle 11g, SYSASM role can be used to administer the ASM instances. You can continue using SYSDBA role to connect to ASM, but it will generate following warning messages at time of startup/shutdown, create Diskgroup/add disk, etc
Alert entry
WARNING: Deprecated privilege SYSDBA for command ‘STARTUP’
Answer Starting from Oracle 11g, SYSASM role can be used to administer the ASM instances. You can continue using SYSDBA role to connect to ASM, but it will generate following warning messages at time of startup/shutdown, create Diskgroup/add disk, etc
Alert entry
WARNING: Deprecated privilege SYSDBA for command ‘STARTUP’
Question
38 What is Kfed?
Answer kfed is a utility which can be used to view the ASM Disk information.
Answer kfed is a utility which can be used to view the ASM Disk information.
Syntax for using it is
kfed read devicename
kfed read devicename
Question 39 ASM and Cluster
Synchronization Service
Answer An ASM storage system
requires the use of an additional specialized database instance called ASM,
which will manage the storage for a set of Oracle databases. In order to use
ASM storage for your Oracle databases, you must first ensure that you have Oracle’s Cluster Synchronization Service
(CSS) running on your databases.
CSS is responsible for synchronizing ASM instances and your
database instances, and it is installed as part of your Oracle software. CSS
also synchronizes recovery from an ASM instance failure. You can find out if
the CSS service is running by using the following command:
Question 42 What are
different types of striping in ASM & their differences?
Answer Fine-grained striping
Coarse-grained striping
Answer Fine-grained striping
Coarse-grained striping
Question 43 What is the best LUN size
for ASM ?
Answer There is no best size. In most cases the storage team will dictate to you based on their standardized LUN size. The ASM administrator merely must communicate the ASM Best Practices and application characteristics to storage folks :
a)Need equally sized / performance LUNs
b) Minimum of 4 LUNs
c) The capacity requirement
d) The workload characteristic (random r/w, sequential r/w) & any response time SLA
Answer There is no best size. In most cases the storage team will dictate to you based on their standardized LUN size. The ASM administrator merely must communicate the ASM Best Practices and application characteristics to storage folks :
a)Need equally sized / performance LUNs
b) Minimum of 4 LUNs
c) The capacity requirement
d) The workload characteristic (random r/w, sequential r/w) & any response time SLA
Question
44 Can my RDBMS and ASM instances run different versions?
Answer Yes. ASM can be at a higher version or at lower version than its client databases. There are two components of compatibility:
a) Software compatibility
b) Diskgroup compatibility attributes:
c) compatible.asm
d) compatible.rdbms
This is a diskgroup level change and not an instance level change…no rolling upgrade here!
Answer Yes. ASM can be at a higher version or at lower version than its client databases. There are two components of compatibility:
a) Software compatibility
b) Diskgroup compatibility attributes:
c) compatible.asm
d) compatible.rdbms
This is a diskgroup level change and not an instance level change…no rolling upgrade here!
Question
45 How do I backup my ASM instance?
Answer There is no backup for ASM instance as ASM has no files to backup Unlike the database, ASM does require a controlfile type structure or any other external metadata to bootstrap itself. All the data ASM needs to startup is on on-disk structures (disk headers and other disk group metadata).
Answer There is no backup for ASM instance as ASM has no files to backup Unlike the database, ASM does require a controlfile type structure or any other external metadata to bootstrap itself. All the data ASM needs to startup is on on-disk structures (disk headers and other disk group metadata).
Question 46 How does ASM work with
multipathing software?
Answer Multipathing software is at a layer lower than ASM, and thus is transparent.
You may need to adjust ASM_DISKSTRING to specify only the path to the multipathing pseudo devices.
Multipathing tools provides the following benefits:
a) It provide a single block device interface for a multi-pathed LUN
b) it detects any component failures in the I/O path; e.g., fabric port, channel adapter, or HBA.
c) When a loss of path occurs, ensure that I/Os are re-routed to the available paths, with no process disruption.
d) Reconfigure the multipaths automatically when events occur.
e) Ensure that failed paths get revalidated as soon as possible and provide autofailback
Answer Multipathing software is at a layer lower than ASM, and thus is transparent.
You may need to adjust ASM_DISKSTRING to specify only the path to the multipathing pseudo devices.
Multipathing tools provides the following benefits:
a) It provide a single block device interface for a multi-pathed LUN
b) it detects any component failures in the I/O path; e.g., fabric port, channel adapter, or HBA.
c) When a loss of path occurs, ensure that I/Os are re-routed to the available paths, with no process disruption.
d) Reconfigure the multipaths automatically when events occur.
e) Ensure that failed paths get revalidated as soon as possible and provide autofailback
1) What is ASM?
In Oracle Database 10g/11g there are two types of instances:
database and ASM instances. The ASM instance, which is generally named +ASM, is
started with the INSTANCE_TYPE=ASM init.ora parameter. This parameter, when
set, signals the Oracle initialization routine to start an ASM instance and not
a standard database instance. Unlike the standard database instance, the ASM
instance contains no physical files; such as logfiles, control files or
datafiles, and only requires a few init.ora parameters for startup.
Upon startup, an ASM instance will spawn all the
basic background processes, plus some new ones that are specific to the
operation of ASM. The STARTUP clauses for ASM instances are similar to those
for database instances. For example, RESTRICT prevents database instances from
connecting to this ASM instance. NOMOUNT starts up an ASM instance without
mounting any disk group. MOUNT option simply mounts all defined diskgroups
For RAC configurations, the ASM SID is +ASMx instance, where x
represents the instance number.
2) What are the key benefits of ASM?
ASM provides filesystem and volume manager
capabilities built into the Oracle database kernel. With this capability, ASM
simplifies storage management tasks, such as creating/laying out databases and
disk space management. Since ASM allows disk management to be done using
familiar create/alter/drop SQL statements, DBAs do not need to learn a new
skill set or make crucial decisions on provisioning.
The following are some key benefits of ASM:
- ASM spreads I/O evenly across all available disk drives
to prevent hot spots and maximize performance.
- ASM eliminates the need for over provisioning and
maximizes storage resource utilization facilitating database
consolidation.
- Inherent large file support.
- Performs automatic online redistribution after the
incremental addition or removal of storage capacity.
- Maintains redundant copies of data to provide high availability
or leverages 3rd party RAID functionality.
- Supports Oracle Database as well as Oracle Real
Application Clusters (RAC).
- Capable of leveraging 3rd party multipathing
technologies.
- For simplicity and easier migration to ASM, an Oracle
database can contain ASM and non-ASM files.
- Any new files can be created as ASM files whilst
existing files can also be migrated to ASM.
- RMAN commands enable non-ASM managed files to be
relocated to an ASM disk group.
- Enterprise Manager Database Control or Grid Control can
be used to manage ASM disk and file activities.
3) Describe about ASM architecture.
Automatic Storage Management (ASM) instance
Instance that manages the diskgroup metadata
Disk Groups
Logcal grouping of disks
Determines file mirroring options
ASM Disks
LUNs presented to ASM
ASM Files
Files that are stored in ASM disk groups are called ASM files, this includes database files
Determines file mirroring options
ASM Disks
LUNs presented to ASM
ASM Files
Files that are stored in ASM disk groups are called ASM files, this includes database files
Notes:
Many databases can connect as clients to single ASM instances
ASM instance name should only be +ASM only
One diskgroup can serve many databases
4) How does database connect to ASM Instance?
The database communicates with ASM instance using the ASMB
(umblicus process) process. Once the database obtains the necessary extents
from extent map, all database IO going forward is processed through by
the database processes, bypassing ASM. Thus, we say ASM is not really in the IO
path. So, the question how we make ASM go faster you don’t have to.
5) How does the database interact with the ASM instance and how do
I make ASM go faster?
ASM is not in the I/O path so ASM does not
impede the database file access. Since the RDBMS instance is performing raw I/O, the I/O is as
fast as possible.
6) Do I need to define the RDBMS FILESYSTEMIO_OPTIONS parameter
when I use ASM?
No. The RDBMS does I/O
directly to the raw disk devices, the FILESYSTEMIO_OPTIONS parameter
is only for filesystems.
7) Why Oracle recommends two diskgroups?
Oracle recommends two diskgroups to provide a balance of
manageability, utilization, and performance.
8) We have a 16 TB
database. I’m curious about the number of disk groups we should use; e.g. 1 large
disk group, a couple of disk groups, or otherwise?
For VLDBs you will probably
end up with different storage tiers; e.g with some of our large customers they
have Tier1 (RAID10 FC), Tier2 (RAID5 FC), Tier3 (SATA), etc. Each one of these
is mapped to a diskgroup.
9) We have a new app and don’t know our access pattern, but
assuming mostly sequential access, what size would be a good AU fit?
For 11g ASM/RDBMS it is recommended to use 4MB ASM AU for disk groups. See Metalink Note 810484.1
10) Would it be better to use BIGFILE tablespaces, or standard
tablespaces for ASM?
The use of Big file tablespaces has no bearing on ASM (or vice
versa). In fact, most database object related decisions are transparent to ASM.
12) In 11g RAC we want to separate ASM admins from DBAs and create
different users and groups. How do we set this up?
For clarification
• Separate Oracle Home for ASM and RDBMS.
• RDBMS instance connects to ASM using OSDBA group of the ASM instance.
Thus, software owner for each RDBMS instance connecting to ASM must be
a member of ASM's OSDBA group.
• Choose a different OSDBA group for ASM instance (asmdba) than for
RDBMS instance (dba)
• In 11g, ASM administrator has to be member of a separate SYSASM group to
separate ASM Admin and DBAs.
• Separate Oracle Home for ASM and RDBMS.
• RDBMS instance connects to ASM using OSDBA group of the ASM instance.
Thus, software owner for each RDBMS instance connecting to ASM must be
a member of ASM's OSDBA group.
• Choose a different OSDBA group for ASM instance (asmdba) than for
RDBMS instance (dba)
• In 11g, ASM administrator has to be member of a separate SYSASM group to
separate ASM Admin and DBAs.
14) Where do I run my database listener from; i.e., ASM HOME or DB
HOME?
It is recommended to run the listener from the ASM HOME. This is
particularly important for RAC env, since the listener is a node-level
resource. In this config, you can create additional [user] listeners from the
database homes as needed.
15) How do I backup my ASM instance?
Not applicable! ASM has no files to backup, as it does not contain
controlfile,redo logs etc.
16) When should I use RMAN and when should I use ASMCMD copy?
- RMAN is the recommended and most complete and flexible
method to backup and transport database files in ASM.
ASMCMD copy is good for copying single files
• Supports all Oracle file types
• Can be used to instantiate a Data Guard environment
• Does not update the controlfile
• Does not create OMF files
17) I’m going to do add disks to my ASM diskgroup, how long will
this rebalance take?
- Rebalance time is heavily driven by the three items:
1) Amount of data currently in the diskgroup
2) IO bandwidth available on the server
3) ASM_POWER_LIMIT or Rebalance Power Level
18) We are migrating to a new storage array. How do I move my ASM
database from storage A to storage B?
Given that the new and old storage are both
visible to ASM, simply add the new disks to the ASM disk group and drop the old
disks. ASM rebalance will migrate data online.
Note 428681.1 covers how to move OCR/Voting disks to the new
storage array
19) Is it possible to unplug an ASM disk group from one platform
and plug into a server on another platform (for example, from Solaris to
Linux)?
No. Cross-platform disk
group migration not supported. To move datafiles between endian-ness
platforms, you need to use XTTS, Datapump or Streams.
22) What are the file types that ASM support and keep in disk
groups?
Control files
Flashback logs
Data Pump dump sets
Flashback logs
Data Pump dump sets
Data files
DB SPFILE
Data Guard configuration
DB SPFILE
Data Guard configuration
Temporary data files
RMAN backup sets
Change tracking bitmaps
RMAN backup sets
Change tracking bitmaps
Online redo logs
RMAN data file copies
OCR files
RMAN data file copies
OCR files
Archive logs
Transport data files
ASM SPFILE
Transport data files
ASM SPFILE
23. List Key benefits of ASM?
- Stripes files rather than logical volumes
- Provides redundancy on a file basis
- Enables online disk reconfiguration and dynamic
rebalancing
- Reduces the time significantly to resynchronize a
transient failure by tracking changes while disk is offline
- Provides adjustable rebalancing speed
- Is cluster-aware
- Supports reading from mirrored copy instead of primary
copy for extended clusters
- Is automatically installed as part of the Grid
Infrastructure
24. What is ASM Striping?
ASM can use variable size data extents to support larger files,
reduce memory requirements, and improve performance.
Each data extent resides on an individual disk.
Data extents consist of one or more allocation units.
The data extent size is:
- Equal to AU for the first 20,000 extents (0–19999)
- Equal to 4 × AU for the next 20,000 extents
(20000–39999)
- Equal to 16 × AU for extents above 40,000
ASM stripes files using extents with a coarse method for load
balancing or a fine method to reduce latency.
- Coarse-grained striping is always equal to the
effective AU size.
- Fine-grained striping is always equal to 128 KB.
26. How many ASM Diskgroups can be created under one ASM Instance?
ASM imposes the following limits:
- 63
disk groups in a storage system
- 10,000 ASM disks in a storage system
- Two-terabyte
maximum storage for each ASM disk (non-Exadata)
- Four-petabyte maximum storage for each ASM disk
(Exadata)
- 40-exabyte maximum storage for each storage system
- 1 million files for each disk group
- ASM file size limits (database limit is 128 TB):
1.
External redundancy
maximum file size is 140 PB.
2.
Normal redundancy maximum file size is 42 PB.
3.
High redundancy maximum
file size is 15 PB.
27) What is a diskgroup?
A disk group consists of multiple disks and is the fundamental
object that ASM manages. Each disk group contains the metadata that is required
for the management of space in the disk group. The ASM instance manages the
metadata about the files in a Disk Group in the same way that a file system
manages metadata about its files. However, most I/O operations do not pass
through the ASM instance. In a moment we will look at how file
I/O works with respect to the ASM instance.
I/O works with respect to the ASM instance.
29) Diagram that how database interacts with ASM when a request is
to read or open a datafile.
1A. Database issues
open of a database file
1B. ASM sends the extent map for the file to database instance. Starting with 11g, the RDBMS only receives first 60 extents the remaining extents in the extent map are paged in on demand, providing a faster open
2A/2B. Database now reads directly from disk
3A.RDBMS foreground initiates a create tablespace for example
3B. ASM does the allocation for its essentially reserving the allocation units
for the file creation
3C. Once allocation phase is done, the extent map is sent to the RDBMS
3D. The RDBMS initialization phase kicks in. In this phase the initializes all
the reserved AUs
3E. If file creation is successful, then the RDBMS commits the file creation
1B. ASM sends the extent map for the file to database instance. Starting with 11g, the RDBMS only receives first 60 extents the remaining extents in the extent map are paged in on demand, providing a faster open
2A/2B. Database now reads directly from disk
3A.RDBMS foreground initiates a create tablespace for example
3B. ASM does the allocation for its essentially reserving the allocation units
for the file creation
3C. Once allocation phase is done, the extent map is sent to the RDBMS
3D. The RDBMS initialization phase kicks in. In this phase the initializes all
the reserved AUs
3E. If file creation is successful, then the RDBMS commits the file creation
Going forward all I/Os are done by the RDBMS directly
30) Can my disks in a diskgroup can be varied size? For example,
one disk is of 100GB and another disk is of 50GB. If so how does ASM manage the
extents?
Yes, disk sizes can be varied, Oracle ASM will manage data
efficiently and intelligent by placing the extents proportional to the size of
the disk in the disk group, bigger diskgroups have more extents than lesser
ones.
Q.
Don’t I lose all the advanced filesystem features when I move to AMS; e.g.,
direct I/O, write coalescing, and pre-fetch?
Ans . Yes, but that’s okay.
• Most of the filesystem features mentioned, though good for general file data performance, interfere and fractionalize the benefits inherently provided by the database; e.g.,
• DBWR & LGWR does write coalescing, and user processes do sequential pre-fetches
• All IO capable processes do un-buffered IO (raw IO) because of ASM
• Most of the filesystem features mentioned, though good for general file data performance, interfere and fractionalize the benefits inherently provided by the database; e.g.,
• DBWR & LGWR does write coalescing, and user processes do sequential pre-fetches
• All IO capable processes do un-buffered IO (raw IO) because of ASM
Q.
This is cool that ASM can now store Vote and OCR files. But how does CSS and
CRS startup in this configuration?
Ans . It just does
•There are two keys processes and a lot of crafty coding to get this to work in the correct startup sequence.
ASMCMD> pwd
+DATA/rst-cluster/OCRFILE
ASMCMD> ls -l
Type Redund Striped Time Sys Name
OCRFILE UNPROT COARSE JUN 25 11:00:00 Y REGISTRY.255.718984285
ASMCMD> lsdg
State Type Rebal Sector Block AU Total_MB Free_MB
Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
MOUNTED EXTERN N 512 4096 1048576 203824 193028
0 193028 0 Y DATA/
ASM Configuration
•There are two keys processes and a lot of crafty coding to get this to work in the correct startup sequence.
ASMCMD> pwd
+DATA/rst-cluster/OCRFILE
ASMCMD> ls -l
Type Redund Striped Time Sys Name
OCRFILE UNPROT COARSE JUN 25 11:00:00 Y REGISTRY.255.718984285
ASMCMD> lsdg
State Type Rebal Sector Block AU Total_MB Free_MB
Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
MOUNTED EXTERN N 512 4096 1048576 203824 193028
0 193028 0 Y DATA/
ASM Configuration
Q.
Do I need 11gR2 Grid Infrastructure to use ASM?
Ans . Yes. ASM is now part of Grid Infrastructure, which includes, Cluster
ware, ASM and ACFS. So, you’ll to Install GI to use ASM
• In 11gR2 there are two options for install – GI for Standalone Server (aka Oracle Restart) and GI for Cluster ware
• In 11gR2 there are two options for install – GI for Standalone Server (aka Oracle Restart) and GI for Cluster ware
Q.
Where do I run my database listener from; i.e., ASM HOME or DB HOME?
Ans . For 11gR2, the SCAN listener is run from GI Home, and database listener
from DB HOME.
• For pre-11gR2, it is recommended to run the listener from the ASM HOME. This is particularly important for RAC env, since the listener is a node-level resource. In this config, you can create additional [user] listeners from the database homes as needed.
• For pre-11gR2, it is recommended to run the listener from the ASM HOME. This is particularly important for RAC env, since the listener is a node-level resource. In this config, you can create additional [user] listeners from the database homes as needed.
Q. What is ASM Cluster File System
(ACFS)?
• General purpose scalable file system
• Journaling, extent based
• Single node and cluster
• POSIX, X/OPEN file system solution for UNIX/Linux
• Windows file system solution for Windows platforms
• Accessible through NAS protocols (NFS, CIFS)
• Leverages ASM technology
• Integrated with Oracle Clusterware for cluster support
• Multi OS platform (Linux and Windows at initial release)
• Integrated with Oracle system mgt tools
• Oracle installation and configuration
• Enterprise Manager and ASM Storage mgt tools
• Native OS File System Management tools
• General purpose scalable file system
• Journaling, extent based
• Single node and cluster
• POSIX, X/OPEN file system solution for UNIX/Linux
• Windows file system solution for Windows platforms
• Accessible through NAS protocols (NFS, CIFS)
• Leverages ASM technology
• Integrated with Oracle Clusterware for cluster support
• Multi OS platform (Linux and Windows at initial release)
• Integrated with Oracle system mgt tools
• Oracle installation and configuration
• Enterprise Manager and ASM Storage mgt tools
• Native OS File System Management tools
ACFS
Features
Provides filesystem snapshots (FCOW)
• File system integrity and fast recovery via ACFS metadata checksums and journaling.
• ACFS designed as a peer to peer, multi-node, shared file system model and delivers coherent data access
• ACFS file system is installed as a dynamically loadable OS VFS driver
• Starting with RHEL5, Redhat now supports a ‘white list’ -kernel APIs which they commit they will not change in updates or patches. APIs used by ACFS-ADVM were added to their ‘white list’.
• Customers should be able to install an update or patch to the kernel and our drivers should not be impacted
Provides filesystem snapshots (FCOW)
• File system integrity and fast recovery via ACFS metadata checksums and journaling.
• ACFS designed as a peer to peer, multi-node, shared file system model and delivers coherent data access
• ACFS file system is installed as a dynamically loadable OS VFS driver
• Starting with RHEL5, Redhat now supports a ‘white list’ -kernel APIs which they commit they will not change in updates or patches. APIs used by ACFS-ADVM were added to their ‘white list’.
• Customers should be able to install an update or patch to the kernel and our drivers should not be impacted
Q.
Is ACFS supported on other platforms besides Linux
Ans . Yes. Other platforms are forthcoming
Q.
Can ACFS be used to store database datafiles? What about archive logs?
Ans . No. Currently we will not support database file to be stored in ACFS. This
is due to performance reasons. Though you can do this in test/Q&A
environments where performance is not essential
Q.
Can I sue ACFS to store BFILE data or other non-database related data
Ans . Yes. ACFS is POSIX compliant filesystem, and thus can store any file data
type (besides atabase files
)
Q.
Is ASMLIB required on Linux systems and are there any benefits to using it?
Ans . ASMLIB is not required to run ASM, but it is certainly recommended.
ASMLIB has following benefits:
• Simplified disk discovery
• Persistent disk names
• Efficient use of system resources
ASMLIB has following benefits:
• Simplified disk discovery
• Persistent disk names
• Efficient use of system resources
1. What is the use of ASM (or) Why ASM preferred over
filesystem?
Ans: ASM provides striping
and mirroring.
3. What is rebalancing (or) what is the use of ASM_POWER_LIMIT?
ASM_POWER_LIMIT is dynamic parameter, which will be useful for
rebalancing the data across disks.
Value can be 1(lowest) to 11 (highest).
4.
What are different types of redundancies in ASM & explain?
External redundancy,
Normal redundancy,
High redundancy.
7.
What are different types of stripings in ASM & their differences?
Fine-grained striping
Coarse-grained striping
lsdg
select NAME,ALLOCATION_UNIT_SIZE from v$asm_diskgroup;
8.
What is allocation unit and what is default value of au_size and how to change?
Every ASM disk is divided into allocation units (AU). An AU is
the fundamental unit of allocation within a disk group. A file extent consists
of one or more AU. An ASM file consists of one or more file extents.
CREATE DISKGROUP disk_group_2 EXTERNAL REDUNDANCY DISK
‘/dev/sde1’ ATRRIBUTE ‘au_size’ = ’32M’;
1) Create Disk Group:
Create Disk groups using the CREATE DISKGROUP statement
and specify the level of redundancy.
Disk group redundancy types:-
NORMAL REDUNDANCY – Two-way mirroring, requiring two
failure groups.
HIGH REDUNDANCY – Three-way mirroring, requiring three failure groups.
EXTERNAL REDUNDANCY – No mirroring for disks that are already protected using hardware RAID or mirroring.
Example 1 : External Redundancy
HIGH REDUNDANCY – Three-way mirroring, requiring three failure groups.
EXTERNAL REDUNDANCY – No mirroring for disks that are already protected using hardware RAID or mirroring.
Example 1 : External Redundancy
SQL>
create diskgroup DATA external redundancy disk ‘/dev/oracleasm/disks/DISK1′
name DATA_1;
Example 2 : Normal Redundancy
SQL>
CREATE DISKGROUP data NORMAL REDUNDANCY
FAILGROUP failure_group_1 DISK ‘/dev/oracleasm/disks/DISK2′
NAME DATA_2,’/dev/oracleasm/disks/DISK3′ NAME DATA_3,
FAILGROUP failure_group_2 DISK
‘/dev/oracleasm/disks/DISK4′ NAME DATA_4,’/dev/oracleasm/disks/DISK5′ NAME
DATA_5;
2) Drop Disk Group:
Using DROP DISKGROUP statement.
SQL>
DROP DISKGROUP data INCLUDING CONTENTS;
3) Alter Disk Group:
Add or remove disks from disk groups Using ALTER
DISKGROUP statement. You can also use wildcard “*” to reference disks.
3.1) Add a disk.
SQL>
ALTER DISKGROUP data ADD DISK ”/dev/oracleasm/disks/DISK6′ ;
3.2) Drop/remove a disk.
SQL> ALTER DISKGROUP data DROP DISK DATA_5;
3.3) Undrop disk
The UNDROP command used to undo only pending drop of
disks. After you drop the disks you cannot revert.
SQL>
ALTER DISKGROUP data UNDROP DISKS;
3.4) Diskgroup Rebalance:
Disk groups can be rebalanced manually Using REBALANCE clause and you can modify the POWER clause default value.
Disk groups can be rebalanced manually Using REBALANCE clause and you can modify the POWER clause default value.
SQL>
ALTER DISKGROUP DATA REBALANCE POWER 8;
3.5) MOUNT and DISMOUNT DiskGroups:
Normally Disk groups are mounted at ASM instance startup and dismounted at shutdown.
Normally Disk groups are mounted at ASM instance startup and dismounted at shutdown.
Using MOUNT and DISMOUNT options you can make one or more
Disk Groups available or unavailable.
SQL> ALTER DISKGROUP data MOUNT;
SQL> ALTER DISKGROUP data DISMOUNT;
SQL> ALTER DISKGROUP ALL MOUNT;
SQL> ALTER DISKGROUP ALL DISMOUNT;
3.6) DiskGroup Check:
Use CHECK ALL to verify the internal consistency of disk
group metadata and repair in case of any error.
SQL>
ALTER DISKGROUP data CHECK ALL;
3.7) DiskGroup resize:
Resize the one or all disks in the Diskgroup.
Resize the one or all disks in the Diskgroup.
Resize all disks in a failure group.
SQL>
ALTER DISKGROUP data RESIZE DISKS IN FAILGROUP failure_group_1 SIZE 1024G;
Resize a specific disk.
SQL>
ALTER DISKGROUP data RESIZE DISK DATA_0006 SIZE 100G;
Resize all disks in a disk group.
SQL>
ALTER DISKGROUP data RESIZE ALL SIZE 100G;
4) To find ASM Diskgroup and Disks status
set
lines 132
col
name format a14
col
PATH format a33
select
GROUP_NUMBER,NAME,STATE,TYPE,TOTAL_MB,FREE_MB,VOTING_FILES from
v$asm_diskgroup;
GROUP_NUMBER
NAME STATE
TYPE TOTAL_MB FREE_MB V
------------
------------------------------ ----------- ------ ---------- ---------- -
1
OCR_VOTE MOUNTED EXTERN 152999 152603 Y
2
DB_DATA MOUNTED EXTERN 812000 810198 N
select
GROUP_NUMBER,DISK_NUMBER,MOUNT_STATUS,HEADER_STATUS,MODE_STATUS,STATE,VOTING_FILE,name,path
from v$asm_disk;
GROUP_NUMBER DISK_NUMBER
MOUNT_S HEADER_STATU MODE_ST STATE V
NAME PATH
------------
----------- ------- ------------ ------- -------- - --------------
---------------------------------
1
0 CACHED
MEMBER ONLINE NORMAL Y
OCR_VOTE_0 /dev/oracleasm/disks/OCR_VOTE01
2
3 CACHED
MEMBER ONLINE NORMAL N
DB_DATA_3 /dev/oracleasm/disks/DB_DATA04
2
2 CACHED
MEMBER ONLINE NORMAL N
DB_DATA_2 /dev/oracleasm/disks/DB_DATA03
2
1 CACHED
MEMBER ONLINE NORMAL N
DB_DATA_1 /dev/oracleasm/disks/DB_DATA02
2
0 CACHED
MEMBER ONLINE NORMAL N
DB_DATA_0 /dev/oracleasm/disks/DB_DATA01
6
rows selected.
Comments
Post a Comment