October 26, 2020

Out Here In The Fields

…of musings and ramblings

Create a raw Logical Volume for Oracle ASM on AIX

2 min read

Oracle’s ASM uses raw device to perform their disk operation. What we usually do is that we assign a LUN from a SAN to a server, then assign the raw disks  to the ASM instance, without assigning the disks to an a volume group, which I have covered in the past. But, things get tricky when all you have has already been assigned to a VG. Well, You can create a raw logical volume from free space available on an existing (or new) volume group, and assign it to your ASM instance. To create a raw logical volume on AIX,  first make sure that you have enough free PPs on the corresponding VG. Do the following

# lsvg asmvg
VOLUME GROUP:       asmvg                   VG IDENTIFIER:  000b323a0000d4000000012ab27b8b1a
VG STATE:           active                   PP SIZE:        256 megabyte(s)
VG PERMISSION:      read/write               TOTAL PPs:      1092 (279552 megabytes)
MAX LVs:            256                      FREE PPs:       600 (153600 megabytes)
LVs:                16                       USED PPs:       492 (125952 megabytes)
OPEN LVs:           15                       QUORUM:         1 (Disabled)
TOTAL PVs:          2                        VG DESCRIPTORS: 3
STALE PVs:          0                        STALE PPs:      0
ACTIVE PVs:         2                        AUTO ON:        yes
MAX PPs per VG:     32512
MAX PPs per PV:     1016                     MAX PVs:        32
LTG size (Dynamic): 1024 kilobyte(s)         AUTO SYNC:      no
HOT SPARE:          no                       BB POLICY:      relocatable
PV RESTRICTION:     none                     INFINITE RETRY: no

Based on the information displayed above, we can see that the volume group asmvg has 600 free PPs, which with PP size 256MB, roughly translate to 150GB. If there’s enough PP available, perform the following:

# mklv -y hdiskraw01 -t raw asmvg 600

This will create a raw logical volume, with a block special file named “hdiskraw01” and a character special file named “rhdiskraw01” on volume group “asmvg”, with the size of 600 PPs. Assign the character special file “rhdiskraw01” to your ASM instance, and we’re done 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Copyright © All rights reserved. | Newsphere by AF themes.