MINI MINI MANI MO
<?xml version="1.0" encoding="utf-8"?>
<commands xmlns="ASMCMD">
<command cmdName="dsget" noinstance="undef">
<synopsis>dsget [ --normal | --profile [ -f ] | --parameter ]</synopsis>
<description>Retrieves the discovery diskstring value that is
used by the Oracle ASM Instance and its clients</description>
<seeAlso>dsset</seeAlso>
<exceptions/>
<example>The following example uses dsget to retrieve the current discovery
diskstring value from the GPnP profile and the ASM_DISKSTRING parameter.
ASMCMD [+] > dsget
profile: /devices/disk*
parameter: /devices/disk*
</example>
<options>normal profile force parameter</options>
<optDescription>
The options for the dsget command are described below.
--normal - Retrieves the discovery string from the Grid Plug
and Play (GPnP) profile and the one that is set in
the Oracle ASM instance. It returns one row each for
the profile and parameter setting. This is the
default setting.
--parameter - Retrieves the ASM_DISKSTRING parameter setting of
the Oracle ASM instance.
--profile - Retrieves the discovery string from the GPnP
profile.
-f - If -f is specified, retrieves the discovery string
from the local GPnP profile. This parameter
can only be specified if --profile is specified.
</optDescription>
</command>
<command cmdName="dsset" noinstance="undef">
<synopsis>dsset [ --normal | --parameter | --profile [ -f ] ] <diskstring></synopsis>
<description>Sets the discovery diskstring value that is used by the Oracle ASM
instance and its clients. The specified diskstring must be valid for
existing mounted disk groups. The updated value takes effect
immediately.</description>
<seeAlso>dsget</seeAlso>
<exceptions/>
<example>The following example uses dsset to set the current value of the
discovery diskstring in the GPnP profile.
ASMCMD [+] > dsset /devices/disk*
</example>
<options>normal parameter profile force</options>
<optDescription>
The options for the dsset command are described below.
--normal - Sets the discovery string in the Grid Plug
and Play (GPnP) profile and in the Oracle
ASM instance. The update occurs after the
Oracle ASM instance has successfully
validated that the specified discovery
string has discovered all the necessary disk
groups and voting files. Note that this
command fails if the instance is not using
a server parameter file (SPFILE). This is
the default setting.
--profile - Specifies the discovery diskstring that is
pushed to the GPnP profile without any
validation by the Oracle ASM instance,
ensuring that the instance can discover
all the required disk groups. The update
is guaranteed to be propagated to all the
nodes that are part of the cluster
-f - If -f is specified, the specified
diskstring is pushed to the local GPnP
profile without any synchronization with
other nodes in the cluster. Note that this
command option updates only the local profile
file. This option should only be used in the
case of recovery. The command fails if the
Oracle Clusterware stack is running. This
option can be specified only if --profile is
specified.
--parameter - Specifies that the diskstring is updated in
memory after validating that the discovery
diskstring discovers all the current mounted
disk groups and voting files. The diskstring
is not persistently recorded in either the
SPFILE or the GPnP profile.
diskstring - Specifies the value for the discovery
diskstring</optDescription>
</command>
<command cmdName="lsct" visible="true">
<synopsis>lsct [-g] [--target <target>] [--suppressheader] [<diskgroup>]</synopsis>
<description>Lists information about current Oracle ASM clients from the
V$ASM_CLIENT view. A client, such as Oracle Database or Oracle ASM
Dynamic Volume Manager (Oracle ADVM), uses disk groups that are managed
by the Oracle ASM instance to which ASMCMD is currently connected.</description>
<seeAlso></seeAlso>
<exceptions></exceptions>
<example>The following example displays information about the clients that
are accessing the data disk group.
ASMCMD [+] > lsct data
DB_Name Status Software_Version Compatible_version Instance_Name Disk_Group
+ASM CONNECTED 11.2.0.2.0 11.2.0.2.0 +ASM DATA
asmvol CONNECTED 11.2.0.2.0 11.2.0.2.0 +ASM DATA
orcl CONNECTED 11.2.0.2.0 11.2.0.2.0 orcl DATA
</example>
<options>g target suppressheader</options>
<optDescription>
The options for the lsct command are described below.
(none) - Displays information about current clients from
the V$ASM_CLIENT or V$IOS_CLIENT views.
-g - Selects from the GV$ASM_CLIENT or GV$IOS_CLIENT
views. GV$ASM_CLIENT.INST_ID is included in the
output.
--target - Argument for target option could be either ASM,
IOS, or APX, depending the clients of which
instance are wanted to be listed.
--suppressheader - Suppresses column headings.
diskgroup - Specifies the disk group.
The Compatible.ASM attribute must be advanced before advancing other
disk group compatibility attributes and its value must be greater than
or equal to the value of the other disk group compatibility attributes.
</optDescription>
</command>
<command cmdName="lsop" visible="true">
<synopsis>lsop [-G <diskgroup> ]</synopsis>
<description>Lists the current operations on a disk group in Oracle ASM instance.
</description>
<seeAlso></seeAlso>
<exceptions></exceptions>
<example>The following are examples of the lsop command. The examples list
operations on the disk groups of the current Oracle ASM instance.
ASMCMD [+] > lsop
Group_Name Operation State Power EST_WORK EST_RATE EST_TIME
DATA REBAL WAIT 2
ASMCMD [+] > lsop
Group_Name Operation State Power EST_WORK EST_RATE EST_TIME
DATA REBAL WAIT 2
Group_Name Operation State Power EST_WORK EST_RATE EST_TIME
FRA REBAL REAP 3 125 35 25
</example>
<options></options>
<optDescription>
The options for the lsop command are described below.
(none) - Lists the current operations on diskgroups in
the Oracle instance.
-G diskgroup - Lists the current operations on the given
diskgroup.
lsop displays information from the V$ASM_OPERATION view.
</optDescription>
</command>
<command cmdName="lspwusr" visible="true">
<synopsis>lspwusr [--suppressheader]</synopsis>
<description>List the users from the local Oracle ASM password file </description>
<seeAlso/>
<exceptions/>
<example>The following is an example of the lspwusr example.
The example lists the current users in the local Oracle ASM
password file.
ASMCMD [+] > lspwusr
Username sysdba sysoper sysasm
SYS TRUE TRUE TRUE
ASMSNMP TRUE FALSE FALSE
</example>
<options>suppressheader</options>
<optDescription>
The option for the lspwusr command is described below.
--suppressheader - Suppresses column headers from the output.</optDescription>
</command>
<command cmdName="orapwusr" visible="true">
<synopsis>orapwusr {--add | --modify | --delete | --grant {sysasm|sysdba|sysoper} | --revoke {sysasm|sysdba|sysoper} } <user> </synopsis>
<description>Add, drop, or modify an Oracle ASM password file user.</description>
<seeAlso/>
<exceptions/>
<example>The following is an example of the orapwusr command.
This example adds the hruser to the Oracle ASM password file.
ASMCMD [+] > orapwusr --add hruser
</example>
<options>add modify delete grant revoke</options>
<optDescription>
The options for the orapwusr command are described below.
--add - Adds a user to the password file. Also prompts
for a password.
--modify - Changes password for the given user.
--grant role - Sets the role for the user. The options are
sysasm, sysdba and sysoper.
--revoke role - Removes the role for the user. The options are
sysasm, sysdba and sysoper.
--delete - Drops a user from the password file.
user - the user to add, drop, or modify.
orapwusr attempts to update passwords on all nodes in a cluster.
The command requires the SYSASM privilege to run. A user logged in
as SYSDBA cannot change its password using this command. </optDescription>
</command>
<command cmdName="shutdown" visible="true">
<synopsis>shutdown [--target <target>] [ --normal |--abort|--immediate ]</synopsis>
<description>Shuts down an Oracle ASM, APX, or IOS instance.</description>
<seeAlso>startup</seeAlso>
<exceptions/>
<example>The following are examples of the shutdown command.
The first and second examples perform a shut down of the instance with
normal action. The third example performs a shut down with immediate
action. The fourth example performs a shut down that aborts all
existing operations.
The examples using --target options allow the user to specify the
instance type to shut down. If this option is not set, target instance
is selected by the value of ORACLE_SID variable.
ASMCMD [+] > shutdown
ASMCMD [+] > shutdown --normal
ASMCMD [+] > shutdown --immediate
ASMCMD [+] > shutdown --abort
ASMCMD [+] > shutdown --target IOS --immediate
ASMCMD [+] > shutdown --target ASM --normal
ASMCMD [+] > shutdown --target APX --abort
</example>
<options>target normal abort immediate</options>
<optDescription>
The options for the shutdown command are described below.
--normal - optional, if no option is specified, --normal is
assumed.
--abort - Shut down aborting all existing operations.
--immediate - Shut down immediately.
--target - Argument for target option could be either ASM,
IOS, or APX, depending which type of instance
needs to be shut down.
The default action is a normal shutdown if no options are specified.
Oracle strongly recommends that you shut down all database instances
that use the Oracle ASM, APX, or IOS instances and dismount all file
systems mounted on Oracle ASM Dynamic Volume Manager (Oracle ADVM)
volumes before attempting to shut down the Oracle ASM instance with
the abort (--abort) option.</optDescription>
</command>
<command cmdName="spbackup" visible="true">
<synopsis>spbackup <source> <destination></synopsis>
<description>Backs up an Oracle ASM SPFILE to a backup file.</description>
<seeAlso>cp spcopy</seeAlso>
<exceptions/>
<example>The following are examples of the spbackup command.
The first example backs up the SPFILE in the DATA disk group.
The second example backs up the SPFILE from the DATA disk group to the
FRA disk group.
ASMCMD>spbackup +DATA/asm/asmparameterfile/registry.253.721810181
+DATA/spfileBackASM.bak
ASMCMD>spbackup +DATA/asm/asmparameterfile/registry.253.721810181
+FRA/spfileBackASM.bak
</example>
<options></options>
<optDescription>
The options for the spbackup command are described below:
source - specifies the source file name
destination - specifies the destination file name
spbackup should be used when you want to make single or multiple
backups of an SPFILE in the same or different disk group without
creating an SPFILE in target disk group.
Note the following about the use of spbackup:
spbackup can back up an Oracle ASM SPFILE from a disk group to a
disk group or to an operating system file.
spbackup can back up an Oracle ASM SPFILE from an operating
system file to a disk group or to an operating system file.
spbackup can back up an Oracle ASM SPFILE when the SPFILE is being
used by an open Oracle ASM instance.
spbackup can make multiple backups of an Oracle ASM SPFILE in the
same disk group.
spbackup does not affect the GPnP profile. The backup file that is
created is not identified as an SPFILE.
To copy this backup file, use the ASMCMD cp command.
To restore this backup file, use the ASMCMD spcopy command.
</optDescription>
</command>
<command cmdName="spget" visible="true">
<synopsis>spget</synopsis>
<description>Retrieves the location of the Oracle ASM SPFILE from the Grid Plug
and Play (GPnP) profile.</description>
<seeAlso/>
<exceptions/>
<example>The following is an example of the spget command that retrieves and
displays the location of the SPFILE from the GPnP profile.
ASMCMD [+] > spget
+DATA/asm/asmparameterfile/registry.253.691575633</example>
<options/>
<optDescription>
Note that the location retrieved by spget is the location in the GPnP
profile, but not always the location of the SPFILE currently used.
For example, the location could have been recently updated by spset or
spcopy with the -u option on an Oracle ASM instance that has not been
restarted. After the next restart of the Oracle ASM, this location
will spcopy with the -u option on an Oracle ASM instance that has not
been point to the ASM SPFILE currently being used.</optDescription>
</command>
<command cmdName="spcopy" visible="true">
<synopsis>spcopy [-u] <source> <destination></synopsis>
<description>Copies an Oracle ASM SPFILE or an Oracle ASM backup file from source
location to an Oracle ASM SPFILE in the destination location.</description>
<seeAlso/>
<exceptions/>
<example>The following are examples of the spcopy command.
The first example copies the Oracle ASM SPFILE from the DATA disk group
to the FRA disk group.
The second example copies the Oracle ASM SPFILE from the DATA disk group
to an operating system location.
The third example copies an Oracle ASM SPFILE from an operating system
location to the DATA disk group and updates the GPnP profile with -u
option.
The fourth example copies an Oracle ASM backup file from the BACKUP disk
group to the DATA disk group as the Oracle ASM SPFILE, and updates the
GPnP profile.
ASMCMD> spcopy +DATA/asm/asmparameterfile/registry.253.721810181
+FRA/spfileCopyASM.ora
ASMCMD> spcopy +DATA/asm/asmparameterfile/registry.253.721810181
$ORACLE_HOME/dbs/spfileCopyASM.ora
ASMCMD> spcopy -u /u01/oracle/product/11.2.0/grid/dbs/spfileTestASM.ora
+DATA/ASM/spfileCopyASM.ora
ASMCMD> spcopy -u +BACKUP/backupspfile +DATA</example>
<options>u</options>
<optDescription>
The options for the spcopy command are described below.
-u - Updates the Grid Plug and Play (GPnP) profile.
source - Specifies the source file name.
destination - Specifies the destination.
Note the following about the use of spcopy
spcopy can copy an Oracle ASM SPFILE from a disk group to a
different disk group or to an Operating System file.
spcopy can copy an Oracle ASM SPFILE from an operating system
file to a disk group.
spcopy can copy an Oracle ASM SPFILE when the SPFILE is being used
by an open Oracle ASM instance
spcopy can copy an Oracle ASM backup file from a disk group to
a different disk group. The destination is an Oracle ASM SPFILE.
spcopy cannot make multiple copies of an Oracle ASM SPFILE in the
same disk group. spbackup can be used for that purpose.
To update the GPnP profile, include the -u option with spcopy. You can
also use spset to update the GPnP profile if spcopy is run without
the -u option.
After copying the SPFILE and updating the GPnP profile, you must restart
the instance with the SPFILE in the new location to use that SPFILE.
When the Oracle ASM instance is running with the SPFILE in the new
location, you can remove the source SPFILE.
To copy an ORACLE SPFILE into a disk group using spcopy, the
COMPATIBLE.ASM attribute must be set to 11.2 or greater in the target
disk group.
</optDescription>
</command>
<command cmdName="spmove" visible="true">
<synopsis>spmove <source> <destination></synopsis>
<description>Moves an Oracle ASM SPFILE from source to destination and
automatically updates the GPnP profile.</description>
<seeAlso></seeAlso>
<exceptions></exceptions>
<example>The following are examples of the spmove command.
The first example moves the Oracle ASM SPFILE from one operating
system location to another. The second example moves the SPFILE from
an operating system location to the DATA disk group.
ASMCMD> spmove /u01/oracle/dbs/spfile+ASM.ora /u01/oracle/dbs/testspfileASM.ora
ASMCMD> spmove /u01/oracle/dbs/spfile+ASM.ora +DATA/testspfileASM.ora</example>
<options/>
<optDescription>
The options for the spmove command are described below.
source - Specifies the source file name.
destination - Specifies the destination file.
Note the following about the use of spmove:
spmove can move an Oracle ASM SPFILE when the open instance is using
a PFILE or a different SPFILE. After moving the SPFILE, you must
restart the instance with the SPFILE in the new location if you want
the instance to use that SPFILE.
spmove cannot move an Oracle ASM SPFILE when the SPFILE is being used
by an open Oracle ASM instance.
To use spmove to move an Oracle ASM SPFILE into a disk group, the disk
group attribute COMPATIBLE.ASM must be set to 11.2 or greater.</optDescription>
</command>
<command cmdName="spset" visible="true">
<synopsis>spset <location></synopsis>
<description>Set the location of the ORACLE ASM SPFILE in Grid Plug and Play
(GPnP) profile</description>
<seeAlso/>
<exceptions>spset/spget should have --normal --profile and -f option as in dsset/dsget.</exceptions>
<example>The following is an example of spset command that sets
the location of the Oracle ASM SPFILE command in the data disk group.
ASMCMD> spset +DATA/asm/asmparameterfile/asmspfile.ora</example>
<options/>
<optDescription>
The option for the spset command is described below
location - specifies the location of the Oracle ASM SPFILE.</optDescription>
</command>
<command cmdName="startup" noinstance="true" visible="true">
<synopsis>startup [--mount] [--nomount] [--restrict] [ --pfile <pfile> ]</synopsis>
<description>Starts up an Oracle ASM instance.</description>
<seeAlso/>
<exceptions/>
<example>The following is an example of the startup command that starts the
Oracle ASM instance without mounting disk groups and uses the asm_init.
ora initialization parameter file.
ASMCMD> startup --nomount --pfile asm_init.ora
</example>
<options>nomount restrict pfile</options>
<optDescription>
The options for the startup command are described below.
--mount - default mount operation.
--nomount - Specifies no mount operation.
--restrict - Specifies restricted mode.
--pfile pfile - Oracle ASM initialization parameter file.
The default action is a start up that mounts disk groups and enables
Oracle ADVM volumes.</optDescription>
</command>
<command cmdName="cd" visible="true" wildcard="true" priv="sysdba">
<synopsis>cd <dir></synopsis>
<description>Changes the current directory to the specified directory.</description>
<seeAlso/>
<exceptions/>
<example>The following are examples of the cd command changing into various
directories.
ASMCMD [+data/hr] > cd +data/orcl
ASMCMD [+data/orcl] > cd DATAFILE
ASMCMD [+data/orcl/DATAFILE] >cd ..
</example>
<options/>
<optDescription>
The option for the cd command is described below.
dir - Name of the directory.
dir can be specified as either an absolute path or a relative path,
including the . and .. pseudo-directories. dir can contain wildcard
characters.
This setting affects all subsequent operations on filespecs
that do not contain an absolute path.</optDescription>
</command>
<command cmdName="cp" visible="true" wildcard="true" priv="sysdba">
<synopsis>cp [--target <target>] [--service <name>] [--port <port>] [--dest_dbname <name>] [--sparse] [--sparse_merge_begin] <[connect_str:]src_file...> <[connect_str:]tgt_file> [--sparse_merge_end <sparse_merge_end_file>]</synopsis>
<description>Copy files between Oracle ASM disk groups on local
instances to and from remote instances.</description>
<seeAlso/>
<exceptions/>
<example>The following are examples of the cp command.
The first example shows a copy of a file in the data disk group to
a file on the operating system.
The second example shows a copy of several files in the data diskgroup
to a directory on the operating system.
The third example shows a copy of a file on the operating system to
the DATA disk group. The --dest_dbname option was used, so the system
alias for the copied file will be stored under +DATA/DB1/DATAFILE
instead of using the default +DATA/ASM/DATAFILE.
The fourth and fifth examples shows how to copy files from ASM to
remote server (OS file).
The sixth example shows how to copy a remote OS File to DATA diskgroup.
The seventh example shows how to copy a remote OS File to DATA diskgroup
when listener port is not default.
The eight example shows how to make a sparse copy of a file between
sparse diskgroups.
The ninth example shows how to make a sparse copy of multiple sparse
files.
Sparse merge: Consider a multi-level sparse file hierarchy having sparse
files SPARSE.205.14770227--SPARSE.241.14770227--SPARSE.257.71740127--SPARSE.259.91640227
where SPARSE.205.14770227 is the base parent and SPARSE.241.14770227
is the parent of SPARSE.257.71740127, which in turn is the parent of
SPARSE.259.91640227.
The tenth example shows how to merge multiple sparse files into a
new destination file (out-of-place merge).
The eleventh example shows how to merge multiple sparse files into an
existing sparse file (in-place merge).
sys is the user name on the remote server
password is the password of the user.
server is the remote server name
/scratch/file OS file.
If password is not included in the command line, you are prompted to
enter the password.
ASMCMD [+] > cp +data/orcl/datafile/EXAMPLE.265.691577295
/mybackups/example.bak
copying +data/orcl/datafile/EXAMPLE.265.691577295 ->
/mybackups/example.bak
ASMCMD [+] > cp +data/orcl/data*/orcl* /mybackups
copying +data/orcl/DATAFILE/ORCLTABLES.273.924621557 ->
/mybackups/ORCLTABLES.273.924621557
copying +data/orcl/DATAFILE/ORCLTABLES.274.924621557 ->
/mybackups/ORCLTABLES.274.924621557
copying +data/orcl/DATAFILE/ORCLTABLES.275.924621557 ->
/mybackups/ORCLTABLES.275.924621557
ASMCMD [+] > cp /mybackups/examples.bak
+data/orcl/datafile/myexamples.bak --dest_dbname DB1
copying /mybackups/examples.bak -> +data/orcl/datafile/myexamples.bak
ASMCMD [+] > cp +data/orcl/datafile/EXAMPLE.265.691577295
sys@server.asminstance:/scratch/file
copying +data/orcl/datafile/EXAMPLE.265.691577295 ->
/scratch/file
ASMCMD [+] > cp +data/orcl/datafile/EXAMPLE.265.691577295
sys/passwd@server.asminstance:/scratch/file
copying +data/orcl/datafile/EXAMPLE.265.691577295 ->
/scratch/file
ASMCMD [+] > cp sys@server.SID:/scratch/file +data/orcl/datafile/file
copying /scratch/file -> +data/orcl/datafile/file
ASMCMD [+] > cp --port 2500 sys@server.SID:/scratch/file
+data/orcl/datafile/file
copying /scratch/file -> +data/orcl/datafile/file
ASMCMD [+] > cp --sparse +SPARSEDG/SPARSE.259.91640227
+SPARSEDG/sparsefile/sparse_cp
copying +SPARSEDG/SPARSE.259.91640227 -> +SPARSEDG/sparsefile/sparse_cp
ASMCMD [+] > cp --sparse +SPARSEDG/sparse_alias.1
+SPARSEDG/sparse_alias.2
+SPARSEDG/dir/sp_alias.3 +SPARSEDG/sparsedir/
copying +SPARSEDG/sparse_alias.1 -> +SPARSEDG/sparsedir/sparse_alias.1
copying +SPARSEDG/sparse_alias.2 -> +SPARSEDG/sparsedir/sparse_alias.2
copying +SPARSEDG/dir/sp_alias.3 -> +SPARSEDG/sparsedir/sp_alias.3
ASMCMD [+] > cp --sparse_merge_begin +SPARSEDG/SPARSE.259.91640227
+SPARSEDG/sparsefile/sparse_merge
--sparse_merge_end +SPARSEDG/SPARSE.205.14770227
merging +SPARSEDG/SPARSE.259.91640227 through +SPARSEDG/SPARSE.205.14770227
to +SPARSEDG/sparsefile/sparse_merge
ASMCMD [+] > cp --sparse_merge_begin +SPARSEDG/SPARSE.259.91640227
+SPARSEDG/SPARSE.259.91640227
--sparse_merge_end +SPARSEDG/SPARSE.241.14770227
merging +SPARSEDG/SPARSE.259.91640227 through +SPARSEDG/SPARSE.241.14770227
to +SPARSEDG/SPARSE.259.91640227
NOTE: cp command can be used to copy files from ASM diskgroups to
namedpipe(fifo). The following is an example to copy to fifo.
$bash> mkfifo /tmp/fifotest
$bash> cp /tmp/fifotest /tmp/file &
$bash> asmcmd cp +data/orcl/datafile/file /tmp/fifotest
copying +data/orcl/datafile/file -> /tmp/fifotest
</example>
<options>target service port dest_dbname sparse sparse_merge_begin sparse_merge_end</options>
<optDescription>
The options for the cp command are described below.
--target - Argument for target option could be either ASM,
IOS, or APX, depending which type of instance ASMCMD
needs to be connected to copy the file or files.
--service - Name of the ASM instance name if not default +ASM.
--port - Listener port number, default is 1521.
--dest_dbname - Only used if target file is in a diskgroup.
Specified name will be used as the root directory
instead of using the default (either ASM, IOS, or
APX, depending which target was specified). If
this option is used, the system alias root path
will be +<DG>/<name>/
--sparse - Indicates that it is a sparse copy of a file.
--sparse_merge_begin - Beginning depth of a sparse file to be merged.
--sparse_merge_end - Ending depth of a sparse file to be merged.
connect_str - The connection string to be used with a remote
instance copy.
src_file - Name of the source file to copy. Use of wild cards
is supported.
tgt_file - A user alias for the created target file name or
alias directory name.
cp cannot copy files between two remote instances. The local Oracle
ASM instance must be either the source or the target of the operation.
You can use the cp command to:
Copy files from a disk group to the operating system
Copy files from a disk group to a disk group
Copy files from the OS file system to a disk group
Some file types cannot be the source or destination of the cp command.
These file types include OCR and SPFILE file types.
To back up, copy, or move an ASM SPFILE, use the spbackup, spcopy,
or spmove commands.
To copy OCR backup filetype, the source must be from a disk group.
connect_str is not required for a local instance copy, which is the
default case. In the case of a remote instance copy, you must specify
the connect string and Oracle ASM prompts for a password in a
non-echoing prompt. The connect_str is in the form of:
user@host.SID
user, host, and SID are required in the connect_str parameter. The
default port number is 1521.
--service - name of the ASM instance name if not default +ASM.
connect_str - The connection string to be used with a remote instance
src_file must be either the a fully qualified file name,
system-generated name, or Oracle ASM alias.
The format of copied files is portable between Little-Endian and
Big-Endian systems if the files exist in an ASM disk group. ASM
automatically converts the format when it writes the files. For copying
a non-ASM files from or to an ASM disk group, you can copy the file to
a different endian platform and then use one of the commonly used
utilities to convert the file.</optDescription>
</command>
<command cmdName="setsparseparent" visible="true" wildcard="true" priv="sysdba">
<synopsis>setsparseparent <child_file...> <parent_file></synopsis>
<description>Sets parent for a sparse child file(s)</description>
<seeAlso/>
<exceptions/>
<example>The following are the examples of setsparseparent command.
The first example sets a parent in the data disk group to a sparse file
in the sparse disk group.
The second example sets parent in the data disk group to multiple
sparse files in the sparse disk group.
ASMCMD [+] > setsparseparent +SPARSEDG/child.1.10 +DATAFILE/parent.1.f
setting parent of +SPARSEDG/child.1.10 to +DATAFILE/parent.1.f
ASMCMD [+] > setsparseparent +SPARSEDG/child.1a.10 +SPARSEDG/child.1b.11
+SPARSEDG/child.1c.12 +DATAFILE/parent.1.f
setting parent of +SPARSEDG/child.1a.10 to +DATAFILE/parent.1.f
setting parent of +SPARSEDG/child.1b.11 to +DATAFILE/parent.1.f
setting parent of +SPARSEDG/child.1c.12 to +DATAFILE/parent.1.f
</example>
<options></options>
<optDescription>
setsparseparent can operate only between two local Oracle ASM instances.
Operation between local and remote or between two remote instances is
not supported.
setsparseparent command can be used to update parent-child relationships
between any two disk groups or within the same diskgroup provided that
child file(s) belong to a sparse disk group.
</optDescription>
</command>
<command cmdName="du" visible="true" wildcard="true" priv="sysdba">
<synopsis>du [--suppressheader] [<dir>]</synopsis>
<description>Displays the total space used for files in the specified directory and
in the entire directory tree under the directory.</description>
<seeAlso/>
<exceptions/>
<example>The following is an example of the du command. The example shows
disk space used in the orcl directory in DATA, including all of the
directories under the orcl directory.
ASMCMD [+] > du DATA/orcl
Used_MB Mirror_used_MB
1756 3519
</example>
<options>suppressheader</options>
<optDescription>
The options for the du command are described below.
dir - Name of the directory.
--suppressheader - Suppresses column headings from the output.
If you do not specify dir, then information about the current
directory is displayed. dir can contain wildcard characters.
The following two values are displayed, both in units of megabytes.
Used_MB - Space does not include mirroring.
Mirror_used_MB - Space includes mirroring.
For example, if a normal redundancy disk group contains 100 MB of data
then assuming that each file in the disk group is 2-way mirrored,
Used_MB is 100 MB and Mirror_used_MB is roughly 200 MB.
Note that this command displays the information about the space usage
of files inside the disk group not the size of the disk group.
</optDescription>
</command>
<command cmdName="find" visible="true" wildcard="true" priv="sysdba">
<synopsis>find [--type <type>] <dir> <pattern></synopsis>
<description>Displays the absolute paths of all occurrences of the specified name
pattern (with wildcards) in a specified directory and its
subdirectories.</description>
<seeAlso/>
<exceptions/>
<example>The following are examples of the find command.
The first example searches the data disk group and subdirectories
for files that begin with UNDO. The second example returns the
absolute path of all the control files (--type CONTROLFILE) in the
+DATA/orcl directory.
ASMCMD [+] > find +data undo*
+data/ORCL/DATAFILE/UNDOTBS1.258.691577151
ASMCMD [+] > find --type CONTROLFILE +data/orcl *
+data/orcl/CONTROLFILE/Current.260.691577263
</example>
<options>type</options>
<optDescription>
The options for the find command are described below.
--type <type> - Type of target that you want to find.
<dir> - Directory name where you want to start searching.
pattern - Name of a target or a wildcard pattern.
This command searches the specified directory and all subdirectories
under it in the directory tree for the supplied pattern. The value
that you use for pattern can be a directory name or a filename, and
can include wildcard characters.
The ASMCMD find command is case insensitive.
In the output of the command, directory names are suffixed with the
slash character (/) to distinguish them from filenames.
You use the --type flag to find all the files of a particular type
(specified as type). For example, you can search for control files by
specifying type as CONTROLFILE. The type values are listed in the
type column of the V$ASM_FILE view.</optDescription>
</command>
<command cmdName="ls" visible="true" wildcard="true" priv="sysdba">
<synopsis>ls [-lshdtLg] [--time_style <style>] [--absolutepath] [--suppressheader] [--reverse] [--permission] [<pattern>]</synopsis>
<description>Lists the contents of an Oracle ASM directory, the attributes of the
specified file, or the names and attributes of all disk groups from the
V$ASM_DISKGROUP_STAT or V$ASM_DISKGROUP view. The default view is
V$ASM_DISKGROUP_STAT.</description>
<seeAlso/>
<exceptions/>
<example>The following are examples of the ls command that display various
information about directories and the contents of the directories.
ASMCMD [+] > ls +data/orcl/datafile
EXAMPLE.265.691577295
SYSAUX.257.691577149
SYSTEM.256.691577149
UNDOTBS1.258.691577151
USERS.259.691577151
ASMCMD [+] > ls -lt +data/orcl/datafile
Type Redund Striped Time Sys Name
DATAFILE MIRROR COARSE JUL 13 08:00:00 Y EXAMPLE.265.691577295
DATAFILE MIRROR COARSE JUL 13 05:00:00 Y SYSAUX.257.691577149
DATAFILE MIRROR COARSE JUL 13 02:00:00 Y USERS.259.691577151
DATAFILE MIRROR COARSE JUL 13 02:00:00 Y UNDOTBS1.258.691577151
DATAFILE MIRROR COARSE JUL 13 02:00:00 Y SYSTEM.256.691577149
ASMCMD [+] > ls -l --time_style 'MON DD HHAM' +data/orcl/datafile/sy*
Type Redund Striped Time Sys Name
DATAFILE MIRROR COARSE JUL 13 05PM Y SYSAUX.257.691577149
DATAFILE MIRROR COARSE JUL 13 02PM Y SYSTEM.256.691577149
ASMCMD [+] > ls -s +data/orcl/datafile
Block_Size Blocks Bytes Space Name
8192 12801 104865792 214958080 EXAMPLE.265.691577295
8192 88321 723525632 1452277760 SYSAUX.257.691577149
8192 88321 723525632 1452277760 SYSTEM.256.691577149
8192 7681 62922752 131072000 UNDOTBS1.258.691577151
8192 641 5251072 12582912 USERS.259.691577151
ASMCMD [+] > ls -sh +data/orcl/datafile
Block_Size Blocks Bytes Space Name
8K 12801 100M 205M EXAMPLE.265.691577295
8K 88321 690M 1.4G SYSAUX.257.691577149
8K 88321 690M 1.4G SYSTEM.256.691577149
8K 7681 60M 125M UNDOTBS1.258.691577151
8K 641 5M 12M USERS.259.691577151
ASMCMD [+] > ls --permission +data/orcl/datafile
User Group Permission Name
rw-rw-rw- EXAMPLE.265.691577295
rw-rw-rw- SYSAUX.257.691577149
rw-rw-rw- SYSTEM.256.691577149
rw-rw-rw- UNDOTBS1.258.691577151
rw-rw-rw- USERS.259.691577151
</example>
<options>l s h d t L g time_style absolutepath suppressheader reverse permission pattern</options>
<optDescription>
The options for the ls command are described below.
(none) - Displays only filenames and directory names.
-l - Displays extended file information, including
striping and redundancy information and whether the
file was system-generated (indicated by Y under the
SYS column) or user-created (as in the case of an
alias, indicated by N under the SYS column). When
used in the "ls -l +" command, displays directory
information. Note that not all possible file
attributes or disk group attributes are included.
To view the complete set of column values for a file
or a disk group, query the V$ASM_FILE and
V$ASM_DISKGROUP views.
-s - Displays file space information.
-h - With -s, print sizes in human readable format (e.g.
8K, 250M, 2.5G).
-d - If the value for the pattern argument is a directory,
then ls displays information about that directory,
rather than the directory contents. Typically used
with another flag, such as the -l flag.
--reverse - Reverses the sort order of the listing.
-t - Sorts the listing by timestamp (latest first)
instead of by name.
-L - If the value for the name argument is an alias,
then ASMCMD displays information about the file that
it references. Typically used with another flag,
such as the -l flag.
--time_style - Specify the format in which the date will be printed,
using the format models for datetime used in the
Oracle database (e.g. "DD MON YYYY").
--absolutepath - For each listed file, displays the absolute path of
the alias that references it, if any.
-g - Selects from GV$ASM_DISKGROUP_STAT, or from
GV$ASM_DISKGROUP if the -c flag is also specified.
GV$ASM_DISKGOUP.INST_ID is included in the output.
--suppressheader - Suppresses column headings.
--permission - Shows the permissions of a file
(V$ASM_FILE.permission, V$ASM_FILE.owner,
V$ASM_FILE.usergroup, V$ASM_ALIAS.name).
pattern - Name of a file, directory, or pattern.
Command options enable you to modify and customize the output of
the command. For disk group information, this command queries the
V$ASM_DISKGROUP_STAT view by default, which can be modified by
using the -g option.
If you specify all of the options, then the command shows a union
of their attributes, with duplicates removed.
If you enter ls -l +, then the command returns information about all
disk groups, including information about whether the disk groups
are mounted.
If pattern is a directory name, then ls lists the contents of the
directory and depending on flag settings, ls also lists information
about each directory member. Directories are listed with a trailing
slash (/) to distinguish them from files.
If the value that you enter for pattern is a filename, then ls lists
the file and depending on the flag settings, ls also lists
information about the file. The file must be located in the current
directory if the filename is specified with a relative path.</optDescription>
</command>
<command cmdName="lsof" visible="true">
<synopsis>lsof [--suppressheader] [-G <diskgroup>] [--dbname <db>] [-C <instance>]</synopsis>
<description>Lists the open files of the local clients.</description>
<seeAlso/>
<exceptions/>
<example>The following are examples of the lsof command. The first example
lists the open files for the data disk group. The second example lists
the open files for the Oracle ASM instance.
ASMCMD [+] > lsof -G data
DB_Name Instance_Name Path
orcl orcl +data/orcl/controlfile/current.260.691577263
orcl orcl +data/orcl/datafile/example.265.691577295
orcl orcl +data/orcl/datafile/sysaux.257.691577149
orcl orcl +data/orcl/datafile/system.256.691577149
orcl orcl +data/orcl/datafile/undotbs1.258.691577151
orcl orcl +data/orcl/datafile/users.259.691577151
orcl orcl +data/orcl/onlinelog/group_1.261.691577267
orcl orcl +data/orcl/onlinelog/group_2.262.691577271
orcl orcl +data/orcl/onlinelog/group_3.263.691577275
orcl orcl +data/orcl/tempfile/temp.264.691577287
ASMCMD [+] > lsof -C +ASM
DB_Name Instance_Name Path
asmvol +ASM +data/VOLUME1.271.679226013
asmvol +ASM +data/VOLUME2.272.679227351
</example>
<options>suppressheader G dbname C</options>
<optDescription>
The options for the lsof command are described below.
--suppressheader - Suppresses column headings.
-G diskgroup - List files only from the specified disk group.
--dbname db - List files only from the specified database.
-C instance - List files only from the specified instance.
</optDescription>
</command>
<command cmdName="mkalias" visible="true">
<synopsis>mkalias <file> <alias></synopsis>
<description>Creates an alias for the specified system-generated filename.</description>
<seeAlso/>
<exceptions/>
<example>The following example creates the sysaux.f alias for the fully
qualified filename +data/orcl/DATAFILE/SYSAUX.257.691577149. Following
the mkalias command, ls --absolutepath is run to check the results.
ASMCMD [+data/orcl/datafile] > mkalias SYSAUX.257.691577149 sysaux.f
ASMCMD [+data/orcl/datafile] > ls --absolutepath
none => EXAMPLE.265.691577295
none => SYSTEM.256.691577149
none => UNDOTBS1.258.691577151
none => USERS.259.691577151
+DATA/ORCL/DATAFILE/sysaux.f => SYSAUX.257.691577149
sysaux.f
</example>
<options>file</options>
<optDescription>
The options for the mkalias command are described below.
<file> - System-generated file name.
<alias> - Alias for the file name.
alias must be in the same disk group as the system-generated file.
Only one alias is permitted for each Oracle ASM file.</optDescription>
</command>
<command cmdName="mkdir" visible="true" priv="sysdba">
<synopsis>mkdir <directories...></synopsis>
<description>Creates Oracle ASM directories under the current directory.</description>
<seeAlso/>
<exceptions/>
<example>The following is an example of the mkdir command.
The example creates the directories subdir1 and subdir2 at the disk
group level in the disk group data.
ASMCMD [+data] > mkdir subdir1 subdir2
ASMCMD [+data] > ls
ASM/
ORCL/
subdir1/
subdir2/
</example>
<options></options>
<optDescription>
The option for the mkdir command is described below.
directories - List of directory names that you want to create, separated by space.
The current directory can be created by the system or by the user.
You cannot create a directory at the root (+) level.</optDescription>
</command>
<command cmdName="pwd" wildcard="true" visible="true" priv="sysdba">
<synopsis>pwd</synopsis>
<description>Displays the absolute path of the current directory.</description>
<seeAlso/>
<exceptions/>
<example>The following is an example of the pwd command.
The example displays the current directory.
ASMCMD [+data/orcl/datafile] > pwd
+data/orcl/datafile
</example>
<options/>
<optDescription/>
</command>
<command cmdName="rm" visible="true" wildcard="true" priv="sysdba">
<synopsis>rm [-rf] [--target <target>] <names...></synopsis>
<description>Deletes the specified Oracle ASM files and directories.</description>
<seeAlso/>
<exceptions/>
<example>The following are examples of the rm command. The
first example deletes the myexamples.bak file. The second example
removes the subdir2 directory and its contents. The third example
removes the IOS parameter file.
ASMCMD [+data/orcl/datafile] > rm myexamples.bak
ASMCMD [+data] > rm -r subdir2
You may delete multiple files and/or directories.
Are you sure? (y/n) y
ASMCMD [+data] > rm --target IOS IOS/PARAMETERFILE/spfile.264.925756331
</example>
<options>f r target</options>
<optDescription>
The options for the rm command are described below.
-r - Recursively deletes files and subdirectories.
-f - Deletes files and subdirectories without prompting for
confirmation.
--target - Argument for target option could be either ASM, IOS, or
APX, depending which type of instance ASMCMD needs to be
connected to remove the file or files.
name - Names of the file, file path, pattern, or directory you
want to remove, separated by space.
If name is a file or alias, then the rm command can delete the file
or alias only if it is not currently in use. If name is a directory,
then the rm command can delete it only if it is empty (unless the -r
flag is used) and it is not a system-generated directory. If name is
an alias, then the rm command deletes both the alias and the file to
which the alias refers. To delete only an alias and retain the file
that the alias references, use the rmalias command.
Note: When you delete all of the files in a system-created directory,
the directory is removed. If the parent directories are empty, all of
the parent directories are also removed.
name can contain wildcard characters.
If you use a wildcard, the rm command deletes all of the matches
except nonempty directories, unless you use the -r flag. To
recursively delete, use the -r flag. With -r option you can delete
a nonempty directory, including all files and directories in it and
in the entire directory tree underneath it. If you use the -r flag
or a wildcard character, then the rm command prompts you to confirm
the deletion before proceeding, unless you specify the -f flag. If
a wildcard character matches an alias or a system-generated file that
has an alias, then both the alias and the system-generated file that
it references are deleted. When using the -r flag, either the
system-generated file or the alias must be present in the directory
in which you run the rm command.
For example, if you have a user alias, +data/dir1/file.alias
that points to +data/orcl/DATAFILE/System.256.146589651,
then running the rm -r +data/dir1 command removes the
+data/dir1/file.alias and +data/orcl/DATAFILE/System.256.146589651.</optDescription>
</command>
<command cmdName="rmalias" visible="true">
<synopsis>rmalias [-r] <aliases...></synopsis>
<description>Removes the specified aliases, retaining the files that the
aliases reference.</description>
<seeAlso/>
<exceptions/>
<example>The following is an example of the rmalias command.
The example deletes the alias sysaux.f, retaining the data file that
it references.
ASMCMD [+data/orcl/datafile] > rmalias sysaux.f </example>
<options>r</options>
<optDescription> The options for the rmalias command are described below.
-r - Recursively removes aliases.
aliases - List of aliases for the file name or directory, separated by space.
The -r flag enables you to remove all of the aliases in the current
directory and in the entire directory tree beneath the current
directory. If any user-created directories become empty as a result
of deleting aliases, they are also deleted. Files and directories
created by the system are not deleted. </optDescription>
</command>
<command cmdName="chdg" visible="true">
<synopsis>chdg { <config_file.xml> | <'contents_of_xml_file'> }</synopsis>
<description>Changes a disk group (adds disk, drops disk, resizes
disk, or replace disk, user) based on a XML configuration
file.</description>
<seeAlso/>
<exceptions/>
<example>The following example shows the basic structure and valid tags with
their respective attributes for the chdg XML configuration file.
<chdg> update disk clause (add/delete disks/failure groups)
name disk group to change
power power to perform rebalance
wait true specifies wait for rebalance to complete
<add> items to add are placed here
</add>
<drop> items to drop are placed here
</drop>
<fg> failure group
name failure group name
</fg>
<dsk>
name disk name
path disk path
size size of the disk to add
force true specifies force option
</dsk>
<migrate> migration to another appliance configuration on EXADATA
</migrate>
</chdg>
For information about creating a disk group with ASMCMD mkdg see "mkdg"
The following is an example of a XML Configuration file for chdg.
This XML file alters the disk group named data. The failure group fg1
is dropped and the disk data_001 is also dropped. The /dev/disk5 disk
is added to failure group fg2. The rebalance power level is set to 3.
<chdg name="data" power="3">
<drop>
<fg name="fg1"></fg>
<dsk name="data_0001" />
</drop >
<add>
<fg name="fg2">
<dsk string="/dev/disk5"/>
<fg>
</add>
</chdg>
The following is an example of a XML Configuration file to add
disk with force option.
<chdg name="data" power="3">
<fg name="fg1" > </fg >
<add>
<fg name="fg2" >
< dsk name="data_001" force="true" />
</fg>
</add >
</fg>
</chdg >
The following is an example of a XML Configuration file to add
quorum failure group to the existing diskgroup.
<chdg name="data">
<add>
<fg name="fgq2">
<dsk string="/dev/disk6" />
</fg>
</add>
</chdg>
The following is an example of a XML Configuration file to drop
a quorum failure group
<chdg name="data" >
<drop>
<fg name="fgq3" qtype="QUORUM" />
</drop>
</chdg>
The following is an example of a XML Configuration file to add
quorum disks to the existing diskgroup.
<chdg name="data" wait="true">
<add>
<dsk string="/dev/disk7" qtype="QUORUM" />
</add>
</chdg>
The following is an example of a XML Configuration file to drop
quorum disks from existing diskgroup.
<chdg name="data" >
<drop >
<dsk name="data_0001" qtype="QUROUM" />
</drop>
</chdg>
The following is an example of a XML Configuration file to resize
quorum disks.
<chdg name="data" >
<resize>
<dsk name="data_0001" qtype="QUORUM" size="300M" />
</resize >
</chdg>
The following is an example of XML Configuration file to replace
user by name.
<chdg name="data" >
<replace>
<username from="fred" to="frank" />
</replace>
</chdg>
The following is an example of XML Configuration file to replace
disk. Values for power and wait can only be specified for
replace-disk.
<chdg name="data" >
<replace power=5 wait="true" >
<dsk from="data_0001" to="/dev/raw/asmdisk2"/ >
</replace>
</chdg>
The following is an example of XML Configuration file to migrate
the disk group redundancy from its original type to FLEX.
<chdg name="data" redundancy="FLEX" />
The following is an example of XML Configuration file to rename a disk.
<chdg name="data" >
<rename>
<dsk name="data_0001" to="newname" />
</rename>
</chdg>
The following is an example of XML Configuration file to rename the
failgroup of a disk.
<chdg name="data" >
<rename>
<dsk name="data_0001" fg="fg1" />
</rename>
</chdg>
The following is an example of XML Configuration file to rename the
site of a disk.
<chdg name="data" >
<rename>
<dsk name="data_0001" site="site1" />
</rename>
</chdg>
The following is an example of XML Configuration file to migrate one
appliance configuration to another in Exadata.
<chdg name="data" >
<migrate>
<add>
<fg name = "FG_01">
<dsk string="/dev/SG_CEL1" name= "SG_CEL1" />
<dsk string="/dev/SG_CEL2" name= "SG_CEL2" />
</fg>
</add>
</migrate>
</chdg>
The following are examples of the chdg command with configuration file
or configuration information on the command line.
ASMCMD [+] chdg data_config.xml
ASMCMD [+] chdg '<chdg name="data" power="3">
<drop><fg name="fg1"></fg>
<dsk name="data_0001" /></drop>
<add>
<fg name="fg2"><dsk string="/dev/disk5"/></fg>
</add>
</chdg>'
</example>
<options />
<optDescription>
The options for the chdg command are described below:
config_file - Name of the XML file that contains the changes for
the disk group. chdg searches the XML file in the
directory where ASMCMD was started unless a path
is specified.
contents_of_xml_file - The XML script enclosed in single quotations
chdg modifies a disk group based on a XML configuration file. The
modification includes adding or deleting disks from an existing
disk group, and the setting rebalance power level. The power level can
be set 0 to the same values as the same values as the ASM_POWER_LIMIT
initialization parameter settings, see the Oracle Automatic Storage
Management Administrator's Guide.
When adding disks to a disk group, the diskstring must be specified
similar to ASM_DISKSTRING initialization parameter.
The failure groups are optional parameters. The default causes every
disk to belong to its own failure group.
Dropping disks from a disk group can be performed through this
operation. An individual disk can be referenced by its Oracle ASM
disk name. The set of disks that belong to a failure group can be
specified by the failure group name.
You can resize a disk inside a disk group with chdg. The resize
operation fails if there is not enough space for storing data after
the resize</optDescription>
</command>
<command cmdName="chkdg" visible="true">
<synopsis>chkdg [--repair] <diskgroup></synopsis>
<description>Checks or repairs the metadata of a disk group.</description>
<seeAlso/>
<exceptions/>
<example>The following is an example of the chkdg command used to check and
repair the DATA disk group.
ASMCMD [+] > chkdg --repair data</example>
<options>repair</options>
<optDescription> The options for the chkdg command are described below.
--repair - Repairs the disk group.
diskgroup - Name of disk group to check or repair.
chkdg checks the metadata of a disk group for errors and optionally
repairs the errors.</optDescription>
</command>
<command cmdName="dropdg" visible="true">
<synopsis>dropdg [-r [-f]] <diskgroup></synopsis>
<description>Drops a disk group.</description>
<seeAlso/>
<exceptions/>
<example>These are examples of the use of dropdg. The first example forces the
drop of the disk group data, including any data in the disk group.
The second example drops the disk group fra, including any data in
the disk group.
ASMCMD [+] > dropdg -r -f data
ASMCMD [+] > dropdg -r fra </example>
<options>r f</options>
<optDescription>
The options for the dropdg command are described below.
-f - Force the operation. Only applicable if the disk group
cannot be mounted.
-r - Recursive, include contents.
diskgroup - Name of disk group to drop.
dropdg drops an existing disk group. The disk group should not be
mounted on more than one node.</optDescription>
</command>
<command cmdName="iostat" visible="true">
<synopsis>iostat [-et][--io] [--suppressheader] [--region] [-G <diskgroup>] [<interval>]</synopsis>
<description>Displays I/O statistics for Oracle ASM disks in mounted disk groups.</description>
<seeAlso/>
<exceptions/>
<example>The following are examples of the iostat command. The first example
displays disk I/O statistics for the data disk group in total number
of bytes. The second example displays disk I/O statistics for the data
disk group in total number of I/O operations.
ASMCMD [+] > iostat -G data
Group_Name Dsk_Name Reads Writes
DATA DATA_0000 180488192 473707520
DATA DATA_0001 1089585152 469538816
DATA DATA_0002 191648256 489570304
DATA DATA_0003 175724032 424845824
DATA DATA_0004 183421952 781429248
DATA DATA_0005 1102540800 855269888
DATA DATA_0006 171290624 447662592
DATA DATA_0007 172281856 361337344
DATA DATA_0008 173225472 390840320
DATA DATA_0009 288497152 838680576
DATA DATA_0010 196657152 375764480
DATA DATA_0011 436420096 356003840
ASMCMD [+] > iostat --io -G data
Group_Name Dsk_Name Reads Writes
DATA DATA_0000 2801 34918
DATA DATA_0001 58301 35700
DATA DATA_0002 3320 36345
DATA DATA_0003 2816 10629
DATA DATA_0004 2883 34850
DATA DATA_0005 59306 38097
DATA DATA_0006 2151 10129
DATA DATA_0007 2686 10376
DATA DATA_0008 2105 8955
DATA DATA_0009 9121 36713
DATA DATA_0010 3557 8596
DATA DATA_0011 17458 9269 </example>
<options>e t suppressheader io region G</options>
<optDescription>
iostat lists disk group statistics using the V$ASM_DISK_IOSTAT view.
The options for the iostat command are described below.
-e - Displays error statistics (Read_Err, Write_Err).
-G diskgroup - Displays statistics for the disk group name.
--suppressheader - Suppresses column headings.
--io - Displays information in number of I/Os, instead
of bytes.
-t - Displays time statistics (Read_Time, Write_Time).
--region - Displays information for cold and hot disk regions
(Cold_Reads, Cold_Writes, Hot_Reads, Hot_Writes).
interval - Refreshes the statistics display based on the
interval value (seconds).
The attribute descriptions for iostat command output are described
below. To view the complete set of statistics for a disk group,
use the V$ASM_DISK_IOSTAT view.
Group_Name Name of the disk group.
Dsk_Name Name of the disk.
Reads Total number of bytes read from the disk.
If the --io option is entered, then the value
is displayed as number of I/Os.
Writes Total number of bytes written to the disk.
If the --io option is entered, then the value
is displayed as number of I/Os.
Cold_Reads Total number of bytes read from the cold disk
region. If the --io option is entered, then
the value is displayed as number of I/Os.
Writes Total number of bytes written to the disk.
Cold_Writes Total number of bytes written to the cold
disk region. If the --io option is entered,
then the value is displayed as number of I/Os.
Hot_Reads Total number of bytes read from the hot
disk region. If the --io option is entered,
then the value is displayed as number of I/Os.
Writes Total number of bytes written to the disk.
Cold_Writes Total number of bytes written to the cold
Hot_Writes Total number of bytes written to the hot disk
region. If the --io option is entered, then the
value is displayed as number of I/Os.
Read_Err Total number of failed I/O read requests for
the disk.
Write_Err Total number of failed I/O write requests for
the disk.
Read_Time Total I/O time (in seconds) for
read requests for the disk if the
TIMED_STATISTICS initialization parameter is
set to TRUE (0 if set to FALSE).
Write_Time Total I/O time (in seconds) for
write requests for the disk if the
TIMED_STATISTICS initialization parameter is
set to TRUE (0 if set to FALSE).
Writes Total number of bytes written to the disk.
Cold_Writes Total number of bytes written to the cold
Hot_Writes Total number of bytes written to the hot disk
If a refresh interval is not specified, the number displayed represents
the total number of bytes or I/Os. Ifa refresh interval is specified,
then the value displayed (bytes or I/Os) is the difference between the
previous and current values, not the total value.
</optDescription>
</command>
<command cmdName="lsattr" visible="true" wildcard="true">
<synopsis>lsattr [-G <diskgroup> ] [-lm] [--suppressheader] [<pattern>]</synopsis>
<description>Lists the attributes of a disk group.</description>
<seeAlso/>
<exceptions/>
<example>The following are examples of the lsattr command. The first displays
information about all attributes for the DATA disk group. The second
example displays only those attributes with names containing the
string compat for the FRA disk group.
ASMCMD [+] > lsattr -l -G DATA
Name Value
access_control.enabled FALSE
access_control.umask 066
au_size 4194304
cell.smart_scan_capable FALSE
compatible.advm 11.2.0.0.0
compatible.asm 11.2.0.0.0
compatible.rdbms 11.2.0.0.0
disk_repair_time 3.6h
sector_size 512
ASMCMD [+] > lsattr -l -G FRA %compat*
Name Value
compatible.asm 11.2.0.0.0
compatible.rdbms 11.2.0.0.0 </example>
<options>G l m suppressheader</options>
<optDescription>
The options for the lsattr command are described below.
-G diskgroup - Disk group name.
-l - Display names with values.
-m - Displays additional information, such as the RO
and Sys columns.
--suppressheader - Suppresses column headings.
pattern - Display the attributes that contain pattern
expression.
Information about disk group attributes is retrieved from the
V$ASM_ATTRIBUTE view.
The RO (read-only) column identifies those attributes that can only
be set when a disk group is created. The Sys column identifies those
attributes that are system-created.
To display information about the disk group template attributes,
use "lstmpl".</optDescription>
</command>
<command cmdName="lsdg" visible="true">
<synopsis>lsdg [-g][--suppressheader][--discovery][<pattern>]</synopsis>
<description>Lists disk groups and their information. lsdg queries
V$ASM_DISKGROUP_STAT by default. If the --discovery flag is specified,
the V$ASM_DISKGROUP is queried instead. The output also includes
notification of any current rebalance operation for a disk group. If
a disk group is specified, then lsdg returns only information about
that disk group.</description>
<seeAlso/>
<exceptions/>
<example>The following example lists the attributes of the DATA disk group.
ASMCMD [+] > lsdg data
State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB
MOUNTED NORMAL N 512 4096 4194304 12288 8835 1117
Usable_file_MB Offline_disks Voting_files Name
3859 0 N DATA</example>
<options>g suppressheader discovery</options>
<optDescription>
The options for the lsdg command are described below.
(none) - Displays the disk group attributes
--discovery - Selects from V$ASM_DISKGROUP, or from
GV$ASM_DISKGROUP if the -g flag is also specified.
This option is always enabled if the Oracle ASM
instance is version 10.1 or earlier. This flag is
disregarded if lsdg is running in non-connected mode.
-g - Selects from GV$ASM_DISKGROUP_STAT, or from
GV$ASM_DISKGROUP if the -c flag is also specified.
GV$ASM_DISKGOUP.INST_ID is included in the output.
The REBAL column of the GV$ASM_OPERATION view is also
included in the output.
--suppressheader - Suppresses column headings.
pattern - Returns only information about the specified disk
group or disk groups that match the supplied pattern.
The attribute descriptions for lsdg command output are described
below. To view the complete set of attributes for a disk group,
use the V$ASM_DISKGROUP_STAT or V$ASM_DISKGROUP view.
State - State of the disk group. Values include BROKEN,
CONNECTED, DISMOUNTED, MOUNTED, QUIESCING, and UNKNOWN.
Type - Disk group redundancy (NORMAL, HIGH, EXTERN, FLEX).
Rebal - Y if a rebalance operation is in progress.
Sector - Sector size in bytes.
Block - Block size in bytes.
AU - Allocation unit size in bytes.
Total_MB - Size of the disk group in megabytes.
Free_MB - Free space in the disk group in megabytes, without
regard to redundancy. From the V$ASM_DISKGROUP view.
Req_mir_free_MB - Amount of space that must be available in the disk
group to restore full redundancy after the most
severe failure that can be tolerated by the disk
group. This is the REQUIRED_MIRROR_FREE_MB column
from the V$ASM_DISKGROUP view.
Usable_file_MB - Amount of free space, adjusted for mirroring, that
is available for new files. From the
V$ASM_DISKGROUP view.
Offline_disks - Number of offline disks in the disk group.
Offline disks are eventually dropped.
Voting_files - Specifies whether the disk group contains voting
disks (Y or N).
Name - Disk group name.</optDescription>
</command>
<command cmdName="lsdsk" noinstance="undef" visible="true" wildcard="true">
<synopsis>lsdsk [-kptgMI][-G <diskgroup>] [--suppressheader] [ --member|--candidate] [--discovery][--statistics][<pattern>]</synopsis>
<description>List Oracle ASM disks.</description>
<seeAlso/>
<exceptions/>
<example>The following are examples of the lsdsk command. The first and second
examples list information about disks in the DATA disk group. The third
example lists information about candidate disks.
ASMCMD [+] > lsdsk -t -G DATA
Create_Date Mount_Date Repair_Timer Path
13-JUL-09 13-JUL-09 0 /devices/diska1
13-JUL-09 13-JUL-09 0 /devices/diska2
13-JUL-09 13-JUL-09 0 /devices/diska3
13-JUL-09 13-JUL-09 0 /devices/diskb1
13-JUL-09 13-JUL-09 0 /devices/diskb2
13-JUL-09 13-JUL-09 0 /devices/diskb3
13-JUL-09 13-JUL-09 0 /devices/diskc1
13-JUL-09 13-JUL-09 0 /devices/diskc2
...
ASMCMD [+] > lsdsk -p -G DATA /devices/diska*
Group_Num Disk_Num Incarn Mount_Stat Header_Stat Mode_Stat State Path
1 0 2105454210 CACHED MEMBER ONLINE NORMAL /devices/diska1
1 1 2105454199 CACHED MEMBER ONLINE NORMAL /devices/diska2
1 2 2105454205 CACHED MEMBER ONLINE NORMAL /devices/diska3
ASMCMD [+] > lsdsk --candidate -p
Group_Num Disk_Num Incarn Mount_Stat Header_Stat Mode_Stat State Path
0 5 2105454171 CLOSED CANDIDATE ONLINE NORMAL /devices/diske1
0 25 2105454191 CLOSED CANDIDATE ONLINE NORMAL /devices/diske2
0 18 2105454184 CLOSED CANDIDATE ONLINE NORMAL /devices/diske3
0 31 2105454197 CLOSED CANDIDATE ONLINE NORMAL /devices/diskk1
0 21 2105454187 CLOSED CANDIDATE ONLINE NORMAL /devices/diskk2
0 26 2105454192 CLOSED CANDIDATE ONLINE NORMAL /devices/diskk3
0 14 2105454180 CLOSED CANDIDATE ONLINE NORMAL /devices/diskl1
...</example>
<options>k p t g M I G suppressheader member candidate discovery statistics</options>
<optDescription> The options for the lsdsk command are described below.
(none) - Displays the PATH column of the V$ASM_DISK_STAT view.
-k - Displays the TOTAL_MB, FREE_MB, OS_MB, NAME, FAILGROUP,
SITE_NAME, SITE_GUID, SITE_STATUS, LIBRARY, LABEL,
FAILGROUP_LABEL, SITE_LABEL, UDID, PRODUCT, REDUNDANCY, and
PATH columns of the V$ASM_DISK view.
--statistics - Displays the READS, WRITES, READ_ERRS, WRITE_ERRS,
READ_TIME, WRITE_TIME, BYTES_READ, BYTES_WRITTEN, and
the PATH columns of the V$ASM_DISK view.
-p - Displays the GROUP_NUMBER, DISK_NUMBER, INCARNATION,
MOUNT_STATUS, HEADER_STATUS, MODE_STATUS, STATE,
and the PATH columns of the V$ASM_DISK view.
-t - Displays the CREATE_DATE, MOUNT_DATE, REPAIR_TIMER, and
the PATH columns of the V$ASM_DISK view.
-g - Selects from GV$ASM_DISK_STAT, or from GV$ASM_DISK if
the --discovery flag is also specified.
GV$ASM_DISK.INST_ID is included in the output.
--discovery - Selects from V$ASM_DISK, or from GV$ASM_DISK
if the -g flag is also specified. This option is always
enabled if the Oracle ASM instance is version 10.1 or
earlier. This flag is disregarded if lsdsk is running
in non-connected mode.
-I - Scans disk headers for information rather than
extracting the information from an Oracle ASM instance.
This option forces non-connected mode.
-G - Restricts results to only those disks that belong to
the group specified by disk group.
-M - Displays the disks that are visible to some but not
all active instances. These are disks that, if included
in a disk group, will cause the mount of that disk group
to fail on the instances where the disks are not visible.
--suppressheader - Suppresses column headings.
--candidate - Restricts results to only disks having
membership status equal to CANDIDATE.
--member - Restricts results to only disks having membership
status equal to MEMBER.
pattern - Returns only information about the specified disks
that match the supplied pattern.
The lsdsk command can run in connected or non-connected mode.
The connected mode is always attempted first. The -I option
forces non-connected mode.
In connected mode, lsdsk uses the V$ASM_DISK_STAT and V$ASM_DISK
dynamic views to retrieve disk information. The V$ASM_DISK_STAT
view is used by default.
In non-connected mode, lsdsk scans disk headers to retrieve
disk information. Some information is not available in this
mode and some options are not valid combinations with this mode.
The exit status varies depending on the result from executing the
command: if only member disks are listed it's 0, if only candidate
disks are listed it's 1, if both member and candidate disks are
listed it's 2. Otherwise, if no disks are listed the result is 255.
Note: The non-connected mode is not supported on Microsoft Windows.
pattern restricts the output to only disks that match the pattern
specified. Wild-card characters and slashes (/ or \) can be part
of the pattern. pattern should be specified as the last option for
the command.
The -k, -p, -t, and --statistics options modify how much information
is displayed for each disk. If any combination of the options are
specified, then the output shows the union of the attributes
associated with each flag.</optDescription>
</command>
<command cmdName="lsod" visible="true" wildcard="true">
<synopsis>lsod [-G <diskgroup>] [--suppressheader] [--process <process>] [<pattern>]</synopsis>
<description>Lists the open ASM disks.</description>
<seeAlso/>
<exceptions/>
<example>The following are examples of the lsod command. The first example lists
the open devices associated with the DATA disk group and the LGWR
process. The second example lists the open devices associated with
the LGWR process for disks that match the diska pattern.
ASMCMD [+] > lsod -G DATA --process LGWR
Instance Process OSPID Path
1 oracle@dadvmn0652 (LGWR) 26593 /devices/diska1
1 oracle@dadvmn0652 (LGWR) 26593 /devices/diska2
1 oracle@dadvmn0652 (LGWR) 26593 /devices/diska3
1 oracle@dadvmn0652 (LGWR) 26593 /devices/diskb1
1 oracle@dadvmn0652 (LGWR) 26593 /devices/diskb2
1 oracle@dadvmn0652 (LGWR) 26593 /devices/diskb3
1 oracle@dadvmn0652 (LGWR) 26593 /devices/diskd1
ASMCMD [+] > lsod --process LGWR diska
Instance Process OSPID Path
1 oracle@dadvmn0652 (LGWR) 26593 /devices/diska1
1 oracle@dadvmn0652 (LGWR) 26593 /devices/diska2
1 oracle@dadvmn0652 (LGWR) 26593 /devices/diska3 </example>
<options>G suppressheader</options>
<optDescription>The options for the lsod command are described below.
-G diskgroup - Specifies the disk group that contains the
open disks.
--suppressheader - Suppresses column header information from
the output.
--process - Specifies a pattern to filter the list of
processes.
pattern - Specifies a pattern to filter the list of
disks.
The rebalance operation opens a disk both globally and
locally so the same disk may be listed twice in the output for
the rebalance process.</optDescription>
</command>
<command cmdName="md_backup" visible="true">
<synopsis>md_backup <backup_file> [--acfs_sec_encr] [-G <diskgroups,...>]</synopsis>
<description>The md_backup command creates a backup file containing metadata
for one or more disk groups.
Volume and Oracle Automatic Storage Management Cluster File System
(Oracle ACFS) file system information is also backed up.</description>
<seeAlso/>
<exceptions/>
<example>The first example shows the use of the backup command when run
without the disk group option. This example backs up all of the mounted
disk groups and creates the backup image in the
/scratch/backup/alldgs20100422 file. The second example creates a
backup of DATA disk group. The backup that this example creates is
saved in the /scratch/backup/data20100422 file. The third example
creates a full disk group backup. This example backs up all of the
mounted disk groups, volumes and file system that are visible on
the current node and created the backup image in the given path.
The forth example creates a full backup of disk group, volume and
file system including file system security, encryption and audit
attributes. The fifth example creates a backup of DATA disk group.
This example starts DATA disk group backup and detects a volume
with DRL (Disk group Recovery Log) and it adds DATADRL disk group
to backup.
ASMCMD [+] > md_backup /scratch/backup/alldgs20100422
Disk group metadata to be backed up: DATA
Disk group metadata to be backed up: FRA
Current alias directory path: ORCL/ONLINELOG
Current alias directory path: ORCL/PARAMETERFILE
Current alias directory path: ORCL
Current alias directory path: ASM
Current alias directory path: ASM/ASMPARAMETERFILE
Current alias directory path: ORCL/DATAFILE
Current alias directory path: ORCL/TEMPFILE
Current alias directory path: ORCL/CONTROLFILE
Current alias directory path: ORCL/ARCHIVELOG/2009_07_13
Current alias directory path: ORCL/BACKUPSET/2009_07_14
Current alias directory path: ORCL/ARCHIVELOG/2009_07_14
Current alias directory path: ORCL
Current alias directory path: ORCL/DATAFILE
Current alias directory path: ORCL/ARCHIVELOG
Current alias directory path: ORCL/BACKUPSET
Current alias directory path: ORCL/ONLINELOG
ASMCMD [+] > md_backup /scratch/backup/data20100422 -G DATA
Disk group metadata to be backed up: DATA
Current alias directory path: ASM/ASMPARAMETERFILE
Current alias directory path: ORCL/DATAFILE
Current alias directory path: ORCL/TEMPFILE
Current alias directory path: ORCL/CONTROLFILE
Current alias directory path: ORCL/PARAMETERFILE
Current alias directory path: ASM
Current alias directory path: ORCL
Current alias directory path: ORCL/CONTROLFILE
Current alias directory path: ORCL/DATAFILE
Current alias directory path: ORCL/ARCHIVELOG
Current alias directory path: ORCL/BACKUPSET
Current alias directory path: ORCL/ONLINELOG
ASMCMD [+] > md_backup /scratch/backup/data20100422
Disk group metadata to be backed up: DATA
ADVM metadata to be backed up: VOL1
ADVM metadata to be backed up: VOL2
ADVM metadata to be backed up: VOL3
ACFS metadata to be backed up:/mountfs/fs1
ACFS metadata to be backed up:/mountfs/fs2
ACFS metadata to be backed up:/mountfs/fs3
ASMCMD [+] > md_backup /scratch/backup/data20100422 --acfs_sec_encr
Disk group metadata to be backed up: DATA
ADVM metadata to be backed up: VOL1
ADVM metadata to be backed up: VOL2
ADVM metadata to be backed up: VOL3
ACFS metadata to be backed up:/mountfs/fs1
ACFS metadata to be backed up:/mountfs/fs2
ACFS metadata to be backed up:/mountfs/fs3
ASMCMD [+] > md_backup /scratch/backup/data20100422 -G DATA
Disk group metadata to be backed up: DATA
ADVM metadata to be backed up: VOL1
ADVM metadata to be backed up: VOL2
ADVM metadata to be backed up: VOL3
ACFS metadata to be backed up:/mountfs/fs1
ACFS metadata to be backed up:/mountfs/fs2
ACFS metadata to be backed up:/mountfs/fs3
Disk group metadata to be backed up: DATADRL
ADVM metadata to be backed up: DRLVOL3
ADVM metadata to be backed up: VOL5
ACFS metadata to be backed up:/mountfs/fs4
ACFS metadata to be backed up:/mountfs/fs5</example>
<options>G acfs_sec_encr</options>
<optDescription>
The options for the md_backup command are described below.
backup_file - Specifies the backup file in which you want to
store the metadata.
--acfs_sec_encr - Specifies that security, encryption, and/or
audit information from ACFS will be backed up.
-G diskgroup - Specifies the disk group name of the disk group
that must be backed up
By default all the mounted disk groups are included in the backup file,
which is saved in the current working directory.</optDescription>
</command>
<command cmdName="md_restore" visible="true">
<synopsis>md_restore <backup_file> [--silent][--full|--nodg|--newdg -o <old_diskgroup:new_diskgroup,...>] [--acfs_sec_encr <user:group> [--acfs_audit <user:mgr_group:auditor_group>]] [-S <sql_script_file>] [-G <diskgroups,...>]</synopsis>
<description>This command restores a disk group and ACFS metadata from backup.</description>
<seeAlso/>
<exceptions/>
<example>The first example restores the disk group DATA from the backup script
and creates a copy. The second example takes an existing disk group
DATA and restores its metadata. The third example restores disk group
DATA completely but the new disk group that is created is called DATA2.
The fourth example performs a full restore and inializes security with
the user johndoe and group dba. For this case audit is not restored.
The fifth example performs a full restore initializing security with
the user johndoe and group dba and initializing audit with manager
group sys and auditors group dba, user janedoe is used for restoring
backup audit settings.
The sixth example restores from the backup file after applying the
overrides defined in the override.sql script file
ASMCMD [+] > md_restore --full -G data --silent /tmp/dgbackup20090714
ASMCMD [+] > md_restore --nodg -G data --silent /tmp/dgbackup20090714
ASMCMD [+] > md_restore --newdg -o 'data:data2' --silent
/tmp/dgbackup20090714
ASMCMD [+] > md_restore --acfs_sec_encr johndoe:dba /tmp/dgbackup20090714
ASMCMD [+] > md_restore --acfs_sec_encr johndoe:dba -acfs_audit janedoe:sys:dba /tmp/dgbackup20090714
ASMCMD [+] > md_restore -S override.sql --silent /tmp/dgbackup20090714
</example>
<options>silent full nodg newdg o acfs_sec_encr acfs_audit S G </options>
<optDescription>
The options for the md_restore command are described below.
backup_file - Reads the metadata information from
backup_file.
--silent - Ignore errors. Normally, if md_restore
encounters an error, it will stop.
Specifying this flag ignores any errors.
--full - Specifies to create a disk group and restore
metadata.
--nodg - Specifies to restore metadata only.
--newdg -o old_diskgroup:new_diskgroup - Specifies a comma separated list
of old diskgroup name and new diskgroup names to create a disk
group with a different name when restoring
metadata. The -o option is required
with --newdg.
--acfs_sec_encr user:group
- Restore security and/or encryption.
The colon separated user and group
will be used for security restoration.
During restore, security and/or
encryption need to be initialized.
If security and/or encryption is not
pre-initialized, the colon separated values
passed to the acfs_sec_encr option will
be used to initialize security.
Encryption will be initialized with SSO wallet.
--acfs_audit user:mgr_group:auditor_group
- Requires acfs_sec_encr. Restores audit
information on an ACFS file system.
The colon separated values will be used
to initialize and execute audit commands.
During restore, audit needs to be initialized.
If audit is not pre-initialized, the audit
layer will be initialized using the colon
separated values given to the acfs_audit
option.
-S sql_script_file - Write SQL commands to the specified SQL
script file instead of executing the commands.
-G diskgroups - Comma separated list of disk groups to be restored.
If no disk groups are defined, then all
disk groups will be restored. </optDescription>
</command>
<command cmdName="mkdg" visible="true">
<synopsis>mkdg { <config_file.xml> | <'contents_of_xml_file'> }</synopsis>
<description>Creates a disk group based on a XML configuration file.</description>
<seeAlso/>
<exceptions/>
<example>
The following example shows the basic structure and the valid tags with
their respective attributes for the mkdg XML configuration file.
<dg>disk group
name disk group name
redundancy normal, external, high
<fg>failure group
name failure group name
</fg>
<dsk>disk
name disk name
path disk path
size size of the disk to add
force true specifies the force option
</dsk>
<a>attribute
name attribute name
value attribute value
</a>
</dg>
The following is an example of a XML configuration file for mkdg.
The configuration creates a disk group named data with normal
redundancy. Two failure groups, fg1 and fg2 are created, each with
two disks identified by associated disk strings. The disk group
compatibility attributes are all set to 11.2
<dg name="data" redundancy="normal">
<fg name="fg1">
<dsk string="/dev/disk1"/>
<dsk string="/dev/disk2"/>
</fg>
<fg name="fg2">
<dsk string="/dev/disk3"/>
<dsk string="/dev/disk4"/>
</fg>
<a name="compatible.asm" value="11.2" />
<a name="compatible.rdbms" value="11.2" />
<a name="compatible.advm" value="11.2" />
</dg>
The following is an example of a XML configuration file for mkdg
using the force option.
<dg name="data" redundancy="normal" >
<fg name="fg1" >
<dsk string = "/dev/disk1" force="true" / >
</fg >
<a name="compatible.asm" value="11.2" />
<a name="compatible.rdbms" value="11.2" />
<a name="compatible.advm" value="11.2" />
</dg >
Failure group or disk specifications can be qualified by
{QUORUM | REGULAR} type.
REGULAR disks or disk in non-quorum failure groups, can contain
any files.
QURORUM disks, or disks in quorum failure groups cannot contain any
database files, the Oracle Cluster Registry(OCR), or dynamic volumes.
However, quorum disks can contain the voting file for Cluster
Synchronization Service (CSS). Oracle ASM uses quorum disks or disks
in quorum failure groups for voting files whenever possible.
Disks in quorum failure groups are not considered when determining
redundancy requirements. If no {QUORUM|REGULAR} specified, then
REGULAR is assumed.
The following are examples of the mkdg command. The first example
executes mkdg with a XML Configuration file in the directory where
ASMCMD was started. The second example executes mkdg using information
on the command line.
ASMCMD[+]>mkdg data_config.xml
ASMCMD[+]>mkdg '<dg name="data"><dsk path="/dev/disk*"/></dg>'
The following XML can be used to create a quorum failure group:
<dg name="DATA">
<fg name="fg1" >
<dsk string="/dev/disk0" />
</fg>
<fg name="fg2" >
<dsk string="/dev/disk1" />
</fg>
<fg name="fg3" qtype="QUORUM" >
<dsk string="/dev/disk3" />
</fg>
<a name="compatible.asm" value="11.2.0.0.0" />
</dg>
The following XML can be used to create quorum disks.
<dg name="DATA" >
<dsk string="/dev/disk0" />
<dsk string="/dev/disk1" />
<dsk string="/dev/disk2" quorum="QUORUM" />
<a name="compatible.asm" value="11.2.0.0.0" />
</dg>
</example>
<options></options>
<optDescription> The options for the mkdg command are described below.
config_file - Name of the XML file that contains the
configuration for the new disk group. mkdg
searches for the XML file in the directory
where ASMCMD was started unless a path is
specified.
contents_of_xml_file - The XML script enclosed in single quotations.
mkdg creates a new disk group with a XML configuration file that
specifies the name of the disk group, redundancy, attributes, and paths
of the disks that form the disk group. Redundancy is an optional
parameter; the default is normal redundancy. For some types of
redundancy, disks are required to be gathered into failure groups.
In the case that failure groups are not specified, every disk will
be in its own failure group.
It is possible to set some of the disk group attribute values during
disk group creation. Some attributes, such as AU_SIZE and SECTOR_SIZE,
can be set only during disk group creation.
The default disk group compatibility settings are 10.1 for Oracle ASM
compatibility, 10.1 for database compatibility, and no value for
Oracle ADVM compatibility.</optDescription>
</command>
<command cmdName="mount" visible="true">
<synopsis>mount [--restrict] [-f] { -a | <diskgroups,...> }</synopsis>
<description>Mounts a disk group.</description>
<seeAlso/>
<exceptions/>
<example>The following are examples of the mount command showing the use of
the -force, -restrict, and -a options.
ASMCMD [+] > mount -f data
ASMCMD [+] > mount --restrict data
ASMCMD [+] > mount -a</example>
<options>restrict a f </options>
<optDescription>
The options for the mount command are described below.
diskgroups - Comma separated list of the disk groups.
-a - Mounts all disk groups.
--restrict - Mounts in restricted mode.
-f - Forces the mount operation.
This operation mounts one or more disk groups. A disk group
can be mounted with or without force or restricted options.</optDescription>
</command>
<command cmdName="offline" visible="true">
<synopsis>offline -G <diskgroup> [-q] {-F <failgroup> |-D <disk>} [-t {<minutes> | <hours> }]</synopsis>
<description>Offline disks or failure groups that belong to a disk group.</description>
<seeAlso/>
<exceptions/>
<example>The following are examples of the offline command. The first example
offlines the failgroup1 failure group of the DATA disk group. The
second example offlines the data_0001 disk of the DATA disk group with
a time of 1.5 hours before the disk is dropped.
ASMCMD [+] > offline -G DATA -F FAILGROUP1
ASMCMD [+] > offline -G DATA -D data_0001 -t 1.5h</example>
<options>G F D t</options>
<optDescription>
The options for the offline command are described below.
-G diskgroup - Disk group name.
-q - to qualify failgroup/disk as quorum.
-F failgroup - Failure group name.
-D disk - Specifies a single disk name.
-t - minutes | hours
Specifies the time before the specified disk is dropped as mm or hh,
where m specifies minutes and h specifies hours. The default unit
is hours.
When a failure group is specified, this implies all the disks that
belong to it should be offlined.</optDescription>
</command>
<command cmdName="online" visible="true">
<synopsis>online -G <diskgroup> [-q] { -a | -F <failgroup> | -D <disk> } [--power <power>] [-w]</synopsis>
<description>Online all disks, a single disk, or a failure group that belongs
to a disk group.</description>
<seeAlso/>
<exceptions/>
<example>The following are examples of the online command. The first example
onlines all disks in the failgroup1 failure group of the DATA disk
group with the wait option enabled. The second example onlines the
data_0001 disk in the DATA disk group. The third example onlies the
data_0001 disk in the DATA disk group with power value mentioned.
ASMCMD [+] > online -G DATA -F failgroup1 -w
ASMCMD [+] > online -G DATA -D data_0001 ASMCMD [+] > online -G DATA -D data_0001 --power 3
</example>
<options>a G F D w</options>
<optDescription>
The options for the online command are described below.
-a - Online all offline disks in the disk group.
-G diskgroup - Disk group name.
-q - To qualify the failgroup/disk as quorum.
-F failgroup - Failure group name. When a failure group is
specified, this implies all the disks that belong
to it should be onlined.
-D disk - Disk name.
--power power - The power level can be set to the same values as the
ASM_POWER_LIMIT initialization parameter. For
information about the ASM_POWER initialization
parameter settings, see the Oracle Automatic Storage
Management Administrator's Guide.
The power level can be set from 0 to 1024. A value
of 0 disables rebalancing. If the rebalance power
is not specified, the value defaults to the setting
of the ASM_POWER_LIMIT initialization parameter.
You can determine if a rebalance operation is
occuring with the ASMCMD lsop command.
-w - Wait option. Causes ASMCMD to wait for the
disk group to be rebalanced before returning
control to the user. The default is not waiting. </optDescription>
</command>
<command cmdName="rebal" visible="true">
<synopsis>rebal [--default | --modify <power>] [ --with <phases,...> | --without <phases,...>] [--power <power>] [-w] <diskgroup></synopsis>
<description>Rebalances a disk group.</description>
<seeAlso>lsop</seeAlso>
<exceptions/>
<example>The first example rebalances the FRA disk group with a power level
set to 4, performing only the balance and compact phases. The second
example only modifies the rebalance power to be 1, it does not restart
the rebalance operation.
ASMCMD [+] > rebal --with balance,compact --power 4 FRA
ASMCMD [+] > lsop
Group_Name Operation State Power
FRA REBAL RUN 4
ASMCMD [+] > rebal --modify 1 DATA</example>
<options>default modify with without power w</options>
<optDescription>
The options for the rebal command are described below.
diskgroup - Disk group name.
--default - Modifies the rebalance power to the default, which
is the value of the ASM_POWER_LIMIT initialization
parameter. This option does not re-start the
rebalance operation, unlike power.
--modify - Modifies the rebalance power without re-starting the
rebalance operation. Accepted values are the same as
ASM_POWER_LIMIT, which goes from 0 to 1024. A value
of 0 disables rebalancing.
--with - Runs rebalance only on the listed phases. Available
phases are 'prepare', 'balance' and 'compact',
separated by a single comma. If this option is used,
at least one phase should be specified.
--without - Do not run rebalance on the listed phases. Available
phases are 'prepare', 'balance' and 'compact',
separated by a single comma. If this option is used,
at least one phase should be specified.
--power power - The power level can be set to the same values as the
ASM_POWER_LIMIT initialization parameter. For
information about the ASM_POWER_LIMIT initialization
parameter settings, see the Oracle Automatic Storage
Management Administrator's Guide.
The power level can be set from 0 to 1024. A value
of 0 disables rebalancing. If the rebalance power
is not specified, the value defaults to the setting
of the ASM_POWER_LIMIT initialization parameter.
You can determine if a rebalance operation is
occurring with the ASMCMD lsop command.
-w - Wait option. Causes ASMCMD to wait for the
disk group to be rebalanced before returning
control to the user. The default is not waiting.
</optDescription>
</command>
<command cmdName="remap" visible="true">
<synopsis>remap <diskgroup> <disk> <block_range></synopsis>
<description>Marks a range of blocks as unusable on the disk and relocates any
data allocated in that range.</description>
<seeAlso/>
<exceptions/>
<example>The first example remaps blocks 5000 through 5999 for disk DATA_0001
in disk group DATA. The second example remaps blocks 6230 through 6339
for disk FRA_0002 in disk group FRA
ASMCMD [+] > remap DATA DATA_0001 5000-5999
ASMCMD [+] > remap FRA FRA_0002 6230-6339</example>
<options></options>
<optDescription>The options for the remap command are described below.
diskgroup - Disk group name in which a disk must have
data relocated.
disk - Name of the disk that must have data relocated.
The name must match the NAME column in the
V$ASM_DISK view.
block_range - Range of physical blocks to relocate in the format
start_range_number-end_range_number.
The remap command only relocates blocks. It does not correct or
repair blocks that contain corrupted contents.
The command uses a physical block size based on the SECTOR_SIZE
disk group attribute.</optDescription>
</command>
<command cmdName="setattr" visible="true">
<synopsis>setattr -G <diskgroup> <attribute_name> <attribute_value></synopsis>
<description>Sets the attributes for an Oracle ASM disk group.</description>
<seeAlso/>
<exceptions/>
<example>The following are examples of the setattr command. The first example
sets the disk group attribute COMPATIBLE.ASM to 11.2 for the DATA disk
group. The second example sets the disk group attribute
COMPATIBLE.RDBMS to 11.2 for the DATA disk group.
ASMCMD [+] > setattr -G DATA compatible.asm 11.2.0.0.0
ASMCMD [+] > setattr -G DATA compatible.rdbms 11.2.0.0.0</example>
<options>G</options>
<optDescription>
The options for the setattr command are described below.
-G diskgroup - Disk group name.
attribute_name - Name of the attribute.
attribute_value - Value of the attribute.</optDescription>
</command>
<command cmdName="umount" visible="true">
<synopsis>umount [-f] { -a | <diskgroups,...> }</synopsis>
<description>Dismounts a disk group.</description>
<seeAlso/>
<exceptions/>
<example>The following are examples of the umount command. The first example
dismounts all disk groups mounted on the Oracle ASM instance. The
second example forces the dismount of the DATA disk group.
ASMCMD [+] > umount -a
ASMCMD [+] > umount -f DATA</example>
<options>a f</options>
<optDescription>
The options for the umount command are described below.
diskgroup - Name of the disk group.
-a - Dismounts all mounted disk groups. These disk
groups are listed in the output of the
V$ASM_DISKGROUP view.
-f - Forces the dismount operation.</optDescription>
</command>
<command cmdName="chtmpl" visible="true">
<synopsis>chtmpl -G <diskgroup> { [--striping {coarse|fine}] [--redundancy {high|mirror|unprotected} ] [--primary {hot|cold}] [--secondary {hot|cold}]} <template></synopsis>
<description>Changes the attributes of a template.</description>
<seeAlso/>
<exceptions/>
<example>The following is an example of the chtmpl command that updates the
mytemplate template of the DATA disk group. The redundancy attribute is
set to high and the striping attribute is set to fine.
ASMCMD [+]>chtmpl -G DATA --redundancy high --striping fine mytemplate
</example>
<options>G striping redundancy primary secondary</options>
<optDescription>
The options for the chtmpl command are described below.
-G diskgroup - Name of the disk group.
template - Name of the template to change.
--striping {coarse | fine} - Striping specification, either
coarse or fine.
--redundancy { high | mirror | unprotected} - Redundancy specification,
either high, mirror, or unprotected.
--primary { hot | cold } - Intelligent Data Placement
specification for primary extents,
either hot or cold region.
--secondary { hot | cold } - Intelligent Data Placement
specification for secondary extents,
either hot or cold region.
At least one of these options is required: --striping, --redundancy,
--primary, --secondary.
</optDescription>
</command>
<command cmdName="lstmpl" visible="true" wildcard="true">
<synopsis>lstmpl [-l] [--suppressheader] [-G <diskgroup>] [<pattern>]</synopsis>
<description>Lists templates for the specified disk group or all the
templates if no disk group specified.</description>
<seeAlso/>
<exceptions/>
<example>The following is an example of the lstmpl command. The example lists
all details of the templates in the DATA disk group.
ASMCMD [+] > lstmpl -l -G DATA
Group_Name Group_Num Name Stripe Sys Redund PriReg MirrReg
DATA 1 ARCHIVELOG COARSE Y MIRROR COLD COLD
DATA 1 ASMPARAMETERFILE COARSE Y MIRROR COLD COLD
DATA 1 AUTOBACKUP COARSE Y MIRROR COLD COLD
DATA 1 BACKUPSET COARSE Y MIRROR COLD COLD
DATA 1 CHANGETRACKING COARSE Y MIRROR COLD COLD
DATA 1 CONTROLFILE FINE Y HIGH COLD COLD
DATA 1 DATAFILE COARSE Y MIRROR COLD COLD
DATA 1 DATAGUARDCONFIG COARSE Y MIRROR COLD COLD
DATA 1 DUMPSET COARSE Y MIRROR COLD COLD
DATA 1 FLASHBACK COARSE Y MIRROR COLD COLD
DATA 1 FLASHFILE COARSE Y MIRROR COLD COLD
DATA 1 MYTEMPLATE FINE N HIGH COLD COLD
DATA 1 OCRFILE COARSE Y MIRROR COLD COLD
DATA 1 ONLINELOG COARSE Y MIRROR COLD COLD
DATA 1 PARAMETERFILE COARSE Y MIRROR COLD COLD
DATA 1 TEMPFILE COARSE Y MIRROR COLD COLD
DATA 1 XTRANSPORT COARSE Y MIRROR COLD COLD</example>
<options>G suppressheader l</options>
<optDescription>
The options for the lstmpl command are described below.
-G diskgroup - Specifies disk group name.
--suppressheader - Suppresses column headings.
-l - Displays all details.
pattern - Displays the templates that match pattern expression</optDescription>
</command>
<command cmdName="mktmpl" visible="true">
<synopsis>mktmpl -G <diskgroup> [--striping {coarse|fine}][--redundancy {high|mirror|unprotected} ] [--primary {hot|cold}][--secondary {hot|cold}] <template></synopsis>
<description>Adds a template to a disk group.</description>
<seeAlso/>
<exceptions/>
<example>The following is an example of the mktmpl command that add the
mytemplate template to the DATA disk group. The new template has the
redundancy set to mirror and the striping set to coarse.
ASMCMD [+]>mktmpl -G DATA --redundancy mirror --striping coarse mytemplate </example>
<options>G striping redundancy primary secondary</options>
<optDescription>
The options for the mktmpl command are described below.
-G diskgroup - Name of the disk group.
template - Name of the template to create.
--striping - Striping specification, either coarse or fine.
{coarse|fine}
--redundancy - Redundancy specification {high|mirror|unprotected}.
--primary - Intelligent Data Placement specification for primary
extents {hot|cold} region.
--secondary - Intelligent Data Placement specification for
secondary extents {hot|cold} region.
</optDescription>
</command>
<command cmdName="rmtmpl" visible="true">
<synopsis>rmtmpl -G <diskgroup> <template></synopsis>
<description>Removes a template from a disk group.</description>
<seeAlso/>
<exceptions/>
<example>The following is an example of the rmtmpl command that removes the
mytemplate template from the DATA disk group.
ASMCMD [+]>rmtmpl -G DATA mytemplate
</example>
<options>G</options>
<optDescription>
The options for the rmtmpl command are described below.
-G diskgroup - Name of the disk group.
template - Name of the template to delete.</optDescription>
</command>
<command cmdName="chgrp" visible="true">
<synopsis>chgrp <usergroup> <files...></synopsis>
<description>Changes the user group of a file or list of files.</description>
<seeAlso/>
<exceptions/>
<example>The following are examples of the chgrp command that change the Oracle
ASM user group of the specified files.
ASMCMD [+] > chgrp asm_data +data/orcl/controlfile/Current.260.684924747
ASMCMD [+fra/orcl/archivelog/flashback] > chgrp asm_fra log_7.264.684968167 log_8.265.684972027</example>
<options/>
<optDescription>
The options for the chgrp command are described below.
usergroup - Name of the user group.
files - List of one or more files. At least one filename should be specified.
Only the file owner or the Oracle ASM administrator can use this
command. If the user is the file owner, then the user must also be
either the owner or a member of the group for this command to succeed.
This command accepts a file name or multiple file names separated
by spaces.</optDescription>
</command>
<command cmdName="chmod" visible="true" wildcard="true">
<synopsis>chmod [-R] [--filter <regex>] <mode> <files...></synopsis>
<description>Changes permissions of a file or list of files.</description>
<seeAlso>ls</seeAlso>
<exceptions/>
<example>The following are examples of the chmod command that change the
permissions of the specified files.
ASMCMD [+fra/orcl/archivelog/flashback]>chmod ug+rw
log_7.264.684968167 log_8.265.684972027
ASMCMD [+fra/orcl/archivelog/flashback]>chmod 640
log_7.264.684968167 log_8.265.684972027
ASMCMD [+fra/orcl/archivelog/flashback]>chmod 640 log_*
ASMCMD [+fra/orcl/archivelog/flashback]>chmod 640 --filter 'log_[78]' *
ASMCMD [+fra/orcl/archivelog]>chmod 640
-R --filter 'flash.*/log_[78]\.\d+\.\d+$' *
ASMCMD [+]>ls --permission +fra/orcl/archivelog/flashback
User Group Permission Name
grid asm_fra rw-r----- log_7.264.684968167
grid asm_fra rw-r----- log_8.265.684972027</example>
<options>R filter</options>
<optDescription>
The options for the chmod command are described below.
-R - Recursively changes the permissions of files.
--filter - Apply command only on files that match a regular expression
(regular expression in Perl syntax)
mode can be one of the following forms:
{ ugo | ug | uo | go | u | g | o | a } {+|-} {r|w|rw}
a specifies permissions for all users
u specifies permissions for the owner of the file
g specifies the group permissions
o specifies permissions for other users.
{0|4|6} {0|4|6} {0|4|6}
The first digit specifies owner permissions, the second digit
specifies group permissions, and the third digit specifies other
permissions.
6 - Read write permissions
4 - Read only permissions
0 - No permissions
u - Owner permissions, used with r or w
g - Group permissions, used with r or w
o - Other user permissions, used with r or w
a - All user permissions, used with r or w
+ - Add a permission, used with r or w
- - Removes a permission, used with r or w
r - Read permission
w - Write permission
files - List of one or more files. Atleast one filename should be
specified.
This command accepts a file name or multiple file names separated
by spaces. The specified files must not be open to any instance,
process or program.
You can only set file permissions to read-write, read-only, and no
permissions. You cannot set file permissions to write-only.
To view the permissions on a file, use the ASMCMD ls command with
the --permission option. See "ls".</optDescription>
</command>
<command cmdName="chown" visible="true">
<synopsis>chown <user[:usergroup]> <files...></synopsis>
<description>Changes the owner of a file or list of files.</description>
<seeAlso/>
<exceptions/>
<example>The following are examples of the chown command that change the owner
of the specified files to the oracle1 operating system user.
ASMCMD [+fra/orcl/archivelog/flashback]>chown oracle1
log_7.264.684968167 log_8.265.684972027
ASMCMD [+fra/orcl/archivelog/flashback]>chown oracle1:asm_fra
log_9.264.687650269</example>
<options/>
<optDescription>
The options for the chown command are described below.
user - The name of the user that becomes the new owner.
usergroup - Name of the user group to which the user belongs.
files - List of one or more files. Atleast one filename should be specified.
'user' typically refers to the user that owns the database instance
home. Oracle ASM File Access Control uses the operating system (OS)
name to identify a database.
This command accepts a file name or multiple file names separated by
spaces. The specified files must be closed.
Only the Oracle ASM administrator can use this command.</optDescription>
</command>
<command cmdName="groups" visible="true">
<synopsis>groups <diskgroup> <user></synopsis>
<description>Lists all the user groups to which the specified user belongs.</description>
<seeAlso/>
<exceptions/>
<example>The following is an example of the groups command that displays the
user groups of the DATA disk group to which the oracle1 user belongs.
ASMCMD [+]>groups DATA oracle1
asm_data</example>
<options/>
<optDescription>
The options for the groups command are described below.
diskgroup - Name of the disk group to which the user belongs.
user - Name of the user.</optDescription>
</command>
<command cmdName="grpmod" visible="true">
<synopsis>grpmod { --add | --delete } <diskgroup> <usergroup> <users...></synopsis>
<description>Adds or removes operating system (OS) users to and from an
existing Oracle ASM user group.</description>
<seeAlso/>
<exceptions/>
<example>The following are examples of the grpmod command. The first example
adds the oracle1 and oracle2 users to the asm_fra user group of the
FRA disk group. The second example removes the oracle2 user from the
asm_data user group of the DATA disk group.
ASMCMD [+]grpmod --add fra asm_fra oracle1 oracle2
ASMCMD [+]grpmod --delete data asm_data oracle2
</example>
<options>add delete</options>
<optDescription>
The options for the grpmod command are described below.
--add - Specifies to add users to the user group.
--delete - Specifies to delete users from the user group.
diskgroup - Name of the disk group to which the user group belongs
usergroup - Name of the user group.
user - List of one or more users to add or remove from the user group.
Only the owner of the user group can use this command. The command
requires the SYSASM privilege to run.
This command accepts an operating system user name or multiple user
names separated by spaces. The operating system users are typically
owners of a database instance home.</optDescription>
</command>
<command cmdName="lsgrp" visible="true">
<synopsis>lsgrp [-a] [--suppressheader] [ -G <diskgroup> ] [ <pattern> ]</synopsis>
<description>Lists all Oracle ASM user groups or only groups that match a
specified pattern.</description>
<seeAlso/>
<exceptions/>
<example>The first example displays a subset of information about the user
groups whose name matches the asm% pattern. The second example displays
all information about all the user groups.
ASMCMD [+] > lsgrp asm%
DG_Name Grp_Name Owner
FRA asm_fra grid
DATA asm_data grid
ASMCMD [+] > lsgrp -a
DG_Name Grp_Name Owner Members
FRA asm_fra grid oracle1
DATA asm_data grid oracle1 oracle2</example>
<options>a suppressheader G</options>
<optDescription>
The options for the lsgrp command are described below.
-a - Lists all columns.
--suppressheader - Suppresses column headings.
-G diskgroup - Limits the results to the specified disk group name.
pattern - Displays the user groups that match the
pattern expression.</optDescription>
</command>
<command cmdName="lsusr" visible="true">
<synopsis>lsusr [-a] [--suppressheader] [ -G <diskgroup> ] [ <pattern> ]</synopsis>
<description>Lists Oracle ASM users in a disk group.</description>
<seeAlso/>
<exceptions/>
<example>The example lists users in the DATA disk group and also shows the
operating system userid assigned to the user.
ASMCMD [+] > lsusr -G DATA
User_Num OS_ID OS_Name
3 1001 grid
1 1021 oracle1
2 1022 oracle2</example>
<options>a suppressheader G</options>
<optDescription>
The options for the lsusr command are described below.
-a - List all users and the disk groups to which
the users belongs.
--suppressheader - Suppresses column headings.
-G diskgroup - Limits the results to the specified disk group name.
pattern - Displays the users that match the pattern expression.</optDescription>
</command>
<command cmdName="mkgrp" visible="true">
<synopsis>mkgrp <diskgroup> <usergroup> [<users...>]</synopsis>
<description>Creates a new Oracle ASM user group.</description>
<seeAlso/>
<exceptions/>
<example>This example creates the asm_data user group in the DATA disk group
and adds the oracle1 and oracle2 users to the user group.
ASMCMD [+] > mkgrp DATA asm_data oracle1 oracle2</example>
<options/>
<optDescription> will be added.
usergroup - Name of the user group to add. 30 is the maximum
number of characters.
users - Name of the database user to add to the user group.
You can optionally specify a list of one or more users to be included as members
of the new user group.</optDescription>
</command>
<command cmdName="mkusr" visible="true">
<synopsis>mkusr <diskgroup> <user></synopsis>
<description>Adds an operating system (OS) user to a disk group.</description>
<seeAlso/>
<exceptions/>
<example>The first example adds the oracle1 user to the DATA disk group.
ASMCMD [+] > mkusr DATA oracle1</example>
<options/>
<optDescription>
The options for the mkusr command are described below.
diskgroup - Specifies the name of the disk group to which
the user is to be added.
user - Name of the user that you want to add.
The user to be added must be a valid operating system user.
Only a user authenticated as SYSASM can execute this command.</optDescription>
</command>
<command cmdName="passwd" visible="true">
<synopsis>passwd <user></synopsis>
<description>Changes the password of a user.</description>
<seeAlso/>
<exceptions/>
<example>This example changes the password of the oracle2 user.
ASMCMD [+] > passwd oracle2
Enter old password (optional):
Enter new password: ******</example>
<options/>
<optDescription>
The option for the passwd command is described below.
user - Name of the user.
An error is raised if the user does not exist in the Oracle ASM
password file. The user is first prompted for the current password,
then the new password. The command requires the SYSASM privilege to run</optDescription>
</command>
<command cmdName="rmgrp" visible="true">
<synopsis>rmgrp <diskgroup> <usergroup></synopsis>
<description>Removes a user group from a disk group.</description>
<seeAlso/>
<exceptions/>
<example>This example removes the asm_data user group from the DATA disk group.
ASMCMD [+] > rmgrp DATA asm_data</example>
<options/>
<optDescription>
The options for the rmgrp command are described below.
diskgroup - Name of the disk group to which the user group belongs.
usergroup - Name of the user group to delete.
Note that removing a group might leave some files without a valid group
To ensure that those files have a valid group, explicitly update those
files to a valid group. See "chgrp".
The command must be run by the owner of the group and also requires
the SYSASM privilege to run.</optDescription>
</command>
<command cmdName="rmusr" visible="true">
<synopsis>rmusr [-r] <diskgroup> <user></synopsis>
<description>Deletes an operating system (OS) user from a disk group.</description>
<seeAlso/>
<exceptions/>
<example>This example removes the oracle2 user from the DATA disk group.
ASMCMD [+] > rmusr DATA oracle2</example>
<options>r</options>
<optDescription>
The options for the rmusr command are described below.
-r - Removes all files in the disk group that the user
owns at the same time that the user is removed.
diskgroup - Specifies the name of the disk group from which
the user is to be deleted.
user - Name of the user that you want to delete.
Only a user authenticated as SYSASM can execute this command.</optDescription>
</command>
<command cmdName="rpusr" visible="true">
<synopsis>rpusr <diskgroup> <user1> <user2></synopsis>
<description>Replaces an operating system (OS) user user1 with another
operating system (OS) user user2.</description>
<seeAlso/>
<exceptions/>
<example>This example replaces the oracle1 user with the oracle2 user.
ASMCMD [+] > rpusr DATA oracle1 oracle2</example>
<options/>
<optDescription>
The options for the rpusr command are described below.
diskgroup - Specifies the name of the disk group from which
the user is to be replaced.
user1 - Name of the user that you want to replace.
This user must be already a member of the disk group.
user2 - Name of the user that you want to replace with.
This user must not already be a member of the disk group.
Only a user authenticated as SYSASM can execute this command.</optDescription>
</command>
<command cmdName="volcreate" visible="true">
<synopsis>volcreate -G <diskgroup> -s <size> [ --column <number> ] [ --width <stripe_width> ] [--redundancy {high|mirror|unprotected} ] [--primary {hot|cold}] [--secondary {hot|cold}] <volume> </synopsis>
<description>Creates an Oracle ADVM volume in the specified disk group.</description>
<seeAlso/>
<exceptions/>
<example>This example creates volume1 in the DATA disk group with the
size set to 10 gigabytes.
ASMCMD [+] > volcreate -G DATA -s 10G --width 64K --column 8 volume1
ASMCMD [+] > volinfo -G DATA volume1
Diskgroup Name: DATA
Volume Name: VOLUME1
Volume Device: /dev/asm/volume1-123
State: ENABLED
Size (MB): 10240
Resize Unit (MB): 512
Redundancy: MIRROR
Stripe Columns: 8
Stripe Width (K): 64
Usage:
Mountpath: </example>
<options>G s column width redundancy primary secondary</options>
<optDescription>
The options for the volcreate command are described below.
-G diskgroup - Name of the disk group containing the volume.
-s size - Size of the volume to be created in units
of K, M, G, T, P or E. The unit designation
must be appended to the number specified.
No space is allowed. For example: 20G
The current maximum size of a volume is 127T.
--column number - Number of columns in a stripe set.
Values range from 1 to 8. The default
value is 8.
--width stripe - Stripe width of a volume. The value
can range from 4 KB to 1024 KB, at
power-of-two intervals, with a default
of 1024 KB.
--redundancy {high|mirror|unprotected} - Redundancy of the
Oracle ADVM volume which can be
specified for normal redundancy disk
groups. The range of values are as follows:
unprotected for non-mirrored redundancy,
mirror for double-mirrored redundancy, or
high for triple-mirrored redundancy.
If redundancy is not specified, the
setting defaults to the redundancy level
of the disk group.
--primary {hot|cold} - Intelligent Data Placement specification
for primary extents, either hot or cold region.
--secondary {hot|cold} - Intelligent Data Placement specification
for secondary extents, either hot or cold
region.
volume - Name of the volume to be created. Can be
a maximum of 11 (Linux), 23 (AIX), or 30
(Solaris and Windows) alphanumeric characters;
hyphens are not allowed. The first character
must be alphabetic.
When creating an Oracle ADVM volume, a volume device name is
created with a unique Oracle ADVM persistent disk group number
that is concatenated to the end of the volume name. The unique
number can be one to three digits.
On Linux, the volume device name is in the format volume_name-nnn.
On Windows the volume device name is in the format asm-volume_name-nnn.
The volume device file can be used as any other disk or logical
volume to mount file systems or for applications to use directly.
You can determine the volume device name with the volinfo command,
described in "volinfo".
A successful volume creation automatically enables the volume device.
The volume device file can be used as any other disk or logical
volume to mount file systems or for applications to use directly.</optDescription>
</command>
<command cmdName="voldelete" visible="true">
<synopsis>voldelete -G <diskgroup> <volume></synopsis>
<description>Deletes an Oracle ADVM volume.</description>
<seeAlso/>
<exceptions/>
<example>This example deletes volume1 from the DATA disk group.
ASMCMD [+] > voldelete -G DATA volume1</example>
<options>G</options>
<optDescription>
The options for the voldelete command are described below.
-G diskgroup - Name of the disk group containing the volume.
volume - Name of the volume to be deleted.
To successfully execute this command, the local Oracle ASM instance
must be running and the disk group required by this command must be
mounted in the Oracle ASM instance. Before deleting a volume, you
must ensure that there are no active file systems associated with
the volume.</optDescription>
</command>
<command cmdName="voldisable">
<synopsis>voldisable { --all | { -G <diskgroup...> { -a | <volume...> } } }</synopsis>
<description>Disables Oracle ADVM volumes in mounted disk groups and removes the
volume device on the local node.</description>
<seeAlso/>
<exceptions/>
<example>The first example disables volume1 in the DATA disk group.
The second example disables multiple volumes in one disk group.
The third example disables multiple volumes in multiple disk groups.
ASMCMD [+] > voldisable -G DATA volume1
ASMCMD [+] > voldisable -G DATA volume1,volume2,volume3
ASMCMD [+] > voldisable -G DATA1,DATA2 volume1,volume2,volume3
</example>
<options>a G</options>
<optDescription>
--all - When used without a disk group name, specifies all
volumes within all disk groups.
-a - When used with a disk group name (-G diskgroup -a),
specifies all volumes within that disk group.
-G diskgroup - Comma separated disk group names containing the
volume.
volume - Comma separated volume names to be disabled. Can be
maximum of 11 (Linux), 23 (AIX), or 30 (Solaris
and Windows) alphanumeric characters. The first
character must be alphabetic.
You can disable volumes before shutting down an Oracle ASM instance
or dismounting a disk group to verify that the operations can be
accomplished normally without including a force option due to open
volume files. Disabling a volume also prevents any subsequent opens
on the volume or device file as it no longer exists.
Before disabling a volume, you must ensure that there are no active
file systems associated with the volume. You must first dismount the
Oracle ACFS file system before disabling the volume.
</optDescription>
</command>
<command cmdName="volenable">
<synopsis>volenable { --all | { -G <diskgroup...> { -a | <volume...> } } }</synopsis>
<description>Enables Oracle ADVM volumes in mounted disk groups.</description>
<seeAlso/>
<exceptions/>
<example>The first example enables volume1 in the DATA disk group.
The second example enables multiple volumes in one disk group.
The third example enables multiple volumes in specified disk groups.
ASMCMD [+] > volenable -G DATA volume1
ASMCMD [+] > volenable -G DATA volume1,volume2,volume3
ASMCMD [+] > volenable -G DATA1,DATA2 volume1,volume2,volume3
</example>
<options>a G</options>
<optDescription> The options for the volenable command are described below.
--all - When used without a disk group name, specifies all
volumes within all disk groups.
-a - When used with a disk group name (-G diskgroup -a),
specifies all volumes within that disk group.
-G diskgroup - Comma separated disk group names containing the
volumes.
volume - Comma separated volume names to be enabled.
A volume is enabled when it is created.</optDescription>
</command>
<command cmdName="volinfo" visible="true">
<synopsis>volinfo { --all | { -G <diskgroup> { -a | <volume> } } | --show_diskgroup <volumedevice> | --show_volume <volumedevice> }</synopsis>
<description>Displays information about Oracle ADVM volumes.</description>
<seeAlso/>
<exceptions/>
<example>This example displays information about the volume1 volume in the DATA
disk group.
ASMCMD [+] > volinfo -G DATA volume1
Diskgroup Name: DATA
Volume Name: VOLUME1
Volume Device: /dev/asm/volume1-123
State: ENABLED
Size (MB): 10240
Resize Unit (MB): 512
Redundancy: MIRROR
Stripe Columns: 8
Stripe Width (K): 64
Usage: ACFS
Mountpath: /u01/app/acfsmounts/acfs1</example>
<options>a G show_diskgroup show_volume</options>
<optDescription>
The options for the volinfo command are described below.
--all - When used without a disk group name, specifies
all volumes within all disk groups.
-a - When used with a disk group name
(-G diskgroup -a), specifies all volumes
within that disk group.
-G diskgroup - Name of the disk group containing the volume.
volume - Name of the volume.
--show_diskgroup - Returns only the disk group name.
A volume device name is required.
--show_volume - Returns only the volume name.
A volume device name is required.
volumedevice - Name of the volume device.</optDescription>
</command>
<command cmdName="volresize" visible="true">
<synopsis>volresize -G <diskgroup> -s <size> [ -f ] <volume></synopsis>
<description>Resizes an Oracle ADVM volume.</description>
<seeAlso/>
<exceptions/>
<example>This example resizes volume1 in the DATA disk group to 20 gigabytes.
ASMCMD [+] > volresize -G DATA -s 20G volume1</example>
<options>G s f</options>
<optDescription>
The options for the volresize command are described below.
-G diskgroup - Name of the disk group containing the volume.
-f - Forces the shrinking of a volume that is not an Oracle
ACFS volume to suppress the warning message.
volume - Name of the volume to be resized.
-s size - New size of the volume in units of K, M, G, or T.
If the volume is not an Oracle ACFS volume and the new size is smaller
than current, you are warned of possible data corruption. Unless the
-f (force) option is specified, you are prompted whether to continue
with the operation.
If there is an Oracle ACFS file system on the volume you cannot resize
the volume with the volresize command. You must use the acfsutil size
command, which also resizes the volume and file system.</optDescription>
</command>
<command cmdName="volset" visible="true">
<synopsis>volset -G <diskgroup> [ --usagestring <string>] [--mountpath <mount_path>] [--primary {hot|cold}] [--secondary {hot|cold}] <volume> </synopsis>
<description>Sets attributes of an Oracle ADVM volume in mounted disk groups.</description>
<seeAlso/>
<exceptions/>
<example>This example sets the usage string for a volume that is not attached
to a file system.
ASMCMD[+]>volset -G DATA --usagestring 'no file system attached'
volume1</example>
<options>G usagestring mountpath primary secondary</options>
<optDescription>
The options for the volset command are described below.
-G diskgroup - Name of the disk group containing the volume.
--usagestring string - Optional usage string to tag a volume which
can be up to 30 characters. This string is
set to ACFS when the volume is attached to
a file system and should not be changed.
--mountpath mount_path - Optional string to tag a volume with its
mount path string which can be up to 1024
characters. This string is for user
information only.
--primary {hot|cold} - Intelligent Data Placement specification for
primary extents, either hot or cold region.
--secondary {hot|cold} - Intelligent Data Placement specification for
secondary extents, either hot or cold region.
volume Name of the volume to set attributes.
When running the mkfs command to create a file system, the usage field
is set to ACFS and mountpath field is reset to an empty string if it
has been set. The usage field should remain at ACFS.
When running the mount command to mount a file system, the mountpath
field is set to the mount path value to identify the mount point for
the file system. After the value is set by the mount command, the
mountpath field should not be updated.
</optDescription>
</command>
<command cmdName="volstat" visible="true">
<synopsis>volstat [-G <diskgroup>][<volume>]</synopsis>
<description>Reports I/O statistics for Oracle ADVM volumes</description>
<seeAlso/>
<exceptions/>
<example>The following is an example of the volstat command that displays
information about volumes in the data disk group.
ASMCMD [+] > volstat -G data
DISKGROUP NUMBER / NAME: 1 / DATA
---------------------------------------
VOLUME_NAME READS BYTES_READ READ_TIME READ_ERRS WRITES BYTES_WRITTEN WRITE_TIME
------------------------------------------------------------------------------------------
VOLUME1 10085 2290573312 22923 0 1382 5309440 1482
(continued)WRITE_ERRS
-------
0
</example>
<options>G</options>
<optDescription>
The options for the volstat command are described below
-G diskgroup - Name of the mounted disk group containing the volume
volume - Name of the volume to report I/O statistics.
The following apply when using volstat command.
If the disk group is not specified and the volume name is
specified, all mounted disk groups are searched for the
specified volume name.
If the disk group name is specified and the volume name is
omitted, then all volumes are displayed for the named disk group
If both the disk group name and volume name are omitted, all
volumes on all disk groups are displayed.</optDescription>
</command>
<command cmdName="pwcreate" visible="true">
<synopsis>pwcreate { --dbuniquename <string> | --asm } [-f]
[--format <format>] <file_path> <sys_password></synopsis>
<description>Create a password file at the location specified with
initial sys password as sys_password. The password file can be created
only on an ASM diskgroup.</description>
<seeAlso>pwdelete pwcopy pwmove pwset pwget</seeAlso>
<exceptions/>
<example>The first example uses pwcreate to create a new password file
on ASM diskgroup in version 12.2 format and also updates the
corresponding CRS resource. The second example uses pwcreate
to create a new password file for a DB instance.
ASMCMD [+] > pwcreate --asm +DG/mydir/mypwfile 'w3lcome1' --format 12.2
ASMCMD [+] > pwcreate --dbuniquename aime1 +DG/mydir/mypwfile 'w3lcome1'
</example>
<options>--dbuniquename --asm --format -f</options>
<optDescription> The options for pwcreate command are described below.
--dbuniquename - The dbuniquename parameter identifies
which database resource to update with
the password file location.
--asm - The asm switch tells ASMCMD that the
password file to be created is an ASM
password file rather than a database
password file.
--format - Format in which the password file will be
created, options are 12 and 12.2. If not
specified, 12.2 will be used as a default.
-f - force option to delete the existing and create
a new password file.
file_path - The file parameter points to a path
for the password file. The password file
has to be on an ASM Disk Group.
sys_password - The password parameter specifies the
password for user 'sys'.
</optDescription>
</command>
<command cmdName="pwcopy" visible="true">
<synopsis>pwcopy [ --dbuniquename <string> | --asm ][-f]
<source_path> <destination_path></synopsis>
<description>Copy a password file from one disk group to another,
from OS to a disk group, or from a disk group to OS</description>
<seeAlso>pwcreate pwdelete pwmove pwset pwget</seeAlso>
<exceptions/>
<example>The first example uses pwcopy to copy an existing
password file to a new location on a different ASM diskgroup.
It also updates the corresponding CRS resource with the new
location if --asm or --dbuniquename flag is specified.
The second example uses pwcopy to copy a password file
from a diskgroup to OS. The third example uses pwcopy to copy a
password file from one diskgroup to another, with -f option.
In this case, if --asm has a password file associated, will be
cleared and new file will be registered.
ASMCMD [+] > pwcopy --asm +DG/mydir/mypwfile +DG1/pwfiles/mypwfile
copying +DG/mypwfile -> +DG1/pwfiles/mypwfile
ASMCMD [+] > pwcopy +DG/mydir/mypwfile /home/asmuser/pwfiles/mypwfile
copying +DG/mypwfile -> /home/asmuser/pwfiles/mypwfile
ASMCMD [+] > pwcopy --asm -f +DG1/mydir/mypwfile +DG2/mydir2/mypwfile2
</example>
<options> --dbuniquename --asm -f </options>
<optDescription>
The options for pwcopy command are described below.
--dbuniquename - The dbuniquename parameter identifies
which database resource to update with
the password file location. This
parameter is required if the database
password file location is to be updated
on the CRS resource.
--asm - The asm switch tells ASMCMD that the
password file to be copied is an ASM
password file rather than a database
password file. This parameter is required
if the asm password file location is to be
updated on the CRS resource.
-f - Force Option. If -f is specified, then password
file is copied without any checks.
</optDescription>
</command>
<command cmdName="pwmove" visible="true">
<synopsis>pwmove [ --dbuniquename <string> | --asm ] [-f]
<source_path> <destination_path></synopsis>
<description>Moves a password file from one diskgroup to another,
from OS to a diskgroup, or from a diskgroup to OS</description>
<seeAlso>pwcreate pwdelete pwcopy pwset pwget</seeAlso>
<exceptions/>
<example>The first example uses pwmove to move an existing
password file to a new location on a different ASM diskgroup.
It also updates the CRS resource with the new location.
The second example uses pwmove command with
-f option, in which case, if resource for asm already has a password
file, it will be cleared and new file will be registered.
ASMCMD [+] > pwmove --asm +DG/mydir/mypwfile +DG1/pwfiles/mypwfile
moving +DG/mypwfile -> +DG1/pwfiles/mypwfile
ASMCMD [+] > pwmove --asm -f +DG/mydir/mypwfile +DG1/pwfiles/mypwfile
moving +DG/mypwfile -> +DG1/pwfiles/mypwfile
</example>
<options> --dbuniquename --asm </options>
<optDescription>
The options for pwmove command are described below.
--dbuniquename - The dbuniquename parameter identifies
which database resource to update with
the password file location. This
parameter is required if the database
password file is on an ASM diskgroup.
--asm - The asm switch tells ASMCMD that the
password file to be moved is an ASM
password file rather than a database
password file. This parameter is required
if the asm password file is located on
an ASM diskgroup.
-f - force option, for the resource if any
password is associated, it will be cleared
and new file will be registered.
</optDescription>
</command>
<command cmdName="pwdelete" visible="true">
<synopsis>pwdelete { --dbuniquename <string> | --asm |
<path_to_file>} [-f]</synopsis>
<description>Delete a password file and remove its location from
the corresponding CRS resource if possible.</description>
<seeAlso>pwcreate pwcopy pwmove pwset pwget</seeAlso>
<exceptions/>
<example>The following examples use pwdelete to remove an existing
password file for an ASM and DB instance. It also updates the
corresponding CRS resource by clearing the password file location
field.
Note that in the third example, the CRS resource will not be
cleared even if the password file is registered with ASM or
DB resource.
The last example -f option is used, in which case the associated
password file will be deleted without any checks.
ASMCMD [+] > pwdelete --asm
ASMCMD [+] > pwdelete --dbuniquename aime1
ASMCMD [+] > pwdelete +DG/mypwfile
ASMCMD [+] > pwdelete --asm -f
</example>
<options> --dbuniquename --asm </options>
<optDescription>
The options for pwdelete command are described below.
--dbuniquename - The dbuniquename parameter identifies
which database resource whose password file
is to be deleted. If a password file is
registered then it is deleted and the
password file location field is cleared
for the specified DB resource.
--asm - The asm switch tells ASMCMD that the
password file to be deleted is an ASM
password file rather than a database
password file. If a password file is
registered then it is deleted and the
password file location field is cleared
for the ASM resource.
path_to_file - The password file which is to be
deleted. The password file is deleted
if it exists. Note that in this case the CRS
resource will not be cleared even if this
password file is registered with ASM or
a DB resource.
-f - the specified password file will be deleted,
without any checks.
</optDescription>
</command>
<command cmdName="pwget" visible="true">
<synopsis>pwget { --dbuniquename <string> | --asm }</synopsis>
<description>Get the location of the password file for Database
or for ASM instance</description>
<seeAlso>pwcreate pwcopy pwmove pwdelete pwset</seeAlso>
<exceptions/>
<example>The following examples uses pwget to retrieve the location
of the password file for an ASM and DB instance.
ASMCMD [+] > pwget --asm
+dg/mypwfile
ASMCMD [+] > pwget --dbuniquename aime1
+dg/mypwfile
</example>
<options> --dbuniquename --asm </options>
<optDescription>
The options for pwget command are described below.
--dbuniquename - The dbuniquename parameter identifies
the database resource for the password file
location. This parameter is required if the
database password file is located on an ASM
diskgroup.
--asm - The asm switch retrieves the location of
password file for an ASM instance. This
parameter is required if the asm password file
is located on an ASM diskgroup.
</optDescription>
</command>
<command cmdName="pwset" visible="true">
<synopsis>pwset {--dbuniquename <string>|--asm} [-f] <path_to_file></synopsis>
<description>Set the location of the password file for Database
or for ASM instance</description>
<seeAlso>pwcreate pwcopy pwmove pwdelete pwget</seeAlso>
<exceptions/>
<example>The following examples uses pwset to set the location of the
password file for an ASM or DB instance on the CRS resource.
ASMCMD [+] > pwset --asm +DG/mydir/mypwfile
ASMCMD [+] > pwset --dbuniquename aime1 +DG/mydir/mypwfile
</example>
<options> --dbuniquename --asm </options>
<optDescription> The options for pwset command are described below.
--dbuniquename - The dbuniquename parameter identifies
which database resource to update with
the password file location. This
parameter is required if the database
password file is located on an ASM diskgroup.
--asm - The asm switch sets the location of the
password file for an ASM instance.
This parameter is required if the asm password
file is located on an ASM diskgroup.
-f - The force option, the resource will be updated
without any checks.
</optDescription>
</command>
<command cmdName="showclustermode">
<synopsis>showclustermode</synopsis>
<description>Obtains cluster mode </description>
<seeAlso/>
<exceptions/>
<example/>
<options/>
<optDescription />
</command>
<command cmdName="showpatches" noinstance="true">
<synopsis>showpatches [-l]</synopsis>
<description>Displays a list of patches applied on the grid home</description>
<seeAlso/>
<exceptions/>
<example />
<options>l</options>
<optDescription>
The options for showpatches command are described below.
-l - Displays all details.
</optDescription>
</command>
<command cmdName="showversion" noinstance="true">
<synopsis>showversion [[[--releasepatch] [--softwarepatch]] | [--active]]</synopsis>
<description>Displays ASM Version, cluster patch level, patchlevel of
local node </description>
<seeAlso/>
<exceptions />
<example/>
<options>releasepatch softwarepatch active</options>
<optDescription>
The options for showversion command are described below;
--releasepatch - Cluster level patch version
--softwarepatch - Patch level on the local node
--active - Active version and active patch level
NOTE: releasepatch and softwarepatch options may be different when
ASM/grid home is being patched. And when in normal mode, it should be
same. When there is no ASM instance connected, releasepatch information
will not be displayed.
</optDescription>
</command>
<command cmdName="showclusterstate">
<synopsis>showclusterstate</synopsis>
<description>Displays ASM rolling migration/patching state.</description>
<seeAlso/>
<exceptions/>
<example />
<options/>
<optDescription>
The ASM cluster state is one of the following:
Normal - ASM cluster is in Normal operation mode
In Rolling Patch - ASM cluster is in the middle of rolling patch operation
In Rolling Upgrade - ASM cluster is undergoing rolling upgrade
</optDescription>
</command>
<command cmdName="asmcmd">
<synopsis>asmcmd [-V] [--nocp] [-v {errors | warnings | normal | info | debug} ] [--privilege {sysasm | sysdba} ] [-p] [--inst <instance_name>] [--discover][<command>]</synopsis>
<description>Starts asmcmd or executes the command</description>
<seeAlso/>
<exceptions/>
<example/>
<options> V nocp v a p inst</options>
<optDescription>The environment variables ORACLE_HOME and ORACLE_SID determine the
instance to which the program connects, and ASMCMD establishes a
bequeath connection to it, in the same manner as a SQLPLUS / AS
SYSASM. The user must be a member of the OSASM group.
If Flex ASM is enabled, the ASMCMD connects to any one of the ASM
instances running in the cluster. The connection to ASM instance does
not depend on the environment variables ORACLE_HOME and ORACLE_SID.
The ASMCMD alert log shows to which instance ASMCMD is connected to.
If the user wants to connect to a specific ASM instance, --inst option
should be used to specify the instance name.
Specifying the -V option prints the asmcmd version number and
exits immediately.
Specifying the --nocp option disables connection pooling feature for
ASMCMD.
Specifying the -v option prints extra information that can help
advanced users diagnose problems.
Specify the --privilege option to choose the type of connection. There are
only two possibilities: connecting as SYSASM or as SYSDBA.
The default value if this option is unspecified is SYSASM.
Specifying the -p option allows the current directory to be displayed
in the command prompt, like so:
ASMCMD [+DATA/ORCL/CONTROLFILE] >
Specifying the --discover option uses discovery string obtained from
Listener, does not use ORACLE_SID.
[command] specifies one of the following commands, along with its
parameters.
Type "help [command]" to get help on a specific ASMCMD command.
</optDescription>
</command>
<command cmdName="help" visible="true" noinstance="true">
<synopsis>help [<command>]</synopsis>
<description>Displays help for the specified command.</description>
<seeAlso></seeAlso>
<exceptions></exceptions>
<example></example>
<options></options>
<optDescription></optDescription>
</command>
<command cmdName="convert" visible="false" wildcard="true"
noinstance="false">
<synopsis>
convert --finc <incarn>
</synopsis>
<description>
Converts the file incarnation number into a time stamp
</description>
<seeAlso>
ls
</seeAlso>
<exceptions/>
<example>
convert --finc 835527578
Timestamp:822315553 ==> 12:59:13 08/01/2013
</example>
<options>
finc
</options>
<optDescription/>
</command>
<command cmdName="reloc" visible="false" wildcard="true">
<synopsis>reloc --extent <extentname> --alias <alias> --disk1 <disk1> [--disk2 <disk2> [--disk3 <disk3>] ]</synopsis>
<description>Relocation of a file given an extent</description>
<seeAlso/>
<exceptions/>
<example/>
<options>extent alias disk1 disk2 disk3 </options>
<optDescription>
The options for reloc command are described below:
--extent <extentname> - extent number
--alias <alias> - alias of the file to be relocated
--disk1 <disknumber1> - disknumber of target disk1
(for external redundancy)
--disk2 <disknumber2> - disknumber of target disk2
(for normal redundancy)
--disk3 <disknumber3> - disknumber of target disk3
(for high redundancy)
</optDescription>
</command>
<command cmdName="mapextent" visible="true">
<synopsis>mapextent [--suppressheader] <file> <extent></synopsis>
<description>Map from <file,extent> to <disk,au></description>
<seeAlso/>
<exceptions/>
<example/>
<options>--suppressheader</options>
<optDescription>
The options for mapextent command are described below:
--suppressheader - Suppresses column header from the output.
<file> - File path.
<extent> - Extent set number.
</optDescription>
</command>
<command cmdName="mapau" visible="true">
<synopsis>mapau [--suppressheader] <dg number> <disk number> <au></synopsis>
<description>Map from <disk,au> to <file,extent></description>
<seeAlso/>
<exceptions/>
<example/>
<options>--suppressheader</options>
<optDescription>
The options for mapau command are described below:
--suppressheader - Suppresses column header from the output.
<dg number> - Diskgroup number.
<disk number> - Disk number.
<au> - AU number.
</optDescription>
</command>
<command cmdName="amdu_extract" visible="true" wildcard="true">
<synopsis>amdu_extract <disk group> [--sys_filename] <file> <diskstring></synopsis>
<description>Calls AMDU to extract <file> from <disk group></description>
<seeAlso/>
<exceptions/>
<example> The following example uses amdu_extract to extract the parameter file from the '+datafile'
disk group.
ASMCMD [+] > amdu_extract datafile +datafile/parameterfile/spfile.ora /devices/disk*
</example>
<options>system_path</options>
<optDescription> The options for amdu_extract command are described below:
disk group - Name of the disk group containing the file to be
extracted.
--sys_filename - If this option is used, the specified file name should
point to the system ASM filename, instead of the file
alias.
file - Name of the file to be extracted. It must be an Oracle
ASM alias path, except if the --system_path option is
used. Can be specified as either an absolute or a
relative path.
diskstring - Specifies the value for the discovery diskstring.
</optDescription>
</command>
<command cmdName="audcleanaudittrail">
<synopsis>audcleanaudittrail {--os|--uni} [--useTimestamp]</synopsis>
<description>To delete the audit trail files</description>
<seeAlso />
<exceptions />
<example>The following are examples of the audcleanaudittrail command.
The first example deletes all files of OS trail type older than
last archived timestamp.
The second example deletes all files of unified audit trail type
older than last archived timestamp.
ASMCMD [+]>audcleanaudittrail --os --useTimestamp
ASMCMD [+]>audcleanaudittrail --uni --useTimestamp
</example>
<options>os uni useTimestamp</options>
<optDescription>
The options for audcleanaudittrail are described below
--os - audit files of OS trail type
--uni - audit files of unified audit trail type
--useTimestamp - if specified, last archived timestamp will be
used for deciding on the files to be deleted.
TRUE indicates only audit files modified before
the last archive timestamp will be deleted.
FALSE indicates all audit files will be
deleted.
</optDescription>
</command>
<command cmdName="audclearproperty">
<synopsis>audclearproperty {--max_sz|--max_age} [--use_def] {--os|--uni}</synopsis>
<description>Clear the specified audit property</description>
<seeAlso/>
<exceptions/>
<example>The following are examples of audclearproperty command.
The first example specifies max_sz property to be set to default
value, with audit files of OS trail type.
The second example specifies max_age property to be cleared to 0, with
audit files of unified audit trail type.
ASMCMD [+]>audclearproperty --max_sz --use_def --os
ASMCMD [+]>audclearproperty --max_age --uni
</example>
<options>max_sz max_age use_def os uni</options>
<optDescription>
The options for audclearproperty command are described below:
max_sz - maximum size
max_age - maximum age
use_def - reset to default values
os - audit files of OS trail type
uni - audit files of unified audit trail type
</optDescription>
</command>
<command cmdName="audcleartimestamp">
<synopsis>audcleartimestamp {--os --ins <instancenumber>| --uni}</synopsis>
<description>Clears the timestamp set by audsettimestamp, which is used by
audcleanaudittrail.</description>
<seeAlso>audsettimestamp</seeAlso>
<exceptions />
<example>The following are examples of audcleartimestamp command.
The first example clears the time stamp for RAC instance 1, with
audit files of OS audit trail type.
The second example clears the time stamp for audit files of unified
audit trail type.
ASMCMD [+]>audcleartimestamp --os --ins 1
ASMCMD [+]>audcleartimestamp --uni
</example>
<options>os uni ins instacnenumber</options>
<optDescription>
The options for audcleartimestamp command are described below
--os - the audit files of OS trail type
--uni - the audit files of unified audit trail type
--ins - RAC instance number
<instancenumber> - instance number
</optDescription>
</command>
<command cmdName="audcreatejob">
<synopsis>audcreatejob --name <job_name> --int <purge_int>
{--os | --uni} [--no_use]</synopsis>
<description>To create Audit purge job for ASM Audit files</description>
<seeAlso/>
<exceptions/>
<example> The following is an example for audcreatejob command.
The example creates a job called TEST with purge interval 10 for OS
trail type and use time stamp (--no_use specified).
ASMCMD [+]>audcreatejob --name TEST --int 10 --os
</example>
<options> no_use </options>
<optDescription>
The options for audcreatejob command are described below
--name - to specify name of the purge job
<job_name> - name of the purge job
--int - to specify purge interval in hours
<purge_int> - interval used to purge
--os - audit files of OS trail type
--uni - audit files of unified audit trail type
--no_use - ignore the timestamp specified earlier
</optDescription>
</command>
<command cmdName="auddropjob">
<synopsis>auddropjob --name <job_name></synopsis>
<description> Drop the specified audit purge job</description>
<seeAlso/>
<exceptions/>
<example> The following example drops the audit purge job TEST
ASMCMD [+]>auddropjob --name TEST
</example>
<options>name </options>
<optDescription>
The options for auddropjob are described below:
--name - to specify name of the purge job
<job_name> - audit purge job name
</optDescription>
</command>
<command cmdName="audloaduniauditfiles">
<synopsis>audloaduniauditfiles </synopsis>
<description>To move the audit files created in OS spill files to the files
on the diskgroup. This command only moves the files of the unified
audit trail type
</description>
<seeAlso/>
<exceptions/>
<example>
The following is an example of audloaduniauditfiles command.
ASMCMD [+]>audloaduniauditfiles
</example>
<options/>
<optDescription />
</command>
<command cmdName="audsettraillocation">
<synopsis>audsettraillocation <dgname></synopsis>
<description>To set audit trail location</description>
<seeAlso/>
<exceptions/>
<example>
The following is an example of audsettraillocation command, specifies
ASM diskgroup DATADG.
ASMCMD [+]> audsettraillocation DATADG
</example>
<options>os uni audittraillocation</options>
<optDescription>
The option for audsettraillocation command is described below
<dgname> - Diskgroup name.
</optDescription>
</command>
<command cmdName="audsetproperty">
<synopsis>audsetproperty {--max_sz | --max_age } --val <value> {--os | --uni}</synopsis>
<description>Set audit property</description>
<seeAlso/>
<exceptions/>
<example>The following are examples of audsetproperty command
The first example specifies value 10 for max_sz property for audit
file of OS trail type.
The second example specifies value 10 for max_age property for
audit file of unified audit trail type.
ASMCMD [+]>audsetproperty --max_sz --val 10 --os
ASMCMD [+]>audsetproperty --max_age --val 10 --uni
</example>
<options>max_sz max_age val value os uni</options>
<optDescription>
The options for audsetproperty command are described below:
max_sz - maximum size
max_age - maximum age
val - value
<value> - value for the property
os - audit files of OS trail type
uni - audit files of unified audit trail type
</optDescription>
</command>
<command cmdName="audsetdebug">
<synopsis>audsetdebug {--debug | --error}</synopsis>
<description>To set the debug level </description>
<seeAlso/>
<exceptions/>
<example>The example sets the debug level to debug.
ASMCMD[+]>audsetdebug --debug
</example>
<options>debug error</options>
<optDescription>
The options for audsetdebug command are described below
--debug - to get debug level of tracing
--error - to get only error tracing
</optDescription>
</command>
<command cmdName="audsettimestamp">
<synopsis>audsettimestamp {--os|--uni} [--ins <id>] <timestamp...></synopsis>
<description>To set the timestamp, which will be used by audit purge jobs
</description>
<seeAlso/>
<exceptions/>
<example>The following example specifies time stamp of audit files of OS
trail type
ASMCMD [+]>audsettimestamp --os --ins 1 22-AUG-2012 07:48:53
</example>
<options> os uni ins id timestamp</options>
<optDescription>
The options for audsetimestamp command are described below:
--os - audit files of OS trail type
--uni - audit files of unified audit trail type
--ins - RAC instance
<id> - RAC instance number
<timestamp> - time stamp
NOTE: For OS trail type instance number is required and unified
audit trail type instance is not required.
</optDescription>
</command>
<command cmdName="audsetjobinterval">
<synopsis>audsetjobinterval --name <job_name> --int <interval></synopsis>
<description>To set the job interval for the specified audit purge</description>
<seeAlso/>
<exceptions/>
<example>The following example specifies interval 10 for audit cleanup job
TEST.
ASMCMD[+]>audsetjobinterval --name TEST --int 10
</example>
<options>name job_name int interval </options>
<optDescription>
The options for audsetjobinterval command are described below:
--name - to specify the name of audit purge job
<job_name> - audit purge job name
--int - to specify the interval in hours
<interval> - interval used to purge the audit files
</optDescription>
</command>
<command cmdName="audsetjobstatus">
<synopsis>audsetjobstatus --name <job_name> {--enable|--disable}</synopsis>
<description>To enable or disable the specified audit purge job</description>
<seeAlso/>
<exceptions/>
<example> The following example disables the Audit job TEST.
ASMCMD[+]>audsetjobstatus --name TEST --disable
</example>
<options>name job_name </options>
<optDescription>
The options for audsetjobstatus command are described below:
--name - to specify the audit purge job name
<job_name> - audit purge job name
enable/disable - to enable or disable the given job
</optDescription>
</command>
<command cmdName="lsaudcleanevents">
<synopsis>lsaudcleanevents [{--os|--uni}]</synopsis>
<description>To display the history of audit trail cleanup or purge events
</description>
<seeAlso/>
<exceptions/>
<example>The following example queries for audit trail cleanup or purge
events for OS audit trail type.
ASMCMD[+]>lsaudcleanevents --os
</example>
<options>os uni</options>
<optDescription>
The options for lsaudcleanevents are described below
--os - audit files of OS trail type
--uni - audit files of unified audit trail type
</optDescription>
</command>
<command cmdName="lsaudcleanupjobs">
<synopsis>lsaudcleanupjobs [{--os|--uni}]</synopsis>
<description>To display the configured audit trail purge jobs</description>
<seeAlso/>
<exceptions/>
<example> The following example queries Audit cleanup jobs for OS Audit files
ASMCMD[+]>lsaudcleanupjobs --os
</example>
<options> os uni </options>
<optDescription>
The options for lsaudcleanupjobs are described below
--os - the audit files of OS trail type
--uni - the audit files of unified audit trail type
</optDescription>
</command>
<command cmdName="lsaudconfigparams">
<synopsis>lsaudconfigparams [{--os|--uni}]</synopsis>
<description>To display the configured audit trail properties</description>
<seeAlso/>
<exceptions/>
<example>The following example queries audit configuration parameters for OS
trail type
ASMCMD[+]>lsaudconfigparams --os
</example>
<options> os uni </options>
<optDescription>
The options for lsaudconfigparams are described below
--os - the audit files of OS trail type
--uni - the audit files of unified audit trail type
</optDescription>
</command>
<command cmdName="audshowtimestamp">
<synopsis>audshowtimestamp [{--os|--uni}] [-g]</synopsis>
<description>To display the last archive timestamps for the audit trail
cleanup.
</description>
<seeAlso/>
<exceptions/>
<example>The following are examples of audshowtimestamp command.
The first example queries timestamp for OS Audit files.
The second example queries timestamp for OS Audit files from
GV$ASM_AUDIT_LAST_ARCH_TS table instead of V$ASM_AUDIT_LAST_ARCH_TS
table.
ASMCMD[+]>audshowtimestamp --os
ASMCMD[+]>audshowtimestamp --os -g
</example>
<options> os uni </options>
<optDescription>
The options for audshowtimestamp are described below
--os - the audit files of OS trail type
--uni - the audit files of unified audit trail type
-g - clusterwide fetches timestamp of OS trail type of all nodes
</optDescription>
</command>
<command cmdName="afd_configure" noinstance="true">
<synopsis>afd_configure [-d | -e] [-f]</synopsis>
<description>Configures AFD on the local node. This command requires
the Oracle Clusterware stack to be down on the local node.
The command must be executed by a privileged user.
After afd_configure execution the default filtering state is enabled.
</description>
<seeAlso>afd_deconfigure afd_state</seeAlso>
<exceptions/>
<example>The following example uses afd_configure to configure AFD on the local node.
ASMCMD [+] > afd_configure
</example>
<options>def</options>
<optDescription>
The options for afd_configure are described below
-d - disable AFD filtering mode
-e - enable AFD filtering mode
-f - force AFD configuration
</optDescription>
</command>
<command cmdName="afd_deconfigure" noinstance="true">
<synopsis>afd_deconfigure [-f]</synopsis>
<description>Deconfigures AFD from the local node. This command requires
the Oracle Clusterware stack to be down on the local node.
The command must be executed by a privileged user.
</description>
<seeAlso>afd_configure afd_state</seeAlso>
<exceptions/>
<example>The following example uses afd_deconfigure to deconfigure AFD.
ASMCMD [+] > afd_deconfigure
</example>
<options>f</options>
<optDescription>
The options for afd_deconfigure are described below
-f - force AFD deconfiguration
</optDescription>
</command>
<command cmdName="afd_dsget" noinstance="true">
<synopsis>afd_dsget [--all]</synopsis>
<description>Retrieves the AFD discovery diskstring value</description>
<seeAlso>afd_dsset</seeAlso>
<exceptions/>
<example>The following example uses afd_dsget to retrieve the current
AFD discovery diskstring value
ASMCMD [+] >afd_dsget
AFD discovery string: /dev/sd*
</example>
<options> all </options>
<optDescription>
The options for the afd_dsget command are described below.
--all - Get clusterwide AFD discovery diskstring.
</optDescription>
</command>
<command cmdName="afd_dsset" noinstance="true">
<synopsis>afd_dsset <afddiskstring> [--all]</synopsis>
<description>Sets the AFD discovery diskstring value</description>
<seeAlso>afd_dsget</seeAlso>
<exceptions/>
<example>The following examples uses afd_dsset to set the current value
of the AFD discovery diskstring.
ASMCMD [+] >afd_dsset /dev/sd*
</example>
<options> all </options>
<optDescription>
The options for the afd_dsset command are described below.
--all - Set clusterwide AFD discovery diskstring.
</optDescription>
</command>
<command cmdName="afd_filter" noinstance="true">
<synopsis>afd_filter {-e | -d } [<disk-path>] [--all]</synopsis>
<description>Sets the AFD filtering mode on a given disk path.
If the command is executed without specifying a disk path then
filtering is set at node level.
</description>
<seeAlso>afd_lsdsk afd_state</seeAlso>
<exceptions/>
<example>The following example uses afd_filter to enable AFD filtering
on a given diskpath.
ASMCMD [+] >afd_filter -e /dev/sdq
</example>
<options> e d all </options>
<optDescription>
The options for afd_filter are described below
-e - enable AFD filtering mode
-d - disable AFD filtering mode
--all - set clusterwide AFD filtering mode
</optDescription>
</command>
<command cmdName="afd_label" noinstance="true">
<synopsis>afd_label <label> <disk> [--rename | --migrate] [--init]
</synopsis>
<description>To set the given label to the specified disk</description>
<seeAlso>afd_unlabel afd_lsdsk</seeAlso>
<exceptions></exceptions>
<example>The following example labels a disk /dev/sdq with label DATA1.
ASMCMD [+] >afd_label DATA1 /dev/sdq
</example>
<options>rename migrate init</options>
<optDescription>
The options for the afd_label command are described below.
'--init' option is not allowed if AFD is already loaded.
label - label for the disk
disk - disk path
--rename - to relabel a disk that was labeled earlier
--migrate - to label a disk that was provisioned for ASM
--init - to set AFD label during initialize stage
</optDescription>
</command>
<command cmdName="afd_lsdsk" noinstance="true">
<synopsis>afd_lsdsk [--all]</synopsis>
<description>List Oracle ASM Filter Driver disks.</description>
<seeAlso>afd_filter afd_state</seeAlso>
<exceptions/>
<example>The following example lists AFD disks.
ASMCMD [+] >afd_lsdsk
--------------------------------------------------------------------------------
Label Filtering Path
================================================================================
DISK0 ENABLED /dev/sdd
DISK1 DISABLED /dev/sdm
DISK2 ENABLED /dev/sdq
</example>
<options> all </options>
<optDescription>
The options for the afd_lsdsk command are described below.
--all - clusterwide fetch of AFD disks.
</optDescription>
</command>
<command cmdName="afd_refresh" noinstance="true">
<synopsis>afd_refresh [--all]</synopsis>
<description>Refreshes AFD disks using the afd discovery string.
It uses the configured afd_diskstring value.
</description>
<seeAlso>afd_dsget afd_dsset afd_lsdsk afd_state</seeAlso>
<exceptions/>
<example>The following example uses afd_refresh to refresh AFD disks.
ASMCMD [+] >afd_refresh
</example>
<options> all </options>
<optDescription>
The options for the afd_refresh command are described below.
--all - clusterwide afd refresh
</optDescription>
</command>
<command cmdName="afd_scan" noinstance="true">
<synopsis>afd_scan [<disk-string>] [--all]</synopsis>
<description>Scans for AFD disks using the given discovery string.
If the command is executed without specifying a disk string then
it uses the configured afd_diskstring value.
</description>
<seeAlso>afd_dsget afd_dsset afd_lsdsk afd_state</seeAlso>
<exceptions/>
<example>The following example uses afd_scan to scan AFD disks
on a given disk string.
ASMCMD [+] >afd_scan /dev/sd*
</example>
<options> all </options>
<optDescription>
The options for the afd_scan command are described below.
--all - clusterwide afd scan
</optDescription>
</command>
<command cmdName="afd_unlabel" noinstance="true">
<synopsis>afd_unlabel { <label> | <'disk'> } [-f] [--init]</synopsis>
<description>To clear an existing label from a disk using either its
label or disk path. If a disk needs to be unlabeled during
initialization stage it can be done only by using its disk path.
</description>
<seeAlso>afd_label afd_lsdsk</seeAlso>
<exceptions></exceptions>
<example>The following example clears the label DATA1 from its disk.
ASMCMD [+] >afd_unlabel DATA1
The following example clears the label using disk path.
ASMCMD [+] >afd_unlabel '/dev/sdd1'
The following example clears the label during initialization stage.
ASMCMD [+] >afd_unlabel '/dev/sde1' --init
</example>
<options> f init</options>
<optDescription>
The options for the afd_unlabel command are described below.
'-f' option will not clear the label if there are pending opens.
'--init' option is not allowed if AFD is already loaded.
label - label to clear
disk - disk path
-f - forcibly clear the label if ASM member disk and
no pending opens of the disk
--init - to clear AFD label during initialize stage
</optDescription>
</command>
<command cmdName="afd_state" noinstance="true">
<synopsis>afd_state [--all]</synopsis>
<description>Returns the state of AFD </description>
<seeAlso/>
<exceptions/>
<example>The following example uses afd_state to query the state of AFD.
ASMCMD [+] >afd_state
ASMCMD-9526: The AFD state is 'LOADED' and filtering is 'DEFAULT' on host 'myhost'
</example>
<options> all </options>
<optDescription>
The options for afd_state are described below
--all - clusterwide afd state check
</optDescription>
</command>
<command cmdName="afd_di" noinstance="true">
<synopsis>afd_di {-e | -d | -q}</synopsis>
<description>Manipulates the data integrity state in the AFD
driver. One of the specified options must be provided in order
to execute this command.
</description>
<seeAlso>afd_filter afd_state</seeAlso>
<exceptions/>
<example>The following example uses this command to enable the data
integrity in the AFD driver.
ASMCMD [+] >afd_di -e
</example>
<options> e d q </options>
<optDescription>
The options for afd_di are described below
-e - enable data integrity
-d - disable data integrity
-q - query data integrity
</optDescription>
</command>
<command cmdName="afd_lslbl" noinstance="true">
<synopsis>afd_lslbl [<disk-string>]</synopsis>
<description>Scans OS disks using the given discovery string and lists
the disks that contain AFD labels.
If the command is executed without specifying a disk string then it
uses the configured afd_diskstring value.
</description>
<seeAlso>afd_state</seeAlso>
<exceptions/>
<example>The following example uses afd_lslbl to scan OS disks
for AFD labels and lists them.
ASMCMD [+] >afd_lslbl '/dev/sd*'
--------------------------------------------------------------------------------
Label Duplicate Path
================================================================================
DISK0 /dev/sdd
DISK1 /dev/sdm
</example>
<options/>
<optDescription/>
</command>
<command cmdName="mkcc" noinstance="undef">
<synopsis>mkcc <clustername> <wrap> [--direct] [--version <client_cluster_version>] [--guid <client_cluster_guid>] [--gimrdir <gimr_pdb/export_dir>] [--asm] [--gimr] [--tfa] [--acfs] [--rhp]</synopsis>
<description>Creates the configuration for a member cluster</description>
<seeAlso>rmcc lscc chcc</seeAlso>
<exceptions/>
<example>The following example creates the configuration for a member cluster and exports the credentials to a Cluster Manifest File.
ASMCMD [+] >mkcc cc1 /tmp/cc1.xml --version 12.2.0.0.0
</example>
<options>clustername wrap direct version guid gimrdir asm gimr tfa acfs rhp</options>
<optDescription>
The options for mkcc command are described below.
clustername - Member cluster name
wrap - Full path of the Cluster Manifest File to export the
credentials
direct - If specified, direct storage access; otherwise,
indirect access
version - 5 digit member cluster version if it is different
than the storage server version. The storage server
version is used if not specified.
guid - 32 character globally unique identifier for the
member cluster
gimrdir - Directory from which to import the GIMR PDB when
converting a standalone cluster to a member cluster
asm - Generate credentials and configuration for ASM
gimr - Generate credentials and configuration for GIMR
tfa - Generate credentials and configuration for TFA
acfs - Generate credentials and configuration for ACFS
rhp - Generate credentials and configuration for RHP
If no component options are specified, the default is to generate
credentials for all the components for which a service is configured.
All components export their credentials to the same Cluster Manifest
File.
GNS credentials are not generated by the 'asmcmd mkcc' command.
Follow this step to configure the Member Cluster as a GNS Client:
Issue the 'srvctl export gns -clientdata <wrap>' command to
export the GNS instance client data configuration to the Cluster
Manifest File.
</optDescription>
</command>
<command cmdName="rmcc" noinstance="undef">
<synopsis>rmcc <clustername> [-f]</synopsis>
<description>Deletes the configuration for the given member cluster</description>
<seeAlso>mkcc lscc chcc</seeAlso>
<exceptions></exceptions>
<example></example>
<options>clustername -f</options>
<optDescription>
The options for rmcc command are described below.
clustername - Member cluster name
-f - Forcibly delete the member cluster configuration
</optDescription>
</command>
<command cmdName="lscc" noinstance="undef">
<synopsis>lscc [--suppressheader] [-l] [<clustername> | {--file <wrap>}]</synopsis>
<description>Lists the configured member clusters</description>
<seeAlso>mkcc rmcc chcc</seeAlso>
<exceptions/>
<example>The following example lists the configured member clusters.
ASMCMD [+] >lscc
--------------------------------------------------------------------------------
NAME VERSION GUID
================================================================================
mc10 12.2.0.0.0 78015b1e78756f88bf119fd8e5146df4
MembCluster12 12.2.0.0.0 3de3bbd75e9a7f17bfe027b477b5bcae
================================================================================
ASMCMD [+] >lscc -l
----------------------------------------------------------------------------------------------------
NAME VERSION GUID ASM GIMR TFA ACFS RHP STORAGE ACCESS
====================================================================================================
mc10 12.2.0.0.0 78015b1e78756f88bf119fd8e5146df4 YES YES YES YES YES Indirect
MembCluster12 12.2.0.0.0 3de3bbd75e9a7f17bfe027b477b5bcae YES YES YES YES NO Direct
====================================================================================================
ASMCMD [+] >lscc mc10 --suppressheader
mc10 12.2.0.0.0 78015b1e78756f88bf119fd8e5146df4
ASMCMD [+] >lscc mc10 --suppressheader -l
mc10 12.2.0.0.0 78015b1e78756f88bf119fd8e5146df4 ASM (Indirect Storage Access),GIMR,TFA,ACFS,RHP
</example>
<options>clustername --file --suppressheader -l</options>
<optDescription>
The options for lscc command are described below.
(none) - Displays all the configured member clusters
clustername - Member cluster name to be listed.
--suppressheader - Suppresses column headings from the output.
-l - Displays all details.
--file - Displays information on the contents of the Cluster
Manifest File.
</optDescription>
</command>
<command cmdName="chcc" noinstance="undef">
<synopsis>chcc <clustername> {--direct|--indirect}</synopsis>
<description>Modifies the configuration for a member cluster</description>
<seeAlso>mkcc rmcc lscc</seeAlso>
<exceptions/>
<example></example>
<options>clustername direct indirect</options>
<optDescription>
The options for chcc command are described below.
clustername - Member cluster name
direct - Direct storage access
indirect - Indirect storage access
</optDescription>
</command>
<command cmdName="lsqg" visible="true" wildcard="true">
<synopsis>lsqg [-G <diskgroup> ] [--quotagroup <quotagroup>] [--suppressheader]</synopsis>
<description>Lists the quota groups in a disk group.</description>
<seeAlso>mkqg rmqg chqg mvfg</seeAlso>
<exceptions/>
<example>The following are examples of the lsqg command.
The below example displays the properties of the quota group QG1 in
the DATA disk group.
ASMCMD [+] > lsqg -G DATA --quotagroup QG1
Used_Quota_MB Quota_Limit_MB
100 200
The below example lists all the quota groups in the DATA disk group
along with their properties.
ASMCMD [+] > lsqg -G DATA
Quotagroup_Num Quotagroup_Name Used_Quota_MB Quota_Limit_MB
1 GENERIC 12357 262143
2 QG1 100 200
3 QG2 400 420
The below example lists all the quota groups with name QG1 in all the
disk groups mounted by the current Oracle ASM instance.
ASMCMD [+] > lsqg --quotagroup QG1
Group_Num Quotagroup_Num Used_Quota_MB Quota_Limit_MB
1 2 100 200
3 5 821 1024
The below example lists all the quota groups in all the disk groups
mounted by the current Oracle ASM instance.
ASMCMD [+] > lsqg
Group_Num Quotagroup_Num Quotagroup_Name Used_Quota_MB Quota_Limit_MB
1 1 GENERIC 12357 262143
1 2 QG1 100 200
1 3 QG2 400 420
2 1 GENERIC 54000 262143
3 1 GENERIC 11 262143
3 5 QG1 821 1024
</example>
<options>G quotagroup suppressheader</options>
<optDescription>
The options for the lsqg command are described below.
-G diskgroup - Disk group name.
--quotagroup - Quota group name.
--suppressheader - Suppresses column headings from the output.
Information about quota groups is retrieved from the V$ASM_QUOTAGROUP
view.
</optDescription>
</command>
<command cmdName="mkqg" visible="true" wildcard="true">
<synopsis>mkqg -G <diskgroup> <quotagroup> [<property>] [<value>]</synopsis>
<description>Adds a quota group to the disk group.</description>
<seeAlso>rmqg chqg lsqg mvfg</seeAlso>
<exceptions/>
<example>The following are examples of the mkqg command. The first example
adds a quota group QG1 to the DATA disk group without specifying the
quota property. The quota limit of the quota group QG1 defaults to
UNLIMITED. The second example adds a quota group QG2 to the DATA disk
group explicitly specifying the quota property.
ASMCMD [+] > mkqg -G DATA QG1
ASMCMD [+] > mkqg -G DATA QG2 quota 100G
</example>
<options>G</options>
<optDescription>
The options for the mkqg command are described below.
-G diskgroup - Disk group name.
</optDescription>
</command>
<command cmdName="rmqg" visible="true" wildcard="true">
<synopsis>rmqg -G <diskgroup> <quotagroup></synopsis>
<description>Drops a quota group from the disk group.</description>
<seeAlso>mkqg chqg lsqg mvfg</seeAlso>
<exceptions/>
<example>The following is an example of the rmqg command. The quota group
QG1 is dropped from the DATA disk group.
ASMCMD [+] > rmqg -G DATA QG1
</example>
<options>G</options>
<optDescription>
The options for the rmqg command are described below.
-G diskgroup - Disk group name.
</optDescription>
</command>
<command cmdName="chqg" visible="true" wildcard="true">
<synopsis>chqg -G <diskgroup> <quotagroup> <property> <value></synopsis>
<description>Modifies a quota group in the disk group.</description>
<seeAlso>mkqg rmqg lsqg mvfg</seeAlso>
<exceptions/>
<example>The following are examples of the chqg command. The first example
modifies the quota property of the quota group QG1 in the DATA disk
group to 200G. The second example modifies the quota property of the
quota group QG2 in the DATA disk group to UNLIMITED.
ASMCMD [+] > chqg -G DATA QG1 quota 200G
ASMCMD [+] > chqg -G DATA QG2 quota UNLIMITED
</example>
<options>G</options>
<optDescription>
The options for the chqg command are described below.
-G diskgroup - Disk group name.
</optDescription>
</command>
<command cmdName="mapblk" visible="true">
<synopsis>mapblk [-l] [--suppressheader] <file> <block></synopsis>
<description>
This command displays where the specified file and block is located,
including device path and offset within disk.
The columns for mapblk command are described below.
Logic_Ext - ASM logical extent number.
0 is primary extent. 1 and 2 are secondary extents
Block_Size - Logical block size (in bytes)
Offset - Offset within ASM disk (in logical blocks)
Disk_Num - ASM disk number
Path - Device path of ASM disk
Disk_Name - ASM disk name
AU_Size - Allocation Unit size (in bytes)
File_Num - ASM file number
Ext_Num - ASM virtual Extent number
AU_Num - Allocation Unit number
</description>
<seeAlso/>
<exceptions/>
<example>
The following example of mapblk command is to display that datafile
+DATA/DB1/datafile/TBS1.256.863259515 block number 10 is located to
offset 2058 in logical blocks(8192 bytes) within /dev/sdd1 and
offset 4618 in logical blocks(8192 bytes) within /dev/sde1.
ASMCMD [+] > mapblk +DATA/DB1/datafile/TBS1.256.863259515 10
Logic_Ext Block_Size Offset Disk_Num Path
0 8192 2058 3 /dev/sdd1
1 8192 4618 4 /dev/sde1
</example>
<options>l suppressheader</options>
<optDescription> The options for mapblk command are described below.
(none) - Displays Logic_Ext, Block_Size, Offset, Disk_Num,
Path
-l - Displays extended information, including Disk_Name,
AU_Size, File_Num, Ext_Num, AU_Num
--suppressheader - Suppresses column header from the output
</optDescription>
</command>
<command cmdName="mkfg">
<synopsis>mkfg { <config_file.xml> | <'contents_of_xml_file'> }</synopsis>
<description>Creates a file group based on an XML configuration file.</description>
<seeAlso>rmfg chfg lsfg mvfile</seeAlso>
<exceptions/>
<example>
The following example shows the basic structure and the valid tags with
their respective attributes for the mkfg XML configuration file.
The root element of the config_file.xml file is the tag <filegroup> and
has the attributes listed bellow:
name - File Group name
dg - Disk Group name which the file group belongs to.
client_type - database, cluster, volume
client_name - database, CDB, PDB, cluster or volume name
It is possible to set properties using the <p> tag
name - Property name
value - Property value
file_type - property file type (optional)
template - ASM template name (optional)
The following is an example of an XML configuration file for mkfg.
<filegroup name="filegroup1" dg="dg_data1" client_type="database"
client_name="sample">
<p name="redundancy" value="mirror" />
</filegroup>
The configuration file creates a file group named 'filegroup1' on disk
group 'dg_data1' for a database named sample. The file group will be
associated to quota group 'quotagroup1'. The files in this file group
will have a mirror redundancy, except for the control file, which will
have a high redundancy. All other attributes will be set to the default
value.
The following are examples of the mkfg command. The first example invokes
mkfg using an XML configuration file in ASMCMD's work directory.
The second example executes mkfg using information from the command line
in XML format.
ASMCMD [+] > mkfg filegroup_config.xml
ASMCMD [+] > mkfg '<filegroup name="filegroup1" dg="dg_data1"
client_type="database" client_name="sample"></filegroup>'
</example>
<options />
<optDescription> The options for the mkfg command are described below.
config_file - Name of the XML file that contains the
configuration for the new file group.
mkfg searches for the XML file in the directory
where ASMCMD was started unless a path is specified.
contents_of_xml_file - The XML script enclosed in single quotes.
</optDescription>
</command>
<command cmdName="rmfg">
<!-- TODO: enable -r option once Bug 20951338 is fixed -->
<synopsis>rmfg <!-- [-r] --><diskgroup> <filegroup></synopsis>
<description>Removes an existing file group.</description>
<seeAlso>mkfg chfg lsfg mvfile</seeAlso>
<exceptions/>
<example>The following is an example to remove filegroup1 file group from
dg_data1 disk group. <!--The second example removes filegroup2 as well as its
contents-->
ASMCMD [+] > rmfg dg_data1 filegroup1
<!--ASMCMD [+] > rmfg -r dg_data1 filegroup2--></example>
<options><!-- r --></options>
<optDescription>
The options for the rmfg command are described below.
diskgroup - Disk group name that contains the file group to remove.
filegroup - Name of the file group to remove.
<!-- -r - Recursive, include contents. Removes all files in the disk
group that the file group contains at the same time the file
group is removed. You must specify this option in order to
remove a file group that contains any files. If you omit this
option and the file group is not empty, then ASM returns an
error and does not remove the file group.--></optDescription>
</command>
<command cmdName="chfg">
<synopsis>chfg { <config_file.xml> | <'contents_of_xml_file'> }</synopsis>
<description>Changes the attributes of a file group in a disk group based on an
XML configuration file.</description>
<seeAlso>mkfg rmfg lsfg mvfile</seeAlso>
<exceptions/>
<example>The following example shows the basic structure and the valid tags with
their respective attributes for the chfg XML configuration file.
The root element of the config_file.xml file is the <filegroup> tag and
has the attributes listed bellow:
name - File Group name
dg - Disk Group name which the file group belongs to.
It is possible to set properties using the <p> tag
name - Property name
value - Property value
file_type - property file type (optional)
template - ASM template name (optional)
The following is an example of an XML configuration file for chfg.
<filegroup name="filegroup1" dg="dg_data1">
<p name="redundancy" value="mirror" />
<p name="redundancy" value="high" file_type="controlfile" />
<p name="quota_group" value="quotagroup1" />
</filegroup>
The following is an example of the chfg command with configuration file
or configuration information on the command line.
ASMCMD [+] > chfg config_file.xml
ASMCMD [+] > chfg '<filegroup name="filegroup1" dg="dg_data1">
<p name="redundancy" value="high" />
</filegroup>'
</example>
<options />
<optDescription>
The options for the chfg command are described below:
config_file - Name of the XML file that contains the changes
for the file group. chfg searches the XML file
in the ASMCMD's current work directory unless a
path is specified.
contents_of_xml_file - The XML script enclosed in single quotes.
</optDescription>
</command>
<command cmdName="lsfg">
<synopsis>lsfg [-G <diskgroup>] [--filegroup <filegroup>] [--suppressheader]</synopsis>
<description>List file groups in a disk group. If file group option is set,
then lsfg returns only information about that file group.</description>
<seeAlso>mkfg chfg rmfg mvfile</seeAlso>
<exceptions/>
<example>The following are examples of the lsfg command.
The below example displays all the file groups in all the mounted disk
groups
ASMCMD [+] > lsfg
File Group Disk Group Quota Group Client Name Client Type
DEFAULT_FILEGROUP DATA GENERIC
DEFAULT_FILEGROUP CONTROL GENERIC
FG1 DATA GENERIC FG1 DATABASE
FG1 CONTROL GENERIC FG1 DATABASE
FG2 DATA GENERIC FG2 VOLUME
FG3 DATA GENERIC FG3 CLUSTER
The below example displays all the file groups in disk group DATA
ASMCMD [+] > lsfg -G DATA
File Group Disk Group Quota Group Client Name Client Type
DEFAULT_FILEGROUP DATA GENERIC
FG1 DATA GENERIC FG1 DATABASE
FG2 DATA GENERIC FG2 VOLUME
FG3 DATA GENERIC FG3 CLUSTER
The below example displays the properties of the filegroup FG1 in
the DATA diskgroup.
ASMCMD [+] > lsfg -G DATA --filegroup FG1
File Group Disk Group Property Value File Type
FG1 DATA PRIORITY MEDIUM
FG1 DATA REDUNDANCY MIRROR CONTAINER
FG1 DATA REDUNDANCY MIRROR KEY_STORE
FG1 DATA REDUNDANCY MIRROR INCR XTRANSPORT BACKUPSET
FG1 DATA REDUNDANCY MIRROR AUDIT_SPILLFILES
FG1 DATA REDUNDANCY MIRROR XTRANSPORT BACKUPSET
FG1 DATA REDUNDANCY MIRROR ASMPARAMETERBAKFILE
FG1 DATA REDUNDANCY MIRROR FLASHFILE
FG1 DATA REDUNDANCY MIRROR ASMPARAMETERFILE
FG1 DATA REDUNDANCY MIRROR OCRBACKUP
FG1 DATA REDUNDANCY MIRROR ASMVDRL
FG1 DATA REDUNDANCY MIRROR ASMVOL
FG1 DATA REDUNDANCY MIRROR OCRFILE
FG1 DATA REDUNDANCY MIRROR VOTINGFILE
FG1 DATA REDUNDANCY MIRROR AUTOBACKUP
FG1 DATA REDUNDANCY MIRROR DUMPSET
FG1 DATA REDUNDANCY MIRROR FLASHBACK
FG1 DATA REDUNDANCY MIRROR CHANGETRACKING
FG1 DATA REDUNDANCY MIRROR DATAGUARDCONFIG
FG1 DATA REDUNDANCY MIRROR PARAMETERFILE
FG1 DATA REDUNDANCY MIRROR BACKUPSET
FG1 DATA REDUNDANCY MIRROR TEMPFILE
FG1 DATA REDUNDANCY MIRROR ARCHIVELOG
FG1 DATA REDUNDANCY MIRROR ONLINELOG
FG1 DATA REDUNDANCY MIRROR DATAFILE
FG1 DATA STRIPING FINE CONTROLFILE
FG1 DATA REDUNDANCY HIGH CONTROLFILE
FG1 DATA STRIPING COARSE
FG1 DATA REDUNDANCY MIRROR AUTOLOGIN_KEY_STORE
</example>
<options>G filegroup suppressheader</options>
<optDescription> The options for the lsfg command are described below.
-G <diskgroup> - Disk group name
--filegroup <filegroup> - File group name
--suppressheader - Suppresses column headings from the output
The information about filegroups is retrieved from V$ASM_FILEGROUP and
V$ASM_FILEGROUP_PROPERTY views
</optDescription>
</command>
<command cmdName="mvfile" visible="true">
<synopsis>mvfile <file> -G <diskgroup> --filegroup <filegroup>
</synopsis>
<description>Moves a file to the specified file group</description>
<seeAlso>mkfg chfg lsfg rmfg</seeAlso>
<exceptions />
<example>The following are examples of the mvfile command.
The below example moves the file 'F1' in disk group 'DATA' to file
group 'FG1'
ASMCMD [+DATA] > mvfile F1 -G DATA --filegroup FG1
</example>
<options>G filegroup</options>
<optDescription> The options for the mvfile command are described below.
-G <diskgroup> - Disk group name
--filegroup <filegroup> - File group name
</optDescription>
</command>
<command cmdName="mvfg" visible="true" wildcard="true">
<synopsis>mvfg -G <diskgroup> --filegroup <filegroup> <quotagroup></synopsis>
<description>Moves a file group in a disk group to the specified quota group.</description>
<seeAlso>mkqg rmqg chqg lsqg</seeAlso>
<exceptions/>
<example>The following is an example of the mvfg command. The file group
FG1 in the DATA disk group is moved to the quota group QG1.
ASMCMD [+] > mvfg -G DATA --filegroup FG1 QG1
</example>
<options>G filegroup</options>
<optDescription>
The options for the mvfg command are described below.
-G diskgroup - Disk group name.
--filegroup - File group name.
</optDescription>
</command>
<command cmdName="stamp" visible="true">
<synopsis>stamp --dscstr <disk string> {[--site <site name>] [--failgroup <failgroup name>] [--disk <disk label>]} [-f]</synopsis>
<description> Stamps the disk, site and failure group labels in disk headers.</description>
<seeAlso>stamplist</seeAlso>
<exceptions/>
<example>The following example shows how to stamp the site name, failure group and disk labels:
ASMCMD [+] > stamp --dscstr "/dev/sd*" --site "SALTLAKE-CENTER" --failgroup "fg1" --disk "DISK1"
</example>
<options>dscstr site failgroup disk f</options>
<optDescription>The options for the stamp command are described below.
--dscstr - Disk discovery string
--site - Site label to stamp. If provided, failure group is required
--failgroup - Failure group label to stamp
--disk - Disk label to stamp
-f - Force
</optDescription>
</command>
<command cmdName="stamplist" visible="true">
<synopsis>stamplist --dscstr <disk string> {[--site] [--failgroup] [--disk]}</synopsis>
<description>Displays the disk, site and failure group labels in disk headers.</description>
<seeAlso>stamp</seeAlso>
<exceptions/>
<example>The following example shows how to display the labels:
ASMCMD [+] > stamplist --dscstr "/dev/sd*" --site --failgroup --disk
</example>
<options>dscstr site failgroup disk</options>
<optDescription>The options for the stamplist command are described below.
--dscstr - Disk discovery string
--site - Display site label
--failgroup - Display failure group label
--disk - Display disk label
</optDescription>
</command>
<command cmdName="chblk" visible="true">
<synopsis>chblk --recovered --file <file> { --all | --block <block> --len <len> }</synopsis>
<description>
This command marks a <file, block, len> entry in the Bad File
Directory as recovered.
It can also be used to indicate that the entire file is recovered.
The --recovered option deletes the corresponding entries from the Bad
File Directory.
</description>
<seeAlso/>
<exceptions/>
<example>The following example shows how to indicate that a bad block has
been recovered:
ASMCMD [+] > chblk --recovered --file '+DG1/f' --block 512 --len 256
This example shows how to indicate that all the blocks in the file are
recovered:
ASMCMD [+] > chblk --file '+DG1/f' --all
</example>
<options>recovered file block len all</options>
<optDescription>The options for the chblk command are described below.
--recovered - blocks of the file are recovered, entries are deleted from
the Bad File Directory
--file - File for which blocks are recovered
--block - Application block number of the block.
--len - Length in number of blocks.
--all - Recover all bad blocks in the specified file.
</optDescription>
</command>
<command cmdName="lsblk" visible="true">
<synopsis>lsblk [-G <diskgroup>] --lost</synopsis>
<description>
This command lists information about the blocks that are lost
in the specified diskgroup.
</description>
<seeAlso/>
<exceptions/>
<example>The following example shows how to list lost blocks from the
Bad File directory:
ASMCMD [+] > lsblk -G DG1 --lost
Group_Num File_Num Incarnation Extent_Num Offset Length_blks Ablkno
1 261 902777027 2 0 128 1024
1 262 902777035 0 0 128 0
</example>
<options>G lost</options>
<optDescription>The options for lsblk command are described below:
-G diskgroup - Lists blocks in the specified diskgroup
--lost - Lists lost blocks
</optDescription>
</command>
</commands>
OHA YOOOO