Add ASM DG

In this blog entry is described adding a set of new LUNs to the SCST SAN for presentation to a KVM Oracle guest to provision a new Oracle ASM diskgroup on that guest.

Create Files for LUNs

In this example, 8 new 2Gb files for file-backed SCST LUNs are created. Eight files are created to follow the Violin Memory best practice on flash for creating Oracle ASM diskgroups with 8 LUNs. The size of 2Gb is chosen because a minimum of 15Gb total space is needed for the installation of the SLOB2 tablespace as described here at the flashdba blog as shown below.

[root@oracle651 scst_oracle632]# dd if=/dev/zero of=/scst_oracle632/AsmSlb632_01.img bs=2048 count=0 seek=1M

0+0 records in

0+0 records out

0 bytes (0 B) copied, 0.00052062 s, 0.0 kB/s

[root@oracle651 scst_oracle632]#

Use the same command, or script it to run iteratively, to create a total of eight 2Gb files for file-backed LUNs. When done check that they have all been created as shown below.

[root@oracle651 scst_oracle631]# ls -l AsmSlb*

-rw-r--r-- 1 root root 2147483648 Aug 22 14:06 AsmSlb631_01.img

-rw-r--r-- 1 root root 2147483648 Aug 22 14:06 AsmSlb631_02.img

-rw-r--r-- 1 root root 2147483648 Aug 22 14:06 AsmSlb631_03.img

-rw-r--r-- 1 root root 2147483648 Aug 22 14:06 AsmSlb631_04.img

-rw-r--r-- 1 root root 2147483648 Aug 22 14:06 AsmSlb631_05.img

-rw-r--r-- 1 root root 2147483648 Aug 22 14:06 AsmSlb631_06.img

-rw-r--r-- 1 root root 2147483648 Aug 22 14:07 AsmSlb631_07.img

-rw-r--r-- 1 root root 2147483648 Aug 22 14:07 AsmSlb631_08.img

[root@oracle651 scst_oracle631]#

Add LUNs to SCST SAN

Create a script to open the new files as file-backed LUN devices, and to add them to the SAN. The script used is shown below.

[root@oracle651 scripts]# cat crt_slob_luns_1.sh

scstadmin -open_dev AsmSlb631_01 -handler vdisk_fileio -attributes filename=/scst_oracle631/AsmSlb631_01.img

scstadmin -open_dev AsmSlb631_02 -handler vdisk_fileio -attributes filename=/scst_oracle631/AsmSlb631_02.img

scstadmin -open_dev AsmSlb631_03 -handler vdisk_fileio -attributes filename=/scst_oracle631/AsmSlb631_03.img

scstadmin -open_dev AsmSlb631_04 -handler vdisk_fileio -attributes filename=/scst_oracle631/AsmSlb631_04.img

scstadmin -open_dev AsmSlb631_05 -handler vdisk_fileio -attributes filename=/scst_oracle631/AsmSlb631_05.img

scstadmin -open_dev AsmSlb631_06 -handler vdisk_fileio -attributes filename=/scst_oracle631/AsmSlb631_06.img

scstadmin -open_dev AsmSlb631_07 -handler vdisk_fileio -attributes filename=/scst_oracle631/AsmSlb631_07.img

scstadmin -open_dev AsmSlb631_08 -handler vdisk_fileio -attributes filename=/scst_oracle631/AsmSlb631_08.img

scstadmin -write_config /etc/scst.conf

scstadmin -add_lun 20 -driver iscsi -target iqn.2014-08.org.vmem:oracle651.san.asm.luns -group oracle631 -device AsmSlb631_01

scstadmin -add_lun 21 -driver iscsi -target iqn.2014-08.org.vmem:oracle651.san.asm.luns -group oracle631 -device AsmSlb631_02

scstadmin -add_lun 22 -driver iscsi -target iqn.2014-08.org.vmem:oracle651.san.asm.luns -group oracle631 -device AsmSlb631_03

scstadmin -add_lun 23 -driver iscsi -target iqn.2014-08.org.vmem:oracle651.san.asm.luns -group oracle631 -device AsmSlb631_04

