How can I get the logical valume by the datafile names and ASM disks?

本文介绍如何在Oracle RAC 11.2.0.3环境中使用ASM库创建ASM磁盘,并提供了通过数据文件名和ASM磁盘来获取逻辑卷的方法。详细步骤包括查询V$ASM_DISKGROUP和V$ASM_DISK视图来确定设备名称,以及如何通过这些信息定位到具体的磁盘路径。
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.


评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值