Oracle ASM disk group list

27,302

Solution 1

Nevermind i got my answer myself

[root@devserver ~]# /sbin/blkid | grep oracleasm | grep EXDATA
/dev/mapper/asmdataVG-asmdata01LV: LABEL="EXDATA" TYPE="oracleasm"

Solution 2

According to the official documents you really shouldn't be running this on top of LVM.

Raw logical volumes (LVM)—LVMs are supported in less complicated configurations where an LVM is mapped to a LUN, or an LVM uses disks or raw partitions. LVM configurations are not recommended by Oracle because they create a duplication of functionality. Oracle also does not recommended using LVMs for mirroring because ASM already provides mirroring.

Assuming you're using LVMs in a very basic way you should be able to determine what LVM Volume Group (VG) the ASM is using and from there walk down the hierarchy of VG -> LV -> PV.

Where:

  • VG - Volume Group
  • LV - Logical Volume
  • PV - Physical Volume

Example

Here's my Volume Group (vg-grinchy):

$ sudo vgs
  VG         #PV #LV #SN Attr   VSize   VFree
  vg_grinchy   1   3   0 wz--n- 304.22g    0 

I only have the one VG. Here are the Logical Volumes within it:

$ sudo lvs
  LV      VG         Attr   LSize   Origin Snap%  Move Log Copy%  Convert
  lv_home vg_grinchy -wi-ao 248.53g                                      
  lv_root vg_grinchy -wi-ao  50.00g                                      
  lv_swap vg_grinchy -wi-ao   5.69g                

There are 3. And finally here's the Physical Volume that these 3 volumes are sitting on:

$ sudo pvs
  PV         VG         Fmt  Attr PSize   PFree
  /dev/sda6  vg_grinchy lvm2 a-   304.22g    0 

So the underlying physical disk is /dev/sda6.

Share:
27,302

Related videos on Youtube

Satish
Author by

Satish

Curious about everything.

Updated on September 18, 2022

Comments

  • Satish
    Satish almost 2 years

    We have Oracle ASM running under LVM and now I want to expand one of ASM disk group size, but I don't know which LVM filesystem is associated with specific ASM disk group. Is there a way to find out how many raw disk or LVM disk associated with ASM disk group?

    disk group

    An Oracle ASM disk group is a collection of disks that Oracle ASM manages as a unit. Within a disk group, Oracle ASM exposes a file system interface for Oracle Database files. The content of files that are stored in a disk group are evenly distributed, or striped, to eliminate hot spots and to provide uniform performance across the disks. Oracle ASM files may also be optionally mirrored within a disk group. The performance of disks in a disk group is comparable to the performance of raw devices.

    EDIT #1

    following are my disk group in ASM now EXDATA running out of space 99% used. I have enough space in LVM so i am planing to expend LVM disk but i don't know which LVM volume i should expend because there are many LVM disk/filesystem showing in lvdisplay command.

    [root@devserver ~]# /etc/init.d/oracleasm listdisks
    EXDATA
    EXLOG
    STDATA
    STLOG
    PXDATA
    PXLOG
    OCR
    XDDATA
    XDLOG
    

    Question: How to find which LVM volume associated with EXDATA (asm)? so i can run lvextend on LVM volume and increase the size of EXDATA