ASM - Migrate Disks
In this example we migrate from one set of disks to another within the ORADATA2 diskgroup on AIX...
FROM: hdisk69 (asm69), hdisk70 (asm70), hdisk103 (asm103), hdisk104 (asm104), and hdisk105 (asm105)
TO: hdisk20 (asm20), hdisk21 (asm21), hdisk22 (asm22), hdisk23 ( asm23), and hdisk24 (asm24).
We are using hard links so that, for example, hdisk20 and asm20 reference the same disk.The instructions on this page assume you have created the scripts in /u01/dba/asm as described on the main ASM page hereHard Links (Common Names) for New Disks
All commands executed as 'root'...Determine Major/Minor numbers of new disks
for disk in hdisk20 hdisk21 hdisk22 hdisk23 hdisk24
do
ls -alF /dev/r${disk}| \
tr ',' ' ' | \
awk '{ print " Major: " $5 " Minor: "$6 }'|\
while read line
do
echo "${disk} ${line}"
done
done
Make Common Name
mknod /dev/asm20 c 44 26
mknod /dev/asm21 c 44 27
mknod /dev/asm22 c 44 28
mknod /dev/asm23 c 44 29
mknod /dev/asm24 c 44 30
Set Ownership
chown oracle:dba /dev/asm20
chown oracle:dba /dev/asm21
chown oracle:dba /dev/asm22
chown oracle:dba /dev/asm23
chown oracle:dba /dev/asm24
Set Permissions
chmod 640 /dev/asm20
chmod 640 /dev/asm21
chmod 640 /dev/asm22
chmod 640 /dev/asm23
chmod 640 /dev/asm24
Check
ls -alF /dev | grep "44, 26"
ls -alF /dev | grep "44, 27"
ls -alF /dev | grep "44, 28"
ls -alF /dev | grep "44, 29"
ls -alF /dev | grep "44, 30"
On AIX you would expect three device files for each major/minor number combination e.g. asm20, hdisk20 and rhdisk20Add Candidate Disks to Diskgroup
ALTER DISKGROUP oradata2 ADD DISK '/dev/asm20','/dev/asm21','/dev/asm22','/dev/asm23','/dev/asm24';
Drop Old Disks from Diskgroup
ALTER DISKGROUP oradata2 DROP DISK ORADATA2_0000, ORADATA2_0001, ORADATA2_0002, ORADATA2_0003, ORADATA2_0004;
Remember that disks won't drop until rebalance is complete.
@/u01/dba/asm/ops
GROUP_NUMBER OPERA STAT POWER ACTUAL SOFAR EST_WORK EST_RATE EST_MINUTES------------ ----- ---- ---------- ---------- ---------- ---------- ---------- ----------- 1 REBAL RUN 1 1 10347 129415 883 134Remember you can change the rebalance power (at the risk of impacting database performance) using...
ALTER DISKGROUP oradata2 REBALANCE POWER 6;
Where power is a number from 0 (stop) to 11 (fastest)Remove disks from OS
All commands executed as 'root'...rmdev -dl hdisk69
rmdev -dl hdisk70
rmdev -dl hdisk103
rmdev -dl hdisk104
rmdev -dl hdisk105