How to Create ASM on AIX Volume Manager

Creating ASM on AIX Volume Manager is pretty straight forward

STEP 1
======

Check available disks or physical volumes
# aixdev80:/> lspv
hdisk0          0003044c000436ac                    rootvg          active
hdisk1          none                                None
hdisk2          none                                None
hdisk3          none                                None
hdisk4          none                                None
hdisk5          none                                None
…………………
…………………
…………………
hdisk74         0003044ccef6885f                    None          
hdisk75         0003044ccef689e8                    None          
hdisk76         0003044ccef68b9d                    None          

STEP 2
======

Create a Volume Group (VG)

# aixdev80:/> mkvg  -y ‘asmvg’ -s’128′ hdisk74 hdisk75 hdisk76
0516-1254 mkvg: Changing the PVID in the ODM.
0516-1254 mkvg: Changing the PVID in the ODM.
0516-1254 mkvg: Changing the PVID in the ODM.

# aixdev80:/> lsvg
rootvg
asmvg

# aixdev80:/> lspv

hdisk0          0003044c000436ac                    rootvg          active
hdisk1          none                                None
hdisk2          none                                None
hdisk3          none                                None
hdisk4          none                                None
hdisk5          none                                None
…………………
…………………
…………………
hdisk74         0003044ccef6885f                    asmvg           active
hdisk75         0003044ccef689e8                    asmvg           active
hdisk76         0003044ccef68b9d                    asmvg           active

# aixdev80:/> lsvg asmvg
VOLUME GROUP:       asmvg                    VG IDENTIFIER:  0003044c0000d7000000012bcef68eb1
VG STATE:           active                   PP SIZE:        128 megabyte(s)
VG PERMISSION:      read/write               TOTAL PPs:      117 (14976 megabytes)
MAX LVs:            256                      FREE PPs:       117 (14976 megabytes)
LVs:                0                        USED PPs:       0 (0 megabytes)
OPEN LVs:           0                        QUORUM:         2 (Enabled)
TOTAL PVs:          3                        VG DESCRIPTORS: 3
STALE PVs:          0                        STALE PPs:      0
ACTIVE PVs:         3                        AUTO ON:        yes
MAX PPs per VG:     32512
MAX PPs per PV:     1016                     MAX PVs:        32
LTG size (Dynamic): 256 kilobyte(s)          AUTO SYNC:      no
HOT SPARE:          no                       BB POLICY:      relocatable

# aixdev80:/> cd /dev

# aixdev80:/> ls -al | grep asm
crw-rw—-    1 root     system       48,  0 Oct 21 08:24 asmvg

STEP 3
======

Create Logical Volumes (LV)

# aixdev80:/> mklv -y’asmdatalv’ -t’jfs2′ asmvg 50
# aixdev80:/> mklv -y’asmfralv’ -t’jfs2′ asmvg 30

# aixdev80:/> lslv asmdatalv
LOGICAL VOLUME:     asmdatalv              VOLUME GROUP:   asmvg
LV IDENTIFIER:      0003044c0000d7000000012bcef68eb1.1 PERMISSION:     read/write
VG STATE:           active/complete        LV STATE:       opened/syncd
TYPE:               jfs2                   WRITE VERIFY:   off
MAX LPs:            512                    PP SIZE:        128 megabyte(s)
COPIES:             1                      SCHED POLICY:   parallel
LPs:                50                     PPs:            50
STALE PPs:          0                      BB POLICY:      relocatable
INTER-POLICY:       minimum                RELOCATABLE:    yes
INTRA-POLICY:       middle                 UPPER BOUND:    32
MOUNT POINT:        N/A                    LABEL:          None
MIRROR WRITE CONSISTENCY: on/ACTIVE
EACH LP COPY ON A SEPARATE PV ?: yes
Serialize IO ?:     NO

 

