ASMCMD Quick Reference Guide
ASMCMD Quick Reference Guide
ASMCMD Quick Reference Guide
ASMCMD> help
asmcmd [-p] [command]
[command] specifies one of the following commands, along with its parameters.
commands:
--------
cd Changement de répertoire
du Affiche l’espace disque utilisé par les fichiers du répertoire
find Trouve les chemins absolus de tous les patterns dans un répertoire
help Affiche l’aide
ls Liste le contenu du répertoire
lsct Liste tous les clients ASM et leurs attributs
lsdg Liste les diskgroup et affiche leurs détails
mkalias Crée un alias pour un fichier
mkdir Crée un répertoire
pwd Affiche le chemin absolu où l’on se trouve
rm Supprime un répertoire ou un fichier. Attention à l’option –r
rmalias Supprime un alias. Attention à l’option -r
----------------------
cd <dir>
du [-H] [dir]
Display total space used for files located recursively under [dir], similar to "du -s"
under UNIX; default is the current directory. Two values are returned, both in
units of megabytes. The first value does not take into account mirroring of the
diskgroup while the second does. For instance, if a file occupies 100 MB of
space, then it actually takes up 200 MB of space on a normal redundancy
diskgroup and 300 MB of space on a high redundancy diskgroup.
Find the absolute paths of all occurrences of <pattern> under <dir>. <pattern>
can be a directory and may include wildcards. <dir> may also include
wildcards. Note that directory names in the results have the "/" suffix to
clarify their identity.
The -t option allows searching by file type. For instance, one can search for all
the control files at once. <type> must be one of the valid values in
V$ASM_FILE.TYPE.
help [command]
ls [-lsdrtLaH] [name]
-l V$ASM_ALIAS.NAME, V$ASM_ALIAS.SYSTEM_CREATED;
V$ASM_FILE.TYPE, V$ASM_FILE.REDUNDANCY,
V$ASM_FILE.STRIPED, V$ASM_FILE.MODIFICATION_DATE
-s V$ASM_ALIAS.NAME;
V$ASM_FILE.BLOCK_SIZE, V$ASM_FILE.BLOCKS,
V$ASM_FILE.BYTES, V$ASM_FILE.SPACE
If the user specifies both flags, then the command shows an union of their
attributes, with duplicates removed.
Note that "ls +" would return information on all diskgroups, including whether
they are mounted.
Not all possible file attributes or disk group attributes are included.
To view the complete set of attributes for a file or a disk group, query the
V$ASM_FILE and V$ASM_DISKGROUP views.
List all clients and their attributes from V$ASM_CLIENT. If group is specified, then
return only information on that group.
Not all possible disk group attributes are included. To view the complete set of
attributes for a disk group, query the V$ASM_DISKGROUP view.
Create the specified <alias> for the <filename>. A user-defined alias must reside
in the same diskgroup as the system-created filename, and only one user-defined
alias is permitted per file. The SQL equivalent is ALTER DISKGROUP <dg_name>
ADD ALIAS <alias> FOR <filename>.
pwd
Display the absolute path of the ASMCMD current directory. Note that this current
directory is not to be confused with the current directory maintained by the
operating system, if any.
If using a wildcard, then rm deletes all matches with the exception of system-
created directories and non-empty directories.
If using the -r flag, then all entries under the specified <nameN> are deleted
recursively. Note that rm does not specifically issue the DROP DIRECTORY SQL
command to drop system-created directories. However, these are removed
automatically by ASM once they are empty.
If using the -r flag or wildcard matching, then rm prompts the user to confirm the
deletion before proceeding, unless the user also specifies the -f flag.
Delete the specified user-defined aliases, while preserving the files and their
system-created filenames. The SQL equivalent is ALTER DISKGROUP <dg_name>
DROP ALIAS <alias>. Note that if the -r flag is specified, then rmalias uses
ALTER DISKGROUP <dg_name> DROP DIRECTORY <dir> FORCE to delete a
user-defined directory recursively. This action also removes all user-defined
subdirectories and user-defined aliases beneath it. System-created filenames and
system-created directories cannot be removed this way.
oracleasm