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.


posted on   love so much  阅读(312)  评论(0编辑  收藏  举报

编辑推荐:
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
阅读排行:
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 地球OL攻略 —— 某应届生求职总结
· 提示词工程——AI应用必不可少的技术
· Open-Sora 2.0 重磅开源!
· 周边上新:园子的第一款马克杯温暖上架
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示