Create a raw Logical Volume for Oracle ASM on AIX

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

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s