Changing the disk size in ASM

If we need to change the physical disk layout of a disk used in ASM, we need to first resize the disk at ASM level and then from the OS level. If we don’t do so, we will get “ORA-15036: disk ‘diskname’ is truncated” error.

This error is mainly due to the disk size information mismatch at OS & ASM level. When a disk is added in ASM diskgroup, ASM writes the metadata in the disk header, which also includes the size of the disk (use kfed to check this information).

Following are the ASM setup details

SQL> select name, state from v$asm_diskgroup
/

NAME STATE
—————————— ———–
DATA MOUNTED
FLASH MOUNTED

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

NAME PATH HEADER_STATU TOTAL_MB FREE_MB
————— —————————- ———— ———- ———-

FLASH_0000 /dev/rdsk/c2t20120002AC000212d9s4 MEMBER 1996 1976
FLASH_0001 /dev/rdsk/c2t20120002AC000212d9s5 MEMBER 1000 990
FLASH_0002 /dev/rdsk/c2t20120002AC000212d9s6 MEMBER 2115 2091
DATA_0001 /dev/rdsk/c2t20120002AC000212d4s6 MEMBER 102343 102319
DATA_0000 /dev/rdsk/c2t20120002AC000212d3s6 MEMBER 102343 102315

-bash-3.00$ kfed read ‘/dev/rdsk/c2t20120002AC000212d9s4’
grep kfdhdb.dsksize

kfdhdb.dsksize: 1996 ; 0x0c4: 0x000007cc

Following is the physical disk structure

To change the size of the ASM disk use

SQL> alter diskgroup FLASH resize disk FLASH_0000 size 1500m
/
Diskgroup altered.

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

NAME PATH HEADER_STATU TOTAL_MB FREE_MB
————— —————————- ———— ———- ———-

FLASH_0000 /dev/rdsk/c2t20120002AC000212d9s4 MEMBER 1500 1483
FLASH_0001 /dev/rdsk/c2t20120002AC000212d9s5 MEMBER 1000 987
FLASH_0002 /dev/rdsk/c2t20120002AC000212d9s6 MEMBER 2115 2091
DATA_0001 /dev/rdsk/c2t20120002AC000212d4s6 MEMBER 102343 102319
DATA_0000 /dev/rdsk/c2t20120002AC000212d3s6 MEMBER 102343 102315

-bash-3.00$ kfed read ‘/dev/rdsk/c2t20120002AC000212d9s4’
grep kfdhdb.dsksize

kfdhdb.dsksize: 1500 ; 0x0c4: 0x000005dc

Now we can change the size of the physical disk using OS utility (format in this case).

If we would have done other way round, i.e. first changing the size at OS level, ASM would not have started, throwing following error.

ORA-15032: not all alterations performed
ORA-15036: disk ‘/dev/rdsk/c2t20120002AC000212d9s4’ is truncated

Advertisements
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