Home » Server Options » RAC & Failsafe » How to find block device from oracleasm disk? (oracle_11gR2, Redhat_x64)
How to find block device from oracleasm disk? [message #676679] Wed, 03 July 2019 11:26 Go to next message
kalenko
Messages: 40
Registered: January 2018
Member
Hi,

I use oracleasm to create disk for the ASM instance:
/dev/sdc1 --> DATA_001
/dev/sdd1 --> DATA_002
...
And there are so many disks like that.
Please tell me how to find exactly which block device (/dev/sdxx) maps to a given disk (DATA_xxx)?

Thanks

[Updated on: Wed, 03 July 2019 12:19]

Report message to a moderator

Re: How to query oracleasm disk for block device? [message #676682 is a reply to message #676679] Wed, 03 July 2019 12:22 Go to previous messageGo to next message
Michel Cadot
Messages: 68718
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
SQL> desc V$ASM_DISK
 Name                             Null?    Type
 -------------------------------- -------- ----------------------
 GROUP_NUMBER                              NUMBER
 DISK_NUMBER                               NUMBER
 COMPOUND_INDEX                            NUMBER
 INCARNATION                               NUMBER
 MOUNT_STATUS                              VARCHAR2(7)
 HEADER_STATUS                             VARCHAR2(12)
 MODE_STATUS                               VARCHAR2(7)
 STATE                                     VARCHAR2(8)
 REDUNDANCY                                VARCHAR2(7)
 LIBRARY                                   VARCHAR2(64)
 OS_MB                                     NUMBER
 TOTAL_MB                                  NUMBER
 FREE_MB                                   NUMBER
 HOT_USED_MB                               NUMBER
 COLD_USED_MB                              NUMBER
 NAME                                      VARCHAR2(30)
 FAILGROUP                                 VARCHAR2(30)
 LABEL                                     VARCHAR2(31)
 PATH                                      VARCHAR2(256)
 UDID                                      VARCHAR2(64)
 PRODUCT                                   VARCHAR2(32)
 CREATE_DATE                               DATE
 MOUNT_DATE                                DATE
 REPAIR_TIMER                              NUMBER
 READS                                     NUMBER
 WRITES                                    NUMBER
 READ_ERRS                                 NUMBER
 WRITE_ERRS                                NUMBER
 READ_TIME                                 NUMBER
 WRITE_TIME                                NUMBER
 BYTES_READ                                NUMBER
 BYTES_WRITTEN                             NUMBER
 PREFERRED_READ                            VARCHAR2(1)
 HASH_VALUE                                NUMBER
 HOT_READS                                 NUMBER
 HOT_WRITES                                NUMBER
 HOT_BYTES_READ                            NUMBER
 HOT_BYTES_WRITTEN                         NUMBER
 COLD_READS                                NUMBER
 COLD_WRITES                               NUMBER
 COLD_BYTES_READ                           NUMBER
 COLD_BYTES_WRITTEN                        NUMBER
 VOTING_FILE                               VARCHAR2(1)
 SECTOR_SIZE                               NUMBER
 FAILGROUP_TYPE                            VARCHAR2(7)

SQL> desc V$ASM_DISKGROUP
 Name                             Null?    Type
 -------------------------------- -------- ----------------------
 GROUP_NUMBER                              NUMBER
 NAME                                      VARCHAR2(30)
 SECTOR_SIZE                               NUMBER
 BLOCK_SIZE                                NUMBER
 ALLOCATION_UNIT_SIZE                      NUMBER
 STATE                                     VARCHAR2(11)
 TYPE                                      VARCHAR2(6)
 TOTAL_MB                                  NUMBER
 FREE_MB                                   NUMBER
 HOT_USED_MB                               NUMBER
 COLD_USED_MB                              NUMBER
 REQUIRED_MIRROR_FREE_MB                   NUMBER
 USABLE_FILE_MB                            NUMBER
 OFFLINE_DISKS                             NUMBER
 COMPATIBILITY                             VARCHAR2(60)
 DATABASE_COMPATIBILITY                    VARCHAR2(60)
 VOTING_FILES                              VARCHAR2(1)
Re: How to query oracleasm disk for block device? [message #676683 is a reply to message #676682] Wed, 03 July 2019 12:36 Go to previous messageGo to next message
kalenko
Messages: 40
Registered: January 2018
Member
Michel Cadot wrote on Wed, 03 July 2019 12:22
SQL> desc V$ASM_DISK
 Name                             Null?    Type
 -------------------------------- -------- ----------------------
 GROUP_NUMBER                              NUMBER
 DISK_NUMBER                               NUMBER
 COMPOUND_INDEX                            NUMBER
 INCARNATION                               NUMBER
 MOUNT_STATUS                              VARCHAR2(7)
 HEADER_STATUS                             VARCHAR2(12)
 MODE_STATUS                               VARCHAR2(7)
 STATE                                     VARCHAR2(8)
 REDUNDANCY                                VARCHAR2(7)
 LIBRARY                                   VARCHAR2(64)
 OS_MB                                     NUMBER
 TOTAL_MB                                  NUMBER
 FREE_MB                                   NUMBER
 HOT_USED_MB                               NUMBER
 COLD_USED_MB                              NUMBER
 NAME                                      VARCHAR2(30)
 FAILGROUP                                 VARCHAR2(30)
 LABEL                                     VARCHAR2(31)
 PATH                                      VARCHAR2(256)
 UDID                                      VARCHAR2(64)
 PRODUCT                                   VARCHAR2(32)
 CREATE_DATE                               DATE
 MOUNT_DATE                                DATE
 REPAIR_TIMER                              NUMBER
 READS                                     NUMBER
 WRITES                                    NUMBER
 READ_ERRS                                 NUMBER
 WRITE_ERRS                                NUMBER
 READ_TIME                                 NUMBER
 WRITE_TIME                                NUMBER
 BYTES_READ                                NUMBER
 BYTES_WRITTEN                             NUMBER
 PREFERRED_READ                            VARCHAR2(1)
 HASH_VALUE                                NUMBER
 HOT_READS                                 NUMBER
 HOT_WRITES                                NUMBER
 HOT_BYTES_READ                            NUMBER
 HOT_BYTES_WRITTEN                         NUMBER
 COLD_READS                                NUMBER
 COLD_WRITES                               NUMBER
 COLD_BYTES_READ                           NUMBER
 COLD_BYTES_WRITTEN                        NUMBER
 VOTING_FILE                               VARCHAR2(1)
 SECTOR_SIZE                               NUMBER
 FAILGROUP_TYPE                            VARCHAR2(7)

SQL> desc V$ASM_DISKGROUP
 Name                             Null?    Type
 -------------------------------- -------- ----------------------
 GROUP_NUMBER                              NUMBER
 NAME                                      VARCHAR2(30)
 SECTOR_SIZE                               NUMBER
 BLOCK_SIZE                                NUMBER
 ALLOCATION_UNIT_SIZE                      NUMBER
 STATE                                     VARCHAR2(11)
 TYPE                                      VARCHAR2(6)
 TOTAL_MB                                  NUMBER
 FREE_MB                                   NUMBER
 HOT_USED_MB                               NUMBER
 COLD_USED_MB                              NUMBER
 REQUIRED_MIRROR_FREE_MB                   NUMBER
 USABLE_FILE_MB                            NUMBER
 OFFLINE_DISKS                             NUMBER
 COMPATIBILITY                             VARCHAR2(60)
 DATABASE_COMPATIBILITY                    VARCHAR2(60)
 VOTING_FILES                              VARCHAR2(1)
These views give the information about the oracle disk. Here I want to know which OS disk maps to a given oracleasm disk. For example, I have only the oracleasm disk name which is DATA_007, and I want to know which OS disk (/dev/sdxx) maps to this oracleasm disk?

[Updated on: Wed, 03 July 2019 12:59]

Report message to a moderator

Re: How to query oracleasm disk for block device? [message #676684 is a reply to message #676683] Wed, 03 July 2019 14:10 Go to previous messageGo to next message
Michel Cadot
Messages: 68718
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator

Investigate in the column of these views and you will have the answer.

Re: How to find block device from oracleasm disk? [message #676685 is a reply to message #676679] Wed, 03 July 2019 23:03 Go to previous message
kalenko
Messages: 40
Registered: January 2018
Member
I've got the answer which is:

oracleasm querydisk -p DATA_007

Thanks Michel for your supports.
Previous Topic: Oracle 11gR2 grid and database deinstallation.
Next Topic: Why does RAC have two different SCN?
Goto Forum:
  


Current Time: Tue Dec 03 12:10:43 CST 2024