How to create ASM on Solaris Volume Manager (SVM)

Solaris Volume Manager (SVM) can be used to create volumes with different RAID combinations 

RAID 0  – Concatenation, Stripe
RAID 1  – Mirror

Following are the steps to create ASM on top of SVM

STEP 1
======

Create a Metadevice

metadb -a -f c1t50060E800564F774d2s2 c1t50060E800564F774d3s2 c1t50060E800564F774d4s2 c1t50060E800564F774d10s2  c1t50060E800564F774d33s2 c1t50060E800564F774d36s2

STEP 2
======

Create required RAID configuration

Example 1  Create metadevice consisting of a concatenation of four slices

# metainit d1 4 1 c1t50060E800564F774d2s2 1 c1t50060E800564F774d3s2 1 c1t50060E800564F774d4s2 1 c1t50060E800564F774d10s2

Example 2 Create soft partition and then create required RAID configuration

# metainit d2 -p c1t50060E800564F774d33s2 5000m
# metainit d3 -p c1t50060E800564F774d33s2 5000m

Check the setup using metastat

# metastat

d1: Concat/Stripe
    Size: 16658432 blocks (7.9 GB)
    Stripe 0:
        Device                             Start Block  Dbase   Reloc
        /dev/dsk/c1t50060E800564F774d2s2      12288     Yes     Yes
    Stripe 1:
        Device                             Start Block  Dbase   Reloc
        /dev/dsk/c1t50060E800564F774d3s2      15360     Yes     Yes
    Stripe 2:
        Device                             Start Block  Dbase   Reloc
        /dev/dsk/c1t50060E800564F774d4s2      15360     Yes     Yes
    Stripe 3:
        Device                              Start Block  Dbase  Reloc
        /dev/dsk/c1t50060E800564F774d10s2      15360     Yes    Yes
d3: Soft Partition
    Device: /dev/dsk/c1t50060E800564F774d33s2
    State: Okay
    Size: 10240000 blocks (4.9 GB)
        Device                              Start Block  Dbase Reloc
        /dev/dsk/c1t50060E800564F774d33s2      15360     Yes   Yes
        Extent              Start Block              Block count
             0                 10255362                 10240000
d2: Soft Partition
    Device: /dev/dsk/c1t50060E800564F774d33s2
    State: Okay
    Size: 10240000 blocks (4.9 GB)
        Device                              Start Block  Dbase Reloc
        /dev/dsk/c1t50060E800564F774d33s2      15360     Yes   Yes
        Extent              Start Block              Block count
             0                    15361                 10240000
Device Relocation Information:
Device                            Reloc Device ID
/dev/dsk/c1t50060E800564F774d2    Yes   id1,ssd@n60060e800564f700000064f7000007df
/dev/dsk/c1t50060E800564F774d3    Yes   id1,ssd@n60060e800564f700000064f7000007e0
/dev/dsk/c1t50060E800564F774d4    Yes   id1,ssd@n60060e800564f700000064f7000007e1
/dev/dsk/c1t50060E800564F774d10   Yes   id1,ssd@n60060e800564f700000064f7000007e7
/dev/dsk/c1t50060E800564F774d33   Yes   id1,ssd@n60060e800564f700000064f700000315
STEP 3
======

Change the device permission. Solaris VM disks are created under /dev/md/rdsk

# cd  /dev/md/rdsk

# chown oragrid:oinstall  ../../../devices/pseudo/md@0:0,1,raw
# chown oragrid:oinstall  ../../../devices/pseudo/md@0:0,2,raw
# chown oragrid:oinstall  ../../../devices/pseudo/md@0:0,3,raw

STEP 4
======

Change the asm_diskstring parameter.

SQL> alter system set asm_diskstring=’/dev/md/rdsk’,’/dev/rdsk’
/

System altered.

SQL>  show parameter string

NAME                                 TYPE        VALUE
———————————— ———– ——————————
asm_diskstring                       string      /dev/md/rdsk, /dev/rdsk

SQL> select name, state, header_status, path,total_mb, free_mb from v$asm_disk
/

NAME                           STATE    HEADER_STATU PATH                                                 TOTAL_MB    FREE_MB
—————————— ——– ———— ————————————————– ———- ———-
                               NORMAL   CANDIDATE    /dev/md/rdsk/d1                                             0          0
                               NORMAL   CANDIDATE    /dev/md/rdsk/d2                                             0          0
                               NORMAL   CANDIDATE    /dev/md/rdsk/d3                                             0          0
DATA_0000      NORMAL   MEMBER       /dev/rdsk/c1t50060E800564F774d41s6   10222      10163

Create required diskgroups

SQL> create diskgroup DG1  EXTERNAL REDUNDANCY DISK  ‘/dev/md/rdsk/d1’;

Diskgroup created.

SQL> create diskgroup DG2 EXTERNAL REDUNDANCY DISK  ‘/dev/md/rdsk/d3’;

Diskgroup created.

SQL> create diskgroup FRA EXTERNAL REDUNDANCY DISK  ‘/dev/md/rdsk/d2’;

Diskgroup created.

SQL> 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
—————————— ———– ———- ———- ———————– ————–
DATA                           MOUNTED          10222      10163                       0          10163
DG1                            MOUNTED           8134       8084                       0           8084
DG2                            MOUNTED           5000       4950                       0           4950
FRA                            MOUNTED           5000       4950                       0           4950
Advertisements
This entry was posted in Oracle Automatic Storage Management and tagged . Bookmark the permalink.

One Response to How to create ASM on Solaris Volume Manager (SVM)

  1. Pingback: Other DBA Related « Center Point for Oracle DBA & Kuwait Info

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