zoukankan      html  css  js  c++  java
  • How can I get the logical valume by the datafile names and ASM disks?

    Q:We use asmlib to create ASM disk in Oracle rac 11.2.0.3,
    and how can I get the logical valume by the datafile names and ASM disks?


    A:
     Datafiles were spread across in all the MEMBER disks of a diskgroup. To find out the device name, please check the below example:
    We will take DG_01 diskgroup to find out the related device names:

    SQL>select * from v$asm_diskgroup;
    GROUP_NUMBER NAME SECTOR_SIZE BLOCK_SIZE ALLOCATION_UNIT_SIZE STATE TYPE TOTAL_MB FREE_MB
    1 DG_01 512 4096 1048576 MOUNTED EXTERN 307200 264975

    SQL>SELECT * FROM V$ASM_DISK ORDER BY GROUP_NUMBER,DISK_NUMBER;
    GROUP_NUMBER DISK_NUMBER COMPOUND_INDEX INCARNATION MOUNT_S HEADER_STATU MODE_ST STATE REDUNDA LIBRARY OS_MB TOTAL_MB FREE_MB PATH
    1 0 16777216 3541212914 CACHED MEMBER ONLINE NORMAL UNKNOWN ASM Library - Generic Linux, version 2.0.4 (KABI_V2) 102400 102400 ORCL:DG_01_DISK_01
    1 1 16777217 3541212915 CACHED MEMBER ONLINE NORMAL UNKNOWN ASM Library - Generic Linux, version 2.0.4 (KABI_V2) 102400 102400 ORCL:DG_01_DISK_02
    1 2 16777218 3541212916 CACHED MEMBER ONLINE NORMAL UNKNOWN ASM Library - Generic Linux, version 2.0.4 (KABI_V2) 102400 102400 ORCL:DG_01_DISK_03


    DG_01 were having below MEMBER disks[select * from v$asm_disk]
    ORCL:DG_01_DISK_01
    ORCL:DG_01_DISK_02
    ORCL:DG_01_DISK_03


    Listing of the above disk as below:[$ls -l /dev/oracleasm/disks/*]
    brw-rw---- 1 oracle dba 252, 0 Feb 12 11:23 /dev/oracleasm/disks/DG_01_DISK_01<<<<<<<<<<<<<<Device with major# as 252 and minor# as 0
    brw-rw---- 1 oracle dba 252, 1 Feb 12 11:24 /dev/oracleasm/disks/DG_01_DISK_02
    brw-rw---- 1 oracle dba 252, 2 Feb 12 11:25 /dev/oracleasm/disks/DG_01_DISK_03

    Corresponding multipath devices for the above disks were[$cat /proc/partitions]
    252 0 104857600 dm-0
    252 1 104857600 dm-1
    252 2 104857600 dm-2
    The above devices were resolves to more than one path to sd* devices, by this way we can find out the device names.
    Files which were stored in diskgroup DG_01 were spread across all the 3 devices i.e 1M of data will gets spread across the MEMBER disks and not at the datafile level.


  • 相关阅读:
    【BZOJ4318】OSU! 期望DP
    【BZOJ2956】模积和 分块
    【BZOJ4443】[Scoi2015]小凸玩矩阵 二分+二分图最大匹配
    【BZOJ2253】[2010 Beijing wc]纸箱堆叠 cdq分治
    【BZOJ3555】[Ctsc2014]企鹅QQ hash
    【BZOJ3238】[Ahoi2013]差异 后缀数组+单调栈
    【BZOJ2287】【POJ Challenge】消失之物 背包动规
    【BZOJ4517】[Sdoi2016]排列计数 组合数+错排
    【BZOJ4551】[Tjoi2016&Heoi2016]树 并查集
    【BZOJ2783】[JLOI2012]树 DFS+栈+队列
  • 原文地址:https://www.cnblogs.com/riasky/p/3509174.html
Copyright © 2011-2022 走看看