ASM Configuration Assistant(ASMCA) commands in Oracle

ASM Configuration Assistant ASMCA commands in Oracle

Check version of ASMCMD

-- Check ASM version
$asmcmd -V
asmcmd version

-- Check patch version
ASMCMD [+] > showversion --active
Oracle ASM active version on the cluster is []. The cluster upgrade state
is [NORMAL]. The cluster active patch level is [0].

--Check the attribute of data diskgroup
ASMCMD [+] > lsattr -lm -G data
-l display name with value
-m add additiona value

General ASMCMD commands

--List the directory

--Make the directory
ASMCMD> mkdir +data/orcl/mydir

--Change directory
ASMCMD [+] > cd data/orcl
ASMCMD [+data/orcl] >

--Lists mounted disk groups and their information
ASMCMD [+] > lsdg data

-- List oracle ASM disk
ASMCMD [+] > lsdsk -t -G data

Configure and Manage the ASM instance with ASMCA

-- Create the ASM instance
asmca -silent
-diskString '/devices/disk*'
–sysAsmPassword my_sysasm_password
-asmsnmpPassword my_asmsnmp_passwd

-- configure the parameter of ASM instance
asmca -silent
–sysAsmPassword my_sysasm_password

--Delete the ASM instance
asmca -silent
–sysAsmPassword my_sysasm_password

List the operation going on disk
displays information from the V$ASM_OPERATION view

ASMCMD [+] > lsop
Group_Name Dsk_Num State Power

Manage the Diskgroup and disk with ASMCA

-- Create the diskgroup
asmca -silent -createDiskGroup
-diskGroupName mynewdg
-disk '/devices/diske*'
-disk '/devices/diskk*'
-redundancy NORMAL
-au_size 64
-compatible.asm ''
-compatible.rdbms ''
-compatible.advm '

-- Add disk to diskGroup
asmca -silent
-diskGroupName mynewdg
-disk '/devices/diskl1'
-disk '/devices/diskl2'

-- Edit the diskgroup attribute
asmca -silent
(-diskGroupName disk_group)
(-attribute value)

--Check ASM Disk Attribute
ASMCMD +> lsattr

--Set the ASM Attribute
ASMCMD +>setattr

-- Create the diskgroup
Creates a disk group based on an XML configuration file.

--Drop the diskGroup
ASMCMD [+] > dropdg -r -f dat
-f force option
-r recursive like linux

-- For altering the disk group
ASMCMD +> chdg

--Rename the disk-group
renamedg dgname=fra1 newdgname=fra2 asm_diskstring='/devices/disk*' verbose=true

Handle file group or Quota group
ASMCA also supports commands to manage and track file and quota groups. These commands include:

-- create the filegroup
asmca -silent
(-diskGroupName disk_group)
(-fileGroupNames file_group_name_list)
(-fileGroupUsages file_group_usages_list)
(-fileGroupUsageIDs file_group_usagesID_list)

--Drop fileGroup
asmca -silent
(-diskGroupName disk_group)
(-fileGroupNames file_group_name_list)

--Create quota
asmca -silent
(-diskGroupName disk_group)
(-quotaGroupNames quota_group_name_list)
(-quotaGroupSizes quota_group_size_list)

--Drop quota
asmca -silent
(-diskGroupName disk_group)
(-quotaGroupNames quota_group_names_list)

--modify a file group or quota group
chfg and chqg

--list file groups or quota groups
lsfg and lsqg

--create a file group or quota group
mkfg and mkqg

-- Delete a file group or quota group
rmfg and rmqg

--to move a file group

Managing the ADVM Volume

-- Create volume in DATA diskgroup
ASMCMD [+] > volcreate -G data -s 10G --width 1M --column 8 volume1

-- Check the list of volume
ASMCMD [+] > volinfo -G data volume1

-- List all volume in specific disk -a option
ASMCMD [+] > volinfo -G data -a

-- Delete the Volume
ASMCMD [+] > voldelete -G diskgroup volume

-- Disable the volume
ASMCMD [+] > voldisable -G diskgroup volume

-- Enable the volume
ASMCMD [+] > volenable -G diskgroup volume

--Resize operation on volume
ASMCMD [+] > volresize -G data -s 20G volume1


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.