top of page

Resizing ASM Disks

  • Writer: ergemp
    ergemp
  • Jan 7, 2021
  • 3 min read

Updated: Jan 26, 2021

On my previous blog post, Online LUN resize with EF560 and Linux, i have covered how to resize volumes on linux with multi-path configuration after resizing LUNs on the storage. This post is a follow-up and covers the resize operations on ASM disks. As i do on all my posts, version of the operating system, Oracle GI and storage is as follows


[oracle@tslnx01 ~]$ sqlplus / as sysasm

SQL*Plus: Release 11.2.0.4.0 Production on Mon Sep 28 15:19:43 2015

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

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Automatic Storage Management option

SQL> select version from v$instance;   

VERSION
-----------------
11.2.0.4.0

[oracle@tslnx01 ~]$ uname -a
Linux tslnx01 3.8.13-44.1.1.el6uek.x86_64 #2 SMP Wed Sep 10 06:10:25 PDT 2014 x86_64 x86_64 x86_64 GNU/Linux

[oracle@tslnx01 ~]$ cat /etc/oracle-release
Oracle Linux Server release 6.6

[oracle@tslnx01 ~]$

Before starting the operations on ASM, first login with oracle user and set the required environment settings. After that, we are going to use asmca to create an ASM disk group. At this point, the same ASM disk group could be created via asmcmd and/or sqlplus as well. But on this post, i am going to use asmca as it is visually enhanced.


[root@tslnx01 ~]# su - oracle
[oracle@tslnx01 ~]$ grid
[oracle@tslnx01 ~]$ $ORACLE_HOME/bin/asmca
[oracle@tslnx01 ~]$ $ORACLE_HOME/bin/asmca











Now, the disk size is 10GB at the time we defined the ASM disk group. Let's resize the LUNs on the storage to 60GB and reconfigure our multi-path software. For this operation you can check my previous post Linux ile Online LUN resize. After that we should see the disk size as 60GB on the multupath.


[root@tslnx01 rules.d]# multipath -ll mpatho
mpatho (360080e500029b50c0000012155a341ed) dm-0 NETAPP,INF-01-00
size=10G features='3 queue_if_no_path pg_init_retries 50' hwhandler='1 rdac' wp=rw
|-+- policy='round-robin 0' prio=14 status=active
| |- 1:0:0:0 sdb  8:16   active ready running
| `- 2:0:0:0 sdr  65:16  active ready running
`-+- policy='round-robin 0' prio=9 status=enabled
  |- 1:0:1:0 sdj  8:144  active ready running
  `- 2:0:1:0 sdz  65:144 active ready running
[root@tslnx01 rules.d]# 

[root@tslnx01 ~]# multipath -ll mpatho
mpatho (360080e500029b50c0000012155a341ed) dm-0 NETAPP,INF-01-00
size=60G features='3 queue_if_no_path pg_init_retries 50' hwhandler='1 rdac' wp=rw
|-+- policy='round-robin 0' prio=14 status=active
| |- 1:0:0:0 sdb  8:16   active ready running
| `- 2:0:0:0 sdr  65:16  active ready running
`-+- policy='round-robin 0' prio=9 status=enabled
  |- 1:0:1:0 sdj  8:144  active ready running
  `- 2:0:1:0 sdz  65:144 active ready running

After resizing the LUNs and Multipath, we should resize the corresponding disks on ASM as well. For this, alter diskgroup ... resize disk ... command should be enough. ASM will perceive the new size and resize the disk


[oracle@tslnx01 ~]$ $ORACLE_HOME/bin/asmcmd -p
ASMCMD [+] > lsdsk
Path
/dev/mapper/mpatho
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     10240    10188                0           10188              0             N  DATA/
ASMCMD [+] > 

[oracle@tslnx01 ~]$ sqlplus / as sysasm

SQL*Plus: Release 11.2.0.4.0 Production on Wed Sep 16 13:46:02 2015

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Automatic Storage Management option

SQL> col path format a50
SQL> set linesize 400
SQL> select name, path, total_mb from v$asm_disk

NAME            PATH                                TOTAL_MB
--------------- ----------------------------------- ---------
                /dev/mapper/mpathv                  0
                /dev/mapper/mpaths                  0
                /dev/mapper/mpathp                  0
                /dev/mapper/mpathr                  0
                /dev/mapper/mpathu                  0
                /dev/mapper/mpatht                  0
                /dev/mapper/mpathq                  0
DATA_0000       /dev/mapper/mpatho                                      10240

8 rows selected.

SQL> alter diskgroup DATA resize disk DATA_0000;

Diskgroup altered.

SQL> select name, path, total_mb from v$asm_disk

NAME            PATH                                TOTAL_MB
--------------- ----------------------------------- ----------
                /dev/mapper/mpathv                  0
                /dev/mapper/mpaths                  0
                /dev/mapper/mpathp                  0
                /dev/mapper/mpathr                  0
                /dev/mapper/mpathu                  0
                /dev/mapper/mpatht                  0
                /dev/mapper/mpathq                  0
DATA_0000       /dev/mapper/mpatho                  61440

8 rows selected.
SQL>

Comentários


github logo

Istanbul, Turkey

  • kisspng-computer-icons-logo-portable-network-graphics-clip-icons-for-free-iconza-circle-so
  • Blogger
  • LinkedIn
Contact

Thanks for submitting!

bottom of page