Add new disk to ASM diskgroup oracle (multipath)
ADDING NEW SAN DISK TO EXISTING ASM DISK_GROUP
First Check the current attached disks number
#cat /proc/scsi/scsi | egrep -i 'Host:' | wc -l
----- #fdisk -l 2>/dev/null | egrep '^Disk' | egrep -v 'dm-' | wc -l
Check current multipath setup using multipath or powermt command
# multipath -l
mpath2 (36006016015501c0018c07c18e0d8dc11)
[size=68 GB][features="1 queue_if_no_path"][hwhandler="1 emc"]
\_ round-robin 0 [active]
\_ 0:0:0:2 sdc 8:32 [active]
\_ round-robin 0 [enabled]
\_ 1:0:0:2 sdi 8:128 [active]
mpath1 (36006016015501c0084227c0ee0d8dc11)
[size=68 GB][features="1 queue_if_no_path"][hwhandler="1 emc"]
\_ round-robin 0 [active]
\_ 1:0:0:1 sdh 8:112 [active]
\_ round-robin 0 [enabled]
\_ 0:0:0:1 sdb 8:16 [active]
mpath0 (36006016015501c00b6de3705e0d8dc11)
[size=68 GB][features="1 queue_if_no_path"][hwhandler="1 emc"]
\_ round-robin 0 [active]
\_ 0:0:0:0 sda 8:0 [active]
\_ round-robin 0 [enabled]
\_ 1:0:0:0 sdg 8:96 [active]
>>>>>Scan for LUNS (in all nodes of RAC)
Note this is for 2.6 kernel
# ls /sys/class/fc_host
host0 host1
#echo "1" > /sys/class/fc_host/host0/issue_lip
#echo "1" > /sys/class/fc_host/host1/issue_lip
another time check multipath -l to check new multipath that founded
for creating alias for multipath you can edit /etc/multipath.conf and add new multipath like below (in all nodes of RAC)
blacklist {
devnode "^(ramrawloopfdmddm-srscdst)[0-9]*"
devnode "^hd[a-z]"
devnode "^cciss!c[0-9]d[0-9]*"
}
multipaths {
multipath {
wwid 3600c0ff00025f69165c4975601000000
alias data001
path_grouping_policy failover
}
multipath {
wwid 3600c0ff00025f691a9539b5601000000
alias fra001
path_grouping_policy failover
}
multipath {
wwid 3600c0ff00025f69243539b5601000000
alias new_multipth_alias
path_grouping_policy failover
}
}
after edit multipath.conf , reload multipath: (in all nodes of RAC)
service multipathd reload
format new disk by fdisk:
fdiak /dev/mapper/new_multipath_alias and so..... n p 1 w
create new oracleasm disk
oracleasm listdisks
oracleasm createdisk new_disk_name /dev/mapper/new_multipath_alias
oracleasm listdisks
log in to sqlplus by sysasm and grid user and find new disk path
GRID>sqlplus / as sysasm
SQL>select GROUP_NUMBER,DISK_NUMBER,STATE,name,path,MOUNT_STATUS,HEADER_STATUS from v$asm_disk;
GROUP_NUMBER DISK_NUMBER STATE NAME PATH MOUNT_S HEADER_STATU
———— ———– ——– ————– ——————————— ——- ————
0 0 NORMAL /dev/oracleasm/disks/ARC_LOG02 CLOSED PROVISIONED
2 0 NORMAL ARC_LOG_0000 /dev/oracleasm/disks/ARC_LOG01 CACHED MEMBER
1 0 NORMAL OCR_VOTE_0000 /dev/oracleasm/disks/OCR_VOTE01 CACHED MEMBER
3 4 NORMAL DB_DATA_0004 /dev/oracleasm/disks/new_disk_name CACHED MEMBER
or maybe
GROUP_NUMBER DISK_NUMBER STATE NAME PATH MOUNT_S HEADER_STATU
1 0 NORMAL DATA001 ORCL:DATA001 CACHED MEMBER
2 0 NORMAL FRA01 ORCL:new_disk_name
after that add this disk to existing disk_group:
GRID>
SQL>ALTER DISKGROUP ARC_LOG ADD DISK ‘/dev/oracleasm/disks/new_disk_name' NOFORCE ;
or
SQL>ALTER DISKGROUP ARC_LOG(oracle diskgroup name) ADD DISK ‘ORCL:new_disk_name' NOFORCE ; → 'ORCL:data001'
You can verify the rebalancing operation by below SQL command.
SQL> select * from v$asm_operation ;
GROUP_NUMBER OPERA STAT POWER ACTUAL SOFAR EST_WORK EST_RATE EST_MINUTES ERROR_CODE
———— —– —- ———- ———- ———- ———- ———————————-
1 REBAL RUN 1 1 5046 5631 4780 0
First Check the current attached disks number
#cat /proc/scsi/scsi | egrep -i 'Host:' | wc -l
----- #fdisk -l 2>/dev/null | egrep '^Disk' | egrep -v 'dm-' | wc -l
Check current multipath setup using multipath or powermt command
# multipath -l
mpath2 (36006016015501c0018c07c18e0d8dc11)
[size=68 GB][features="1 queue_if_no_path"][hwhandler="1 emc"]
\_ round-robin 0 [active]
\_ 0:0:0:2 sdc 8:32 [active]
\_ round-robin 0 [enabled]
\_ 1:0:0:2 sdi 8:128 [active]
mpath1 (36006016015501c0084227c0ee0d8dc11)
[size=68 GB][features="1 queue_if_no_path"][hwhandler="1 emc"]
\_ round-robin 0 [active]
\_ 1:0:0:1 sdh 8:112 [active]
\_ round-robin 0 [enabled]
\_ 0:0:0:1 sdb 8:16 [active]
mpath0 (36006016015501c00b6de3705e0d8dc11)
[size=68 GB][features="1 queue_if_no_path"][hwhandler="1 emc"]
\_ round-robin 0 [active]
\_ 0:0:0:0 sda 8:0 [active]
\_ round-robin 0 [enabled]
\_ 1:0:0:0 sdg 8:96 [active]
>>>>>Scan for LUNS (in all nodes of RAC)
Note this is for 2.6 kernel
# ls /sys/class/fc_host
host0 host1
#echo "1" > /sys/class/fc_host/host0/issue_lip
#echo "1" > /sys/class/fc_host/host1/issue_lip
another time check multipath -l to check new multipath that founded
for creating alias for multipath you can edit /etc/multipath.conf and add new multipath like below (in all nodes of RAC)
blacklist {
devnode "^(ramrawloopfdmddm-srscdst)[0-9]*"
devnode "^hd[a-z]"
devnode "^cciss!c[0-9]d[0-9]*"
}
multipaths {
multipath {
wwid 3600c0ff00025f69165c4975601000000
alias data001
path_grouping_policy failover
}
multipath {
wwid 3600c0ff00025f691a9539b5601000000
alias fra001
path_grouping_policy failover
}
multipath {
wwid 3600c0ff00025f69243539b5601000000
alias new_multipth_alias
path_grouping_policy failover
}
}
after edit multipath.conf , reload multipath: (in all nodes of RAC)
service multipathd reload
format new disk by fdisk:
fdiak /dev/mapper/new_multipath_alias and so..... n p 1 w
create new oracleasm disk
oracleasm listdisks
oracleasm createdisk new_disk_name /dev/mapper/new_multipath_alias
oracleasm listdisks
log in to sqlplus by sysasm and grid user and find new disk path
GRID>sqlplus / as sysasm
SQL>select GROUP_NUMBER,DISK_NUMBER,STATE,name,path,MOUNT_STATUS,HEADER_STATUS from v$asm_disk;
GROUP_NUMBER DISK_NUMBER STATE NAME PATH MOUNT_S HEADER_STATU
———— ———– ——– ————– ——————————— ——- ————
0 0 NORMAL /dev/oracleasm/disks/ARC_LOG02 CLOSED PROVISIONED
2 0 NORMAL ARC_LOG_0000 /dev/oracleasm/disks/ARC_LOG01 CACHED MEMBER
1 0 NORMAL OCR_VOTE_0000 /dev/oracleasm/disks/OCR_VOTE01 CACHED MEMBER
3 4 NORMAL DB_DATA_0004 /dev/oracleasm/disks/new_disk_name CACHED MEMBER
or maybe
GROUP_NUMBER DISK_NUMBER STATE NAME PATH MOUNT_S HEADER_STATU
1 0 NORMAL DATA001 ORCL:DATA001 CACHED MEMBER
2 0 NORMAL FRA01 ORCL:new_disk_name
after that add this disk to existing disk_group:
GRID>
SQL>ALTER DISKGROUP ARC_LOG ADD DISK ‘/dev/oracleasm/disks/new_disk_name' NOFORCE ;
or
SQL>ALTER DISKGROUP ARC_LOG(oracle diskgroup name) ADD DISK ‘ORCL:new_disk_name' NOFORCE ; → 'ORCL:data001'
You can verify the rebalancing operation by below SQL command.
SQL> select * from v$asm_operation ;
GROUP_NUMBER OPERA STAT POWER ACTUAL SOFAR EST_WORK EST_RATE EST_MINUTES ERROR_CODE
———— —– —- ———- ———- ———- ———- ———————————-
1 REBAL RUN 1 1 5046 5631 4780 0
Comments
Post a Comment