{"id":3833,"date":"2025-06-09T11:46:02","date_gmt":"2025-06-09T11:46:02","guid":{"rendered":"https:\/\/w3buddy.com\/?post_type=cposts&#038;p=3833"},"modified":"2025-06-09T11:46:03","modified_gmt":"2025-06-09T11:46:03","slug":"asmcmd-commands-for-oracle-asm","status":"publish","type":"cposts","link":"https:\/\/w3buddy.com\/blog\/notes\/oracle-dba-d2d-tasks\/asmcmd-commands-for-oracle-asm\/","title":{"rendered":"ASMCMD Commands for Oracle ASM"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">ASMCMD (Automatic Storage Management Command-Line Interface) is used to manage ASM disk groups, disks, instances, and configurations. Below are essential commands categorized by their functions.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">General ASM Operations<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>lsdg                          -- List all ASM disk groups\nlsdg --discovery              -- List all (mounted\/dismounted) disk groups\nlsdg -g --discovery           -- List disk groups across all nodes\nlsdsk -k                      -- Show all ASM disks with total\/free space<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Disk &amp; Disk Group Management<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>lsdsk -k -G &lt;group>           -- List disks in a specific disk group\nlsdsk -t -G &lt;group>           -- Show disk creation timestamps\nlsdsk --candidate -k          -- List candidate (unused) ASM disks\n\numount -a                     -- Unmount all disk groups\numount &lt;group>                -- Unmount specific disk group\nmount -a                      -- Mount all disk groups\nmount &lt;group>                 -- Mount specific disk group<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Disk Group Attributes<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>lsattr -lm                    -- List all disk group attributes\nlsattr -lm -G &lt;group>         -- Show attributes for a specific group\nlsattr -lm %&lt;pattern>%        -- Filter attributes by name pattern<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Rebalance Operations<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>rebal --power &lt;n> &lt;group>     -- Rebalance disk group with power limit\nlsop                          -- Show rebalance operation progress<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Password Files &amp; Templates<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>pwget --dbuniquename &lt;db>     -- Get password file for a database\npwget --asm                   -- Get ASM instance password file\nlstmpl -l -G &lt;group>          -- Show templates for a disk group<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">ASM Cluster &amp; Configuration<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>showclustermode               -- Check if Flex ASM is enabled\nshowclusterstate              -- Show ASM cluster state\nshowversion                   -- Display ASM software version\nspget                         -- Show ASM SPFILE location\nspbackup &lt;src> &lt;dest>         -- Backup ASM SPFILE to given path<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Advanced Utilities<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>lsof -G &lt;group>               -- List open files in a disk group\nlsof --dbname &lt;db>            -- List open files for a database\nafd_state                     -- Check ASM Filter Driver state\nafd_lsdsk                     -- List AFD-managed disks (if enabled)<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>ASMCMD (Automatic Storage Management Command-Line Interface) is used to manage ASM disk groups, disks, instances, and configurations. Below are essential commands categorized by their functions. General ASM Operations Disk &amp; Disk Group Management Disk Group Attributes Rebalance Operations Password Files &amp; Templates ASM Cluster &amp; Configuration Advanced Utilities<\/p>\n","protected":false},"template":"","meta":{"googlesitekit_rrm_CAowu461DA:productID":""},"categories":[952,984],"class_list":["post-3833","cposts","type-cposts","status-publish","hentry","category-notes","category-oracle-dba-d2d-tasks"],"_links":{"self":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/cposts\/3833","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/cposts"}],"about":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/types\/cposts"}],"wp:attachment":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/media?parent=3833"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/categories?post=3833"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}