ASM LUN CANDIDATE Query

Published by Alessandro Caredda on

With the article “ASM LUN CANDIDATE Query,” we can identify ASM Disk Groups along with their respective disks composing the DG and their sizes.

Moreover, it’s possible to see the disks that compose them along with their sizes.

Finally, if present, it’s possible to identify the LUN CANDIDATES,

ready to be attached to a Disk Group.

Query to identify LUN CANDIDATES on ASM 

The selected fields are:

NAME – Name of the Disk Group. If [CANDIDATE] is present alongside, we can attach it to the Disk Group
PATH – Physical location of the LUN
TOTAL_MB – Total size of the LUN
O
S_MB – Total size of the LUN on the OS side

The information is retrieved from the V$ASM_DISKGROUP and V$ASM_DISK tables, related by the RIGHT OUTER JOIN using the GROUP_NUMBER field.

ASM LUN CANDIDATE Query:

Query  identificare  LUN DISKGROUP
Database Table with modern background

Query to identify LUNs with their respective Disk Groups and sizes, and LUN CANDIDATES:

set lines 300
col DISK_FILE_PATH for a40
break on disk_group_name
SELECT NVL(a.name, '[CANDIDATE]') disk_group_name
, b.path disk_file_path
, b.total_mb total_mb
,b.OS_MB
FROM
v$asm_diskgroup a RIGHT OUTER JOIN v$asm_disk b USING (group_number)
ORDER BY
a.name;

Stay tuned! Non solo Query identificare LUN DISKGROUP

To view my guides on CRS Commands click here!
At this LINK, instead, you’ll find the SQL queries.

Stay updated on our activities by joining our community (make sure to like our pages, let’s connect, and stay updated on each of our new guides!):
Facebook
Youtube
Linkedin

For those who haven’t done so yet, we recommend saving this site among your bookmarks, so you’ll always have our solutions to the most common database problems at your fingertips, especially Oracle databases.

 


0 Comments

Leave a Reply

Avatar placeholder