Agrandir un disk ASM suite à un agrandissement physique du LUN (multipath)

 
 
Je vais aujourd’hui vous aider à agrandir vos disks ASM dans une configuration avec du multipath en cas d’agrandissement physique des LUNs.
 
 

 
Récupérez les informations sur le LUN :

[root@node1 mapper]# multipath -l DC_ASM_800G_66
 DC_ASM_800G_66 (3600507680c8001271800000000000066) dm-7 IBM,2145
 size=800G features='1 queue_if_no_path' hwhandler='0' wp=rw
 |-+- policy='round-robin 0' prio=0 status=active
 | |- 1:0:2:2 sdap 66:144 active undef running
 | `- 2:0:3:2 sdgu 132:160 active undef running
 `-+- policy='round-robin 0' prio=0 status=enabled
 |- 1:0:0:2 sdd 8:48 active undef running
 `- 2:0:0:2 sded 128:80 active undef running

 
Scannez le LUN afin de mettre à jour ses informations :

[root@node1 mapper]# echo 1 > /sys/block/sdap/device/rescan
[root@node1 mapper]# echo 1 > /sys/block/sdgu/device/rescan
[root@node1 mapper]# echo 1 > /sys/block/sdd/device/rescan
[root@node1 mapper]# echo 1 > /sys/block/sded/device/rescan
[root@node1 mapper]# multipathd -k'resize map DC_ASM_800G_66'

 
Vérifiez que l’agrandissement a bien été pris en compte :

[root@node1 mapper]# multipath -l DC_ASM_800G_66
 DC_ASM_800G_66 (3600507680c8001271800000000000066) dm-7 IBM,2145
 size=1000G features='1 queue_if_no_path' hwhandler='0' wp=rw
 |-+- policy='round-robin 0' prio=0 status=active
 | |- 1:0:2:2 sdap 66:144 active undef running
 | `- 2:0:3:2 sdgu 132:160 active undef running
 `-+- policy='round-robin 0' prio=0 status=enabled
 |- 1:0:0:2 sdd 8:48 active undef running
 `- 2:0:0:2 sded 128:80 active undef running

 
L’opération est à répéter sur chaque nœud :

[root@node2 mapper]# multipath -l DC_ASM_800G_66
 DC_ASM_800G_66 (3600507680c8001271800000000000066) dm-35 IBM,2145
 size=800G features='1 queue_if_no_path' hwhandler='0' wp=rw
 |-+- policy='round-robin 0' prio=0 status=active
 | |- 1:0:3:2 sdbo 68:32 active undef running
 | `- 2:0:2:2 sdgh 131:208 active undef running
 `-+- policy='round-robin 0' prio=0 status=enabled
 |- 1:0:2:2 sdbh 67:176 active undef running
 `- 2:0:3:2 sdgo 132:64 active undef running
[root@node2 mapper]# echo 1 > /sys/block/sdbo/device/rescan
[root@node2 mapper]# echo 1 > /sys/block/sdgh/device/rescan
[root@node2 mapper]# echo 1 > /sys/block/sdbh/device/rescan
[root@node2 mapper]# echo 1 > /sys/block/sdgo/device/rescan
[root@node2 mapper]# multipathd -k'resize map DC_ASM_800G_66'
[root@node2 mapper]# multipath -l DC_ASM_800G_66
 DC_ASM_800G_66 (3600507680c8001271800000000000066) dm-35 IBM,2145
 size=1000G features='1 queue_if_no_path' hwhandler='0' wp=rw
 |-+- policy='round-robin 0' prio=0 status=active
 | |- 1:0:3:2 sdbo 68:32 active undef running
 | `- 2:0:2:2 sdgh 131:208 active undef running
 `-+- policy='round-robin 0' prio=0 status=enabled
 |- 1:0:2:2 sdbh 67:176 active undef running
 `- 2:0:3:2 sdgo 132:64 active undef running

 
Vous n’avez plus qu’a mettre à jour la taille du diskgroup :

-bash-3.2$ . oraenv
 ORACLE_SID = [+ASM1] ?
 The Oracle base for ORACLE_HOME=/u01/grid/11.2.0 is /u01/app
-bash-3.2$ sqlplus / as sysasm
SQL*Plus: Release 11.2.0.3.0 Production on Tue Jun 26 11:32:27 2018
Copyright (c) 1982, 2011, Oracle. All rights reserved.Connected to:
 Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
 With the Real Application Clusters and Automatic Storage Management options
SQL>alter diskgroup ECARPRD_DATA01 resize all;

 
J’espère que cela vous simplifiera l’administration de vos disks ASM.