scstadmin -add_lun 24 -driver iscsi -target iqn.2014-08.org.vmem:oracle651.san.asm.luns -group oracle631 -device AsmSlb631_05

scstadmin -add_lun 25 -driver iscsi -target iqn.2014-08.org.vmem:oracle651.san.asm.luns -group oracle631 -device AsmSlb631_06

scstadmin -add_lun 26 -driver iscsi -target iqn.2014-08.org.vmem:oracle651.san.asm.luns -group oracle631 -device AsmSlb631_07

scstadmin -add_lun 27 -driver iscsi -target iqn.2014-08.org.vmem:oracle651.san.asm.luns -group oracle631 -device AsmSlb631_08

scstadmin -write_config /etc/scst.conf

[root@oracle651 scripts]#

The LUN numbers used in the above script are determined by checking the current LUN number usage of the SAN as shown below. Since "19" is the highest-numbered LUN currently, the above script starts with LUN "20".

[root@oracle651 scst_oracle631]# scstadmin -list_group oracle631

Collecting current configuration: done.

Driver: iscsi

Target: iqn.2014-08.org.vmem:oracle651.san.asm.luns

Driver/target 'iscsi/iqn.2014-08.org.vmem:oracle651.san.asm.luns' has no associated LUNs.

Group: oracle631

Assigned LUNs:

LUN Device

-----------------

0 AsmSys631_01

1 AsmDat631_01

10 AsmRec631_02

11 AsmRec631_03

12 AsmRec631_04

13 AsmRec631_05

14 AsmRec631_06

15 AsmRec631_07

16 AsmRec631_08

18 disk0

19 disk1

2 AsmDat631_02

3 AsmDat631_03

4 AsmDat631_04

5 AsmDat631_05

6 AsmDat631_06

7 AsmDat631_07

8 AsmDat631_08

9 AsmRec631_01

Assigned Initiators:

Initiator

----------------------------------

iqn.2014-08.org.vmem:oracle631.asm

All done.

[root@oracle651 scst_oracle631]#

Run the script to create and attach the file-backed LUNs to the SAN target. The expected normal output is shown below.

[root@oracle651 scripts]# ./crt_slob_luns_1.sh

Collecting current configuration: done.

-> Making requested changes.

-> Opening device 'AsmSlb631_01' using handler 'vdisk_fileio': done.

-> Done.

All done.

Collecting current configuration: done.

-> Making requested changes.

-> Opening device 'AsmSlb631_02' using handler 'vdisk_fileio': done.

-> Done.

All done.

Collecting current configuration: done.

-> Making requested changes.

-> Opening device 'AsmSlb631_03' using handler 'vdisk_fileio': done.

-> Done.

All done.

Collecting current configuration: done.

-> Making requested changes.

-> Opening device 'AsmSlb631_04' using handler 'vdisk_fileio': done.

-> Done.

All done.

Collecting current configuration: done.

-> Making requested changes.

-> Opening device 'AsmSlb631_05' using handler 'vdisk_fileio': done.

-> Done.

All done.

Collecting current configuration: done.

-> Making requested changes.

-> Opening device 'AsmSlb631_06' using handler 'vdisk_fileio': done.

-> Done.

All done.

Collecting current configuration: done.

-> Making requested changes.

-> Opening device 'AsmSlb631_07' using handler 'vdisk_fileio': done.

-> Done.

All done.

Collecting current configuration: done.

-> Making requested changes.

-> Opening device 'AsmSlb631_08' using handler 'vdisk_fileio': done.

-> Done.

All done.

Collecting current configuration: done.

Writing current configuration to file '/etc/scst.conf'..

All done.

Collecting current configuration: done.

-> Making requested changes.

-> Adding device 'AsmSlb631_01' at LUN 20 to driver/target/group 'iscsi/iqn.2014-08.org.vmem:oracle651.san.asm.luns/oracle631': done.

-> Driver/target is not a fibre channel target, ignoring.

-> Done.

All done.

Collecting current configuration: done.

-> Making requested changes.

-> Adding device 'AsmSlb631_02' at LUN 21 to driver/target/group 'iscsi/iqn.2014-08.org.vmem:oracle651.san.asm.luns/oracle631': done.