# aixdev80:/> lslv asmfralv
LOGICAL VOLUME:     asmfralv               VOLUME GROUP:   asmvg
LV IDENTIFIER:      0003044c0000d7000000012bcef68eb1.2 PERMISSION:     read/write
VG STATE:           active/complete        LV STATE:       opened/syncd
TYPE:               jfs2                   WRITE VERIFY:   off
MAX LPs:            512                    PP SIZE:        128 megabyte(s)
COPIES:             1                      SCHED POLICY:   parallel
LPs:                30                     PPs:            30
STALE PPs:          0                      BB POLICY:      relocatable
INTER-POLICY:       minimum                RELOCATABLE:    yes
INTRA-POLICY:       middle                 UPPER BOUND:    32
MOUNT POINT:        N/A                    LABEL:          None
MIRROR WRITE CONSISTENCY: on/ACTIVE
EACH LP COPY ON A SEPARATE PV ?: yes
Serialize IO ?:     NO

Check the used PP’s value change

# aixdev80:/> lsvg asmvg
VOLUME GROUP:       asmvg                    VG IDENTIFIER:  0003044c0000d7000000012bcef68eb1
VG STATE:           active                   PP SIZE:        128 megabyte(s)
VG PERMISSION:      read/write               TOTAL PPs:      117 (14976 megabytes)
MAX LVs:            256                      FREE PPs:       37 (4736 megabytes)
LVs:                2                        USED PPs:       80 (10240 megabytes) <<<<<<<<<<<<
OPEN LVs:           0                        QUORUM:         2 (Enabled)
TOTAL PVs:          3                        VG DESCRIPTORS: 3
STALE PVs:          0                        STALE PPs:      0
ACTIVE PVs:         3                        AUTO ON:        yes
MAX PPs per VG:     32512
MAX PPs per PV:     1016                     MAX PVs:        32
LTG size (Dynamic): 256 kilobyte(s)          AUTO SYNC:      no
HOT SPARE:          no                       BB POLICY:      relocatable

 

STEP 4
======

Change the permissions of the logical volumes

# aixdev80:/> ls -al | grep asm | grep lv

brw-rw—-    1 root     system       48,  1 Oct 21 08:34 asmdatalv
brw-rw—-    1 root     system       48,  2 Oct 21 08:37 asmfralv
crw-rw—-    1 root     system       48,  1 Oct 21 08:34 rasmdatalv
crw-rw—-    1 root     system       48,  2 Oct 21 08:37 rasmfralv

# aixdev80:/> chown oragrid:asmadmin rasmdatalv rasmfralv
# aixdev80:/> chmod 660 rasmdatalv rasmfralv

STEP 5
======

Create required diskgroups

SQL> show parameter string

NAME                                 TYPE        VALUE
———————————— ———– ——————————
asm_diskstring                       string      /dev/r*
SQL> create diskgroup AIXLVMDATA external redundancy disk ‘/dev/rasmdatalv’
/
Diskgroup created.

SQL> create diskgroup AIXLVMFRA external redundancy disk ‘/dev/rasmfralv’
/
Diskgroup created.
select name, state,total_mb, free_mb, required_mirror_free_mb, usable_file_mb  from v$asm_diskgroup
/

NAME                           STATE         TOTAL_MB    FREE_MB REQUIRED_MIRROR_FREE_MB USABLE_FILE_MB
—————————— ———– ———- ———- ———————– ————–
AIXLVMDATA                     MOUNTED           6400       6350                       0           6350
AIXLVMFRA                      MOUNTED           3840       3790                       0           3790
select name, state, header_status, path,total_mb, free_mb from v$asm_disk
/
NAME                           STATE    HEADER_STATU PATH                                                 TOTAL_MB    FREE_MB
—————————— ——– ———— ————————————————– ———- ———-
AIXLVMDATA_0000                NORMAL   MEMBER       /dev/rasmdatalv           6400       6350
AIXLVMFRA_0000                 NORMAL   MEMBER       /dev/rasmfralv                 3840       3790
 
About these ads
This entry was posted in Oracle Automatic Storage Management and tagged . Bookmark the permalink.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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