ASMCMD Commands For Oracle ASM Management
ASMCMD Commands For Oracle ASM Management
ASMCMD Commands For Oracle ASM Management
Asfaw Gedamu
B. Purpose:
• Manage ASM instances, disks, and disk groups.
• Perform routine maintenance tasks like adding/removing disks, resizing disk groups, and
monitoring performance.
• Troubleshoot ASM-related issues and identify potential problems.
C. Prerequisites:
• Access to an Oracle ASM instance with asmcmd installed.
• Basic understanding of ASM concepts and terminology.
• Privileged user account with appropriate permissions.
D. Best Practices:
• Always backup your ASM configuration before making significant changes.
• Test commands in a non-production environment before applying them to a production
system.
• Use asmcmd help for detailed information and syntax of specific commands.
• Consult the Oracle documentation for advanced usage and troubleshooting.
Now, to the list of useful asmcmd commands which will come handy in your day to day
operations.
ASMCMD> lsdg
ASMCMD> lsdsk -k
4. unmount diskgroup:
unmount command works only on the local node. So if you want to unmount the diskgroup from
all nodes of cluster, then run this command from all the nodes
Mount command works only on the local node. So if you want to Mount the diskgroup from all
nodes of cluster, then run this command from all the nodes.
5. Rebalance a diskgroup:
-- Monitor progress
ASMCMD> lsop
Group_Name Pass State Power EST_WORK EST_RATE EST_TIME
ARCH COMPACT RUN 8 0 16831 0
ARCH REBALANCE DONE 8 0 0 0
ASMCMD> showclustermode
ASM cluster : Flex mode disabled
ASMCMD> showclusterstate
Normal
ASMCMD> showversion
ASM version : 12.1.0.2.0
ASMCMD> spget
+MGMT/DBACLASS-cluster/ASMPARAMETERFILE/registry.253.899644763
ASMCMD> dsget
parameter:ORCL:*
profile:ORCL:*
ASMCMD> lspwusr
Username sysdba sysoper sysasm
SYS TRUE TRUE TRUE
ASMSNMP TRUE FALSE FALSE
ASMCMD>lsof -G ARCH
ASMCMD> afd_state
ASMCMD-9526: The AFD state is 'NOT INSTALLED' and filtering is 'DEFAULT' on host
'b20e4bay01'
ASMCMD> afd_lsdsk
22. Get filter driver asm diskstring
ASMCMD> afd_dsget
AFD discovery string:
F. Conclusion:
By utilizing asmcmd effectively, you can efficiently manage your Oracle ASM environment,
ensuring optimal performance and data integrity. Remember to approach changes cautiously,
leverage available resources, and prioritize data protection. Additional Notes:
• This SOP provides a basic overview. For comprehensive information, refer to the official
Oracle ASM documentation.
• Consider including specific examples and use cases relevant to your environment for a
more practical guide.
• Regularly update the SOP to reflect changes in asmcmd functionality and best practices.