-> Driver/target is not a fibre channel target, ignoring.

-> Done.

All done.

Collecting current configuration: done.

-> Making requested changes.

-> Adding device 'AsmSlb631_03' at LUN 22 to driver/target/group 'iscsi/iqn.2014-08.org.vmem:oracle651.san.asm.luns/oracle631': done.

-> Driver/target is not a fibre channel target, ignoring.

-> Done.

All done.

Collecting current configuration: done.

-> Making requested changes.

-> Adding device 'AsmSlb631_04' at LUN 23 to driver/target/group 'iscsi/iqn.2014-08.org.vmem:oracle651.san.asm.luns/oracle631': done.

-> Driver/target is not a fibre channel target, ignoring.

-> Done.

All done.

Collecting current configuration: done.

-> Making requested changes.

-> Adding device 'AsmSlb631_05' at LUN 24 to driver/target/group 'iscsi/iqn.2014-08.org.vmem:oracle651.san.asm.luns/oracle631': done.

-> Driver/target is not a fibre channel target, ignoring.

-> Done.

All done.

Collecting current configuration: done.

-> Making requested changes.

-> Adding device 'AsmSlb631_06' at LUN 25 to driver/target/group 'iscsi/iqn.2014-08.org.vmem:oracle651.san.asm.luns/oracle631': done.

-> Driver/target is not a fibre channel target, ignoring.

-> Done.

All done.

Collecting current configuration: done.

-> Making requested changes.

-> Adding device 'AsmSlb631_07' at LUN 26 to driver/target/group 'iscsi/iqn.2014-08.org.vmem:oracle651.san.asm.luns/oracle631': done.

-> Driver/target is not a fibre channel target, ignoring.

-> Done.

All done.

Collecting current configuration: done.

-> Making requested changes.

-> Adding device 'AsmSlb631_08' at LUN 27 to driver/target/group 'iscsi/iqn.2014-08.org.vmem:oracle651.san.asm.luns/oracle631': done.

-> Driver/target is not a fibre channel target, ignoring.

-> Done.

All done.

Collecting current configuration: done.

Writing current configuration to file '/etc/scst.conf'..

All done.

[root@oracle651 scripts]#

Verify that the LUNs have been added to the SAN by re-running the "scstadmin -list_group oracle631" command as shown below. The bolded LUNs are the newly-added LUNs.

[root@oracle651 scripts]# scstadmin -list_group oracle631

Collecting current configuration: done.

Driver: iscsi

Target: iqn.2014-08.org.vmem:oracle651.san.asm.luns

Driver/target 'iscsi/iqn.2014-08.org.vmem:oracle651.san.asm.luns' has no associated LUNs.

Group: oracle631

Assigned LUNs:

LUN Device

-----------------

20 AsmSlb631_01

21 AsmSlb631_02

22 AsmSlb631_03

23 AsmSlb631_04

24 AsmSlb631_05

25 AsmSlb631_06

26 AsmSlb631_07

27 AsmSlb631_08 0 AsmSys631_01

1 AsmDat631_01

10 AsmRec631_02

11 AsmRec631_03

12 AsmRec631_04

13 AsmRec631_05

14 AsmRec631_06

15 AsmRec631_07

16 AsmRec631_08

18 disk0

19 disk1

2 AsmDat631_02

20 AsmSlb631_01

21 AsmSlb631_02

22 AsmSlb631_03

23 AsmSlb631_04

24 AsmSlb631_05

25 AsmSlb631_06

26 AsmSlb631_07

27 AsmSlb631_08

3 AsmDat631_03

4 AsmDat631_04

5 AsmDat631_05

6 AsmDat631_06

7 AsmDat631_07

8 AsmDat631_08

9 AsmRec631_01

Assigned Initiators:

Initiator

----------------------------------

iqn.2014-08.org.vmem:oracle631.asm

All done.

[root@oracle651 scripts]#

The LUNs should now be visible on the KVM Oracle guest as new multipath LUNs of the form "/dev/mapper/mpath*" on oracle631 as shown below.

[root@oracle631 ~]# ls -lrt /dev/mapper

total 0

crw-rw---- 1 root root 10, 236 Aug 22 13:21 control

lrwxrwxrwx 1 root root 7 Aug 22 13:21 vg_oracle631-lv_swap -> ../dm-1

lrwxrwxrwx 1 root root 7 Aug 22 13:21 vg_oracle631-lv_root -> ../dm-0

lrwxrwxrwx 1 root root 7 Aug 22 13:21 vg_u00-lv_oracle -> ../dm-2

lrwxrwxrwx 1 root root 8 Aug 22 13:21 ASM_4096B_1 -> ../dm-17

lrwxrwxrwx 1 root root 8 Aug 22 13:21 ASM_0512B_1 -> ../dm-21

lrwxrwxrwx 1 root root 7 Aug 22 13:21 ASM_RECO6 -> ../dm-3

lrwxrwxrwx 1 root root 7 Aug 22 13:21 ASM_RECO4 -> ../dm-4

lrwxrwxrwx 1 root root 7 Aug 22 13:21 ASM_RECO3 -> ../dm-5

lrwxrwxrwx 1 root root 7 Aug 22 13:21 ASM_SYSD1 -> ../dm-6

lrwxrwxrwx 1 root root 7 Aug 22 13:21 ASM_RECO1 -> ../dm-7

lrwxrwxrwx 1 root root 7 Aug 22 13:21 ASM_RECO2 -> ../dm-8

lrwxrwxrwx 1 root root 7 Aug 22 13:21 ASM_RECO7 -> ../dm-9

lrwxrwxrwx 1 root root 8 Aug 22 13:21 ASM_DATA3 -> ../dm-10

lrwxrwxrwx 1 root root 8 Aug 22 13:21 ASM_DATA5 -> ../dm-11

lrwxrwxrwx 1 root root 8 Aug 22 13:21 ASM_DATA1 -> ../dm-12

lrwxrwxrwx 1 root root 8 Aug 22 13:21 ASM_DATA2 -> ../dm-13

lrwxrwxrwx 1 root root 8 Aug 22 13:21 ASM_DATA6 -> ../dm-14

lrwxrwxrwx 1 root root 8 Aug 22 13:21 ASM_DATA8 -> ../dm-15

lrwxrwxrwx 1 root root 8 Aug 22 13:21 ASM_DATA4 -> ../dm-16

lrwxrwxrwx 1 root root 8 Aug 22 13:21 ASM_DATA7 -> ../dm-18

lrwxrwxrwx 1 root root 8 Aug 22 13:21 ASM_RECO5 -> ../dm-19

lrwxrwxrwx 1 root root 8 Aug 22 13:21 ASM_RECO8 -> ../dm-20

lrwxrwxrwx 1 root root 8 Aug 22 14:48 mpathaq -> ../dm-23

lrwxrwxrwx 1 root root 8 Aug 22 14:48 mpathap -> ../dm-22

lrwxrwxrwx 1 root root 8 Aug 22 14:48 mpathas -> ../dm-25

lrwxrwxrwx 1 root root 8 Aug 22 14:48 mpathar -> ../dm-24

lrwxrwxrwx 1 root root 8 Aug 22 14:48 mpathaw -> ../dm-29

lrwxrwxrwx 1 root root 8 Aug 22 14:48 mpathau -> ../dm-27

lrwxrwxrwx 1 root root 8 Aug 22 14:48 mpathav -> ../dm-28

lrwxrwxrwx 1 root root 8 Aug 22 14:48 mpathat -> ../dm-26

[root@oracle631 ~]#

The LUNs need to be configured in /etc/multipath.conf next. Determine the WWN of the eight new LUNs as shown below.

[root@oracle631 ~]# multipath -ll -v2 | grep AsmSlb

mpathaw (23964396336383935) dm-29 SCST_FIO,AsmSlb631_05

mpathav (26139376263303063) dm-28 SCST_FIO,AsmSlb631_06

mpathau (26261643935383762) dm-27 SCST_FIO,AsmSlb631_07

mpathat (23564613035323836) dm-26 SCST_FIO,AsmSlb631_08

mpathas (26634353333396137) dm-25 SCST_FIO,AsmSlb631_03

mpathar (23865336566306532) dm-24 SCST_FIO,AsmSlb631_04

mpathaq (26433313630393439) dm-23 SCST_FIO,AsmSlb631_01

mpathap (26537663161316430) dm-22 SCST_FIO,AsmSlb631_02

[root@oracle631 ~]#

Configure the LUNs in /etc/multipath.conf using the above information from multipath -ll -v2 as shown below. New entries for the SLOB tablespace are in bold.

[root@oracle631 ~]# cat /etc/multipath.conf

# Configuration file for device mapper multipath.

# For a complete list of the default configuration values:

# /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf.defaults

# For a list of configuration options with descriptions:

# /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf.annotated

defaults {

user_friendly_names yes

}

blacklist {

devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"

devnode "^hd[a-z]"

}

devices {

device {

vendor "SCST_BIO"

product "Direct-Access"

path_grouping_policy multibus

path_selector "round-robin 0"

failback immediate

rr_min_io 1

rr_weight priorities

}

}

multipaths {

multipath {

wwid 26162356632353435

alias ASM_4096B_1

}

multipath {

wwid 26238666462643332

alias ASM_0512B_1

}

multipath {

wwid 23863316131356162

alias ASM_4096F_1

}

multipath {

wwid 23431613666613765

alias ASM_SYSD1

}

multipath {

wwid 2656666396337382d

alias ASM_DATA8

}

multipath {

wwid 26539383639363835

alias ASM_DATA7

}

multipath {

wwid 26661323430656632

alias ASM_DATA6

}

multipath {

wwid 26365633361363662

alias ASM_DATA5

}

multipath {

wwid 26464363133653163

alias ASM_DATA4

}

multipath {

wwid 26137306366373539

alias ASM_DATA3

}

multipath {

wwid 26234616536663265

alias ASM_DATA2

}

multipath {

wwid 23830343963376237

alias ASM_DATA1

}

multipath {

wwid 23164333132623134

alias ASM_RECO1

}

multipath {

wwid 23239643638333864

alias ASM_RECO2

}

multipath {

wwid 23361373431626661

alias ASM_RECO3

}

multipath {

wwid 23430313964326266

alias ASM_RECO4

}

multipath {

wwid 23533626234616338

alias ASM_RECO5

}

multipath {

wwid 23637356365323531

alias ASM_RECO6

}

multipath {

wwid 23734666537613236

alias ASM_RECO7

}

multipath {

wwid 23933383737306462

alias ASM_RECO8

}

multipath {

wwid 23638393630336633

alias ASM_TEST1

}

multipath {

wwid 26433313630393439

alias ASM_SLOB1

}

multipath {

wwid 26537663161316430

alias ASM_SLOB2

}

multipath {

wwid 26634353333396137

alias ASM_SLOB3

}

multipath {

wwid 23865336566306532

alias ASM_SLOB4

}

multipath {

wwid 23964396336383935

alias ASM_SLOB5

}

multipath {

wwid 26139376263303063

alias ASM_SLOB6

}

multipath {

wwid 26261643935383762

alias ASM_SLOB7

}

multipath {

wwid 23564613035323836

alias ASM_SLOB8

}

}

[root@oracle631 ~]#

Restart the multipathd service to apply the new friendly names to the new SLOB LUNs as shown below in bolded.

[root@oracle631 ~]# service multipathd restart

ok

Stopping multipathd daemon: [ OK ]

Starting multipathd daemon: [ OK ]

[root@oracle631 ~]# ls -l /dev/mapper

total 0

lrwxrwxrwx 1 root root 8 Aug 22 15:09 ASM_0512B_1 -> ../dm-21

lrwxrwxrwx 1 root root 8 Aug 22 15:09 ASM_4096B_1 -> ../dm-17

lrwxrwxrwx 1 root root 8 Aug 22 15:09 ASM_DATA1 -> ../dm-12

lrwxrwxrwx 1 root root 8 Aug 22 15:09 ASM_DATA2 -> ../dm-13

lrwxrwxrwx 1 root root 8 Aug 22 15:09 ASM_DATA3 -> ../dm-10

lrwxrwxrwx 1 root root 8 Aug 22 15:09 ASM_DATA4 -> ../dm-16

lrwxrwxrwx 1 root root 8 Aug 22 15:09 ASM_DATA5 -> ../dm-11

lrwxrwxrwx 1 root root 8 Aug 22 15:09 ASM_DATA6 -> ../dm-14

lrwxrwxrwx 1 root root 8 Aug 22 15:09 ASM_DATA7 -> ../dm-18

lrwxrwxrwx 1 root root 8 Aug 22 15:09 ASM_DATA8 -> ../dm-15

lrwxrwxrwx 1 root root 7 Aug 22 15:09 ASM_RECO1 -> ../dm-7

lrwxrwxrwx 1 root root 7 Aug 22 15:09 ASM_RECO2 -> ../dm-8

lrwxrwxrwx 1 root root 7 Aug 22 15:09 ASM_RECO3 -> ../dm-5

lrwxrwxrwx 1 root root 7 Aug 22 15:09 ASM_RECO4 -> ../dm-4

lrwxrwxrwx 1 root root 8 Aug 22 15:09 ASM_RECO5 -> ../dm-19

lrwxrwxrwx 1 root root 7 Aug 22 15:09 ASM_RECO6 -> ../dm-3

lrwxrwxrwx 1 root root 7 Aug 22 15:09 ASM_RECO7 -> ../dm-9

lrwxrwxrwx 1 root root 8 Aug 22 15:09 ASM_RECO8 -> ../dm-20

lrwxrwxrwx 1 root root 8 Aug 22 15:09 ASM_SLOB1 -> ../dm-23

lrwxrwxrwx 1 root root 8 Aug 22 15:09 ASM_SLOB2 -> ../dm-22

lrwxrwxrwx 1 root root 8 Aug 22 15:09 ASM_SLOB3 -> ../dm-25

lrwxrwxrwx 1 root root 8 Aug 22 15:09 ASM_SLOB4 -> ../dm-24

lrwxrwxrwx 1 root root 8 Aug 22 15:09 ASM_SLOB5 -> ../dm-29

lrwxrwxrwx 1 root root 8 Aug 22 15:09 ASM_SLOB6 -> ../dm-28

lrwxrwxrwx 1 root root 8 Aug 22 15:09 ASM_SLOB7 -> ../dm-27

lrwxrwxrwx 1 root root 8 Aug 22 15:09 ASM_SLOB8 -> ../dm-26

lrwxrwxrwx 1 root root 7 Aug 22 15:09 ASM_SYSD1 -> ../dm-6

crw-rw---- 1 root root 10, 236 Aug 22 13:21 control

lrwxrwxrwx 1 root root 7 Aug 22 13:21 vg_oracle631-lv_root -> ../dm-0

lrwxrwxrwx 1 root root 7 Aug 22 13:21 vg_oracle631-lv_swap -> ../dm-1

lrwxrwxrwx 1 root root 7 Aug 22 13:21 vg_u00-lv_oracle -> ../dm-2

[root@oracle631 ~]#

Now the LUNs can be added to ASMLib as shown below.

[root@oracle631 ~]# oracleasm createdisk ASM_SLOB1 /dev/mapper/ASM_SLOB1

Writing disk header: done

Instantiating disk: done

[root@oracle631 ~]# oracleasm createdisk ASM_SLOB2 /dev/mapper/ASM_SLOB2

Writing disk header: done

Instantiating disk: done

[root@oracle631 ~]# oracleasm createdisk ASM_SLOB3 /dev/mapper/ASM_SLOB3

Writing disk header: done

Instantiating disk: done

[root@oracle631 ~]# oracleasm createdisk ASM_SLOB4 /dev/mapper/ASM_SLOB4

Writing disk header: done

Instantiating disk: done

[root@oracle631 ~]# oracleasm createdisk ASM_SLOB5 /dev/mapper/ASM_SLOB5

Writing disk header: done

Instantiating disk: done

[root@oracle631 ~]# oracleasm createdisk ASM_SLOB6 /dev/mapper/ASM_SLOB6

Writing disk header: done

Instantiating disk: done

[root@oracle631 ~]# oracleasm createdisk ASM_SLOB7 /dev/mapper/ASM_SLOB7

Writing disk header: done

Instantiating disk: done

[root@oracle631 ~]# oracleasm createdisk ASM_SLOB8 /dev/mapper/ASM_SLOB8

Writing disk header: done

Instantiating disk: done

[root@oracle631 ~]#

Note that the LUNs can also be created in oracleasm programmatically at the command line as shown below.

[root@oracle632 ~]# for lun in `echo 1 2 3 4 5 6 7 8`; do oracleasm createdisk ASM_SLOB${lun} /dev/mapper/ASM_SLOB${lun}; done

Writing disk header: done

Instantiating disk: done

Writing disk header: done

Instantiating disk: done

Writing disk header: done

Instantiating disk: done

Writing disk header: done

Instantiating disk: done

Writing disk header: done

Instantiating disk: done

Writing disk header: done

Instantiating disk: done

Writing disk header: done

Instantiating disk: done

Writing disk header: done

Instantiating disk: done

[root@oracle632 ~]# oracleasm listdisks | grep SLOB

ASM_SLOB1

ASM_SLOB2

ASM_SLOB3

ASM_SLOB4

ASM_SLOB5

ASM_SLOB6

ASM_SLOB7

ASM_SLOB8

[root@oracle632 ~]#

The ASM diskgroup "SLOB" can now be created as shown below. Run the script while connected as the "grid" linux user.

[grid@oracle631 ~]$ pwd

/home/grid

[grid@oracle631 ~]$ ls -lrt crt_SLOB_ts.sql

-rw-r--r-- 1 grid oinstall 255 Aug 22 15:33 crt_SLOB_ts.sql

[grid@oracle631 ~]$ cat crt_SLOB_ts.sql

CREATE DISKGROUP SLOB

EXTERNAL REDUNDANCY

DISK 'ORCL:ASM_SLOB1','ORCL:ASM_SLOB2','ORCL:ASM_SLOB3','ORCL:ASM_SLOB4',

'ORCL:ASM_SLOB5','ORCL:ASM_SLOB6','ORCL:ASM_SLOB7','ORCL:ASM_SLOB8'

ATTRIBUTE

'compatible.asm' = '11.2',

'compatible.rdbms' = '11.2';

[grid@oracle631 ~]$ sqlplus "/ as sysasm"

SQL*Plus: Release 12.1.0.2.0 Production on Fri Aug 22 15:34:14 2014

Copyright (c) 1982, 2014, Oracle. All rights reserved.

Connected to:

Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

With the Automatic Storage Management option

SQL> set time on timing on verify on echo on feedback on

15:34:23 SQL> spool crt_SLOB_ts.log

15:34:32 SQL> @crt_SLOB_ts.sql

15:34:39 SQL> CREATE DISKGROUP SLOB

15:34:39 2 EXTERNAL REDUNDANCY

15:34:39 3 DISK 'ORCL:ASM_SLOB1','ORCL:ASM_SLOB2','ORCL:ASM_SLOB3','ORCL:ASM_SLOB4',

15:34:39 4 'ORCL:ASM_SLOB5','ORCL:ASM_SLOB6','ORCL:ASM_SLOB7','ORCL:ASM_SLOB8'

15:34:39 5 ATTRIBUTE

15:34:39 6 'compatible.asm' = '11.2',

15:34:39 7 'compatible.rdbms' = '11.2';

Diskgroup created.

Elapsed: 00:00:07.66

15:34:46 SQL> exit

Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

With the Automatic Storage Management option

[grid@oracle631 ~]$

The diskgroup has been created. Verify diskgroups using "asmcmd" command as shown below.

[grid@oracle631 ~]$ asmcmd

ASMCMD> lsdg

State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name

MOUNTED EXTERN N 512 4096 1048576 8192 5952 0 5952 0 N DATA/

MOUNTED EXTERN N 512 4096 1048576 8192 8118 0 8118 0 N RECO/

MOUNTED EXTERN N 512 4096 1048576 16384 16318 0 16318 0 N SLOB/

MOUNTED EXTERN N 512 4096 1048576 1024 962 0 962 0 N SYSTEMDG/

ASMCMD>