Thinking Out Loud

October 8, 2017

Playing with asmcmd

Filed under: ASM — mdinh @ 2:29 am

ASMCMD Disk Group Management Commands (11.2)

asmcmd -V
asmcmd version 11.2.0.4.0

asmcmd lsdg
State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  EXTERN  N         512   4096  4194304     10236    10148                0           10148              0             N  CRS/
MOUNTED  EXTERN  N         512   4096  4194304     20472    18612                0           18612              0             N  DATA/
MOUNTED  EXTERN  N         512   4096  4194304     30708    30264                0           30264              0             N  FRA/

asmcmd lsdsk
Path
/dev/oracle/crs01
/dev/oracle/data01
/dev/oracle/data02
/dev/oracle/fra01
/dev/oracle/fra02
/dev/oracle/fra03

asmcmd lsdsk -G DATA
Path
/dev/oracle/data01
/dev/oracle/data02

asmcmd lsattr -G DATA -l
Name                     Value
access_control.enabled   FALSE
access_control.umask     066
au_size                  4194304
cell.smart_scan_capable  FALSE
compatible.asm           11.2.0.4.0
compatible.rdbms         11.2.0.4.0
content.type             data
disk_repair_time         3.6h
idp.boundary             auto
idp.type                 dynamic
sector_size              512

asmcmd lsattr -G FRA -l
Name                     Value
access_control.enabled   FALSE
access_control.umask     066
au_size                  4194304
cell.smart_scan_capable  FALSE
compatible.asm           11.2.0.4.0
compatible.rdbms         11.2.0.4.0
content.type             data
disk_repair_time         3.6h
idp.boundary             auto
idp.type                 dynamic
sector_size              512

asmcmd setattr -G FRA compatible.asm 11.2.0.4
asmcmd setattr -G FRA compatible.rdbms 11.2.0.4

asmcmd spget
+CRS/asm/asmparameterfile/registry.253.956737501

asmcmd iostat -G DATA -t
Group_Name  Dsk_Name   Reads      Writes     Read_Time   Write_Time
DATA        DATA_0000  253212160  101387776  260.330309  13325.418821
DATA        DATA_0001  178841088  27744256   209.972386  152.957184

--io Displays information in number of I/Os, instead of bytes.
asmcmd iostat -G DATA -t --io
Group_Name  Dsk_Name   Reads  Writes  Read_Time   Write_Time
DATA        DATA_0000  16354  8570    260.792741  13331.596792
DATA        DATA_0001  11496  1650    209.973173  152.957184

asmcmd iostat -G DATA -t --io --region
Group_Name  Dsk_Name   Reads  Writes  Cold_Reads  Cold_Writes  Hot_Reads  Hot_Writes  Read_Time   Write_Time
DATA        DATA_0000  16357  8572    16315       5028         0          0           260.793019  13334.818434
DATA        DATA_0001  11497  1650    11436       1645         0          0           209.973268  152.957184

asmcmd lsof -G DATA
DB_Name  Instance_Name  Path
orclcdb  orclcdb        +data/orclcdb/controlfile/current.260.956739025
orclcdb  orclcdb        +data/orclcdb/datafile/sysaux.257.956738871
orclcdb  orclcdb        +data/orclcdb/datafile/system.256.956738871
orclcdb  orclcdb        +data/orclcdb/datafile/undotbs1.258.956738873
orclcdb  orclcdb        +data/orclcdb/datafile/users.259.956738873
orclcdb  orclcdb        +data/orclcdb/onlinelog/group_1.261.956739029
orclcdb  orclcdb        +data/orclcdb/onlinelog/group_2.262.956739055
orclcdb  orclcdb        +data/orclcdb/onlinelog/group_3.263.956739083
orclcdb  orclcdb        +data/orclcdb/tempfile/temp.264.956739127

