Add ASM DG (4K)

This blog shows how to create a 4K advanced format ASM diskgroup at the command line as shown below. First verify that all LUNs being added to the diskgroup are 4K logical / 4K physical format as shown below.

[root@oracle632 ~]# oracleasm querydisk /dev/mapper/ASM_DATA1

Device "/dev/mapper/ASM_DATA1" is marked an ASM disk with the label "ASM_DATA1"

[root@oracle632 ~]# oracleasm querydisk /dev/mapper/ASM_DATA2

Device "/dev/mapper/ASM_DATA2" is marked an ASM disk with the label "ASM_DATA2"

[root@oracle632 ~]# oracleasm querydisk /dev/mapper/ASM_DATA3

Device "/dev/mapper/ASM_DATA3" is marked an ASM disk with the label "ASM_DATA3"

[root@oracle632 ~]# oracleasm querydisk /dev/mapper/ASM_DATA4

Device "/dev/mapper/ASM_DATA4" is marked an ASM disk with the label "ASM_DATA4"

[root@oracle632 ~]# oracleasm querydisk /dev/mapper/ASM_DATA5

Device "/dev/mapper/ASM_DATA5" is marked an ASM disk with the label "ASM_DATA5"

[root@oracle632 ~]# oracleasm querydisk /dev/mapper/ASM_DATA5

Device "/dev/mapper/ASM_DATA5" is marked an ASM disk with the label "ASM_DATA5"

[root@oracle632 ~]# oracleasm querydisk /dev/mapper/ASM_DATA6

Device "/dev/mapper/ASM_DATA6" is marked an ASM disk with the label "ASM_DATA6"

[root@oracle632 ~]# oracleasm querydisk /dev/mapper/ASM_DATA7

Device "/dev/mapper/ASM_DATA7" is marked an ASM disk with the label "ASM_DATA7"

[root@oracle632 ~]# oracleasm querydisk /dev/mapper/ASM_DATA8

Device "/dev/mapper/ASM_DATA8" is marked an ASM disk with the label "ASM_DATA8"

[root@oracle632 ~]#

[root@oracle632 ~]# fdisk -l /dev/mapper/ASM_DATA[12345678] | grep logical

Sector size (logical/physical): 4096 bytes / 4096 bytes

Sector size (logical/physical): 4096 bytes / 4096 bytes

Sector size (logical/physical): 4096 bytes / 4096 bytes

Sector size (logical/physical): 4096 bytes / 4096 bytes

Sector size (logical/physical): 4096 bytes / 4096 bytes

Sector size (logical/physical): 4096 bytes / 4096 bytes

Sector size (logical/physical): 4096 bytes / 4096 bytes

Sector size (logical/physical): 4096 bytes / 4096 bytes

[root@oracle632 ~]#

Create the ASM diskgroup as shown below.

[grid@oracle632 ~]$ pwd

/home/grid

[grid@oracle632 ~]$ ls -lrt crt_DATA_ts.sql

-rw-r--r-- 1 grid oinstall 301 Aug 22 15:59 crt_DATA_ts.sql

[grid@oracle632 ~]$ cat crt_DATA_ts.sql

CREATE DISKGROUP DATA

EXTERNAL REDUNDANCY

DISK 'ORCL:ASM_DATA1','ORCL:ASM_DATA2','ORCL:ASM_DATA3','ORCL:ASM_DATA4',

'ORCL:ASM_DATA5','ORCL:ASM_DATA6','ORCL:ASM_DATA7','ORCL:ASM_DATA8'

ATTRIBUTE

'sector_size' = '4096',

'compatible.asm' = '11.2',

'compatible.rdbms' = '11.2';

[grid@oracle631 ~]$

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

SQL*Plus: Release 12.1.0.2.0 Production on Fri Aug 22 16:03: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 feedback on echo on

16:03:25 SQL> spool crt_DATA_ts.log

16:03:41 SQL> @crt_DATA_ts.sql

16:03:49 SQL> CREATE DISKGROUP DATA

16:03:49 2 EXTERNAL REDUNDANCY

16:03:49 3 DISK 'ORCL:ASM_DATA1','ORCL:ASM_DATA2','ORCL:ASM_DATA3','ORCL:ASM_DATA4',

16:03:49 4 'ORCL:ASM_DATA5','ORCL:ASM_DATA6','ORCL:ASM_DATA7','ORCL:ASM_DATA8'

16:03:49 5 ATTRIBUTE

16:03:49 6 'sector_size' = '4096',

16:03:49 7 'compatible.asm' = '11.2',

16:03:49 8 'compatible.rdbms' = '11.2';

Diskgroup created.

Elapsed: 00:00:08.18

16:03:57 SQL>

16:03:57 SQL> exit

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

With the Automatic Storage Management option

[grid@oracle632 ~]$

Verify the ASM diskgroup using the "asmcmd" command as shown below.

[grid@oracle632 ~]$ 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 4096 4096 1048576 4096 4030 0 4030 0 N DATA/

MOUNTED EXTERN N 512 4096 1048576 512 450 0 450 0 N SYSTEMDG/

ASMCMD> exit

[grid@oracle632 ~]$