asmcmd lsdsk -p
Group_Num  Disk_Num      Incarn  Mount_Stat  Header_Stat  Mode_Stat  State   Path
        1         0  2224473673  CACHED      MEMBER       ONLINE     NORMAL  /dev/DATA01
        2         0  2224473709  CACHED      MEMBER       ONLINE     NORMAL  /dev/FRA01
        3         0  2224473744  CACHED      MEMBER       ONLINE     NORMAL  /dev/REDO01
        4         0  2224473966  CACHED      MEMBER       ONLINE     NORMAL  /dev/asm/BKP01
        1         1  2224473769  CACHED      MEMBER       ONLINE     NORMAL  /dev/asm/DATA02SAND
        2         1  2224473786  CACHED      MEMBER       ONLINE     NORMAL  /dev/asm/FRA02SAND

asmcmd lsdsk -k -G BACKUP
Total_MB  Free_MB    OS_MB  Name         Failgroup    Failgroup_Type  Library  Label  UDID  Product  Redund   Path
 2097150   963087  2097150  BACKUP_0000  BACKUP_0000  REGULAR         System                         UNKNOWN  /dev/BKP01
 2097150   963101  2097150  BACKUP_0001  BACKUP_0001  REGULAR         System                         UNKNOWN  /dev/BKP02
 2097150   963124  2097150  BACKUP_0002  BACKUP_0002  REGULAR         System                         UNKNOWN  /dev/BKP06
 2097150   963111  2097150  BACKUP_0007  BACKUP_0007  REGULAR         System                         UNKNOWN  /dev/BKP08
 1048575   481509  1048575  BACKUP_0004  BACKUP_0004  REGULAR         System                         UNKNOWN  /dev/BKP10
 1048575   481494  1048575  BACKUP_0005  BACKUP_0005  REGULAR         System                         UNKNOWN  /dev/BKP11
 2097150   963096  2097150  BACKUP_0008  BACKUP_0008  REGULAR         System                         UNKNOWN  /dev/BKP12

asmcmd lsdsk -k -G XXXXXXXX_NEWDATA01
Total_MB  Free_MB    OS_MB  Name                     Failgroup                Failgroup_Type  Library  Label  UDID  Product  Redund   Path
 1945598    97725  1945598  XXXXXXXX_NEWDATA01_0000  XXXXXXXX_NEWDATA01_0000  REGULAR         System                         UNKNOWN  /dev/oracleasm/disks/NEWDATA01
 1945598    98333  1945598  XXXXXXXX_NEWDATA01_0001  XXXXXXXX_NEWDATA01_0001  REGULAR         System                         UNKNOWN  /dev/oracleasm/disks/NEWDATA02
 1945598    95022  1945598  XXXXXXXX_NEWDATA01_0002  XXXXXXXX_NEWDATA01_0002  REGULAR         System                         UNKNOWN  /dev/oracleasm/disks/NEWDATA03

oracle@db-asm-1:+ASM:/home/oracle
> ps -ef|grep pmon
oracle   15831     1  0 02:22 ?        00:00:00 asm_pmon_+ASM
oracle   16030     1  0 02:22 ?        00:00:00 ora_pmon_orclcdb
oracle   16330 11101  0 02:24 pts/3    00:00:00 grep pmon

oracle@db-asm-1:+ASM:/home/oracle
> . oraenv <<< orclcdb 
ORACLE_SID = [+ASM] ? The Oracle base remains unchanged with value /u01/app/oracle 

oracle@db-asm-1:orclcdb:/home/oracle 
> srvctl config database
orclcdb

oracle@db-asm-1:orclcdb:/home/oracle
> srvctl stop database -d orclcdb -o immediate

oracle@db-asm-1:orclcdb:/home/oracle
> ps -ef|grep pmon
oracle   15831     1  0 02:22 ?        00:00:00 asm_pmon_+ASM
oracle   16695 11101  0 02:25 pts/3    00:00:00 grep pmon

oracle@db-asm-1:orclcdb:/home/oracle
> . oraenv <<< +ASM
ORACLE_SID = [orclcdb] ? The Oracle base remains unchanged with value /u01/app/oracle

oracle@db-asm-1:+ASM:/home/oracle 
> asmcmd lsof -G DATA
DB_Name  Instance_Name  Path
oracle@db-asm-1:+ASM:/home/oracle
>

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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.

Create a free website or blog at WordPress.com.

%d bloggers like this: