阿里云-云小站(无限量代金券发放中)
【腾讯云】云服务器、云数据库、COS、CDN、短信等热卖云产品特惠抢购

12C RAC for ASM添加磁盘具体步骤

213次阅读
没有评论

共计 4806 个字符,预计需要花费 13 分钟才能阅读完成。

RHEL 7.2 使用 EMC Powerpath 扩容 2T 磁盘空间,需要添加至以用 12C RAC for ASM 系统中。下面是具体步骤,主机人员告知扩容别名为 data_center_16、data_center_17

1:Linux 7 系统下添加映射存储 LUN(无需重启)
1> 查看机器 HBA 卡信息 – 两个节点机器都得 root 用户执行
#ls /sys/class/fc_host
host0-10
2> 通过修改文件“scan”权限,让系统重新扫描新的硬件设备
echo ‘- – -‘ > /sys/class/scsi_host/host0/scan
echo ‘- – -‘ > /sys/class/scsi_host/host1/scan
echo ‘- – -‘ > /sys/class/scsi_host/host2/scan
echo ‘- – -‘ > /sys/class/scsi_host/host3/scan
echo ‘- – -‘ > /sys/class/scsi_host/host4/scan
echo ‘- – -‘ > /sys/class/scsi_host/host5/scan
echo ‘- – -‘ > /sys/class/scsi_host/host6/scan
echo ‘- – -‘ > /sys/class/scsi_host/host7/scan
echo ‘- – -‘ > /sys/class/scsi_host/host8/scan
echo ‘- – -‘ > /sys/class/scsi_host/host9/scan
echo ‘- – -‘ > /sys/class/scsi_host/host10/scan

3> 查询新识别出的来设备,两个节点机器都得执行 root 用户
#powermt display dev=all
#ls -al /dev/emcpower*
#powermt display
#powermt config
#powermt save

4> 查询新增的扩容盘为 data_center_16、data_center_17
Pseudo name=emcpowert
VNX ID=CKM00141100044 [data_center]
Logical device ID=60060160F7303500ACF6E88706A1E811 [data_center_16]
state=alive; policy=CLAROpt; queued-IOs=0
Owner: default=SP B, current=SP B Array failover mode: 4

=====================================
————— Host ————— – Stor – — I/O Path — — Stats —

HW Path I/O Paths Interf. Mode State Q-IOs Errors

=====================================
9 lpfc sdcx SP B0 active alive 0 0
9 lpfc sdcv SP A1 active alive 0 0
1 lpfc sdct SP A0 active alive 0 0
1 lpfc sdcr SP B1 active alive 0 0

Pseudo name=emcpoweru
VNX ID=CKM00141100044 [data_center]
Logical device ID=60060160F7303500ADF6E88706A1E811 [data_center_17]
state=alive; policy=CLAROpt; queued-IOs=0
Owner: default=SP B, current=SP B Array failover mode: 4

————— Host ————— – Stor – — I/O Path — — Stats —

HW Path I/O Paths Interf. Mode State Q-IOs Errors

=====================================
9 lpfc sdcy SP B0 active alive 0 0
9 lpfc sdcw SP A1 active alive 0 0
1 lpfc sdcu SP A0 active alive 0 0
1 lpfc sdcs SP B1 active alive 0 0

并且查看有关系统信息是否有 emcpowert、emcpoweru 此次扩容盘别名
cat /proc/partitions | awk {‘print $4’} |grep emcpower|sort

5> 执行 root 下脚本 asm_udev_ol7.sh

[root@dwdb1 ~]# more asm_udev_ol7.sh
#!/bin/bash
for i in $(cat /proc/partitions | awk {‘print $4’} |grep emcpower|sort);
do
echo “ACTION==\”add|change\”, KERNEL==\”emcpower*\”, ENV{DEVTYPE}==\”disk\”,SUBSYSTEM==\”block\”, PROGRAM==\”
/usr/lib/udev/scsi_id -g -u -d –whitelisted –replace-whitespace –device=\$devnode\”, RESULT==\”/usr/lib/u<br/>dev/scsi_id -g -u -d –whitelisted –replace-whitespace –device=/dev/$i\”,RUN+=\”/bin/sh -c ‘mknod /dev/asm
-$i b \$major \$minor; chown grid:asmadmin /dev/asm-$i; chmod 0660 /dev/asm-$i’\”” >> /etc/udev/rules.d/
99-Oracle-asmdevices.rules_bak
done

6> 生成的 /etc/udev/rules.d/99-oracle-asmdevices.rules_bak 中取出(360060160f7303500acf6e88706a1)
ACTION==”add|change”, KERNEL==”emcpower”, ENV{DEVTYPE}==”disk”,SUBSYSTEM==”block”, PROGRAM==”/usr/lib/udev/s
csi_id -g -u -d –whitelisted –replace-whitespace –device=$devnode”, RESULT==”360060160f7303500acf6e88706a1
e811″,RUN+=”/bin/sh -c ‘mknod /dev/asm-emcpowert b $major $minor; chown grid:asmadmin /dev/asm-emcpowert; chm
od 0660 /dev/asm-emcpowert'”
ACTION==”add|change”, KERNEL==”emcpower”, ENV{DEVTYPE}==”disk”,SUBSYSTEM==”block”, PROGRAM==”/usr/lib/udev/s
csi_id -g -u -d –whitelisted –replace-whitespace –device=$devnode”, RESULT==”360060160f7303500adf6e88706a1
e811″,RUN+=”/bin/sh -c ‘mknod /dev/asm-emcpoweru b $major $minor; chown grid:asmadmin /dev/asm-emcpoweru; chm
od 0660 /dev/asm-emcpoweru'”

7> 然后 vi /etc/udev/rules.d/99-oracle-asmdevices.rules 新增两条信息,将改好的文件,scp 到节点二。

ACTION==”add|change”, KERNEL==”emcpower”, ENV{DEVTYPE}==”disk”,SUBSYSTEM==”block”, PROGRAM==”/usr/lib/udev/s
csi_id -g -u -d –whitelisted –replace-whitespace –device=$devnode”, RESULT==”360060160f7303500acf6e88706a1
e811″,RUN+=”/bin/sh -c ‘mknod /dev/asm-data15 b $major $minor; chown grid:asmadmin /dev/asm-data15; chmod 066
0 /dev/asm-data15′”
ACTION==”add|change”, KERNEL==”emcpower”, ENV{DEVTYPE}==”disk”,SUBSYSTEM==”block”, PROGRAM==”/usr/lib/udev/s
csi_id -g -u -d –whitelisted –replace-whitespace –device=$devnode”, RESULT==”360060160f7303500adf6e88706a1
e811″,RUN+=”/bin/sh -c ‘mknod /dev/asm-data16 b $major $minor; chown grid:asmadmin /dev/asm-data16; chmod 066
0 /dev/asm-data16′”

2、udev 确认 99.rules 文件在两边后,两个节点执行以下命令;
/sbin/udevadm control –reload
/sbin/udevadm trigger –type=devices –action=change
检查磁盘是否属组正确

3、ASM 磁盘组加磁盘或创建新的磁盘组。
[grid@dwdb1 ~]$ sqlplus / as sysasm
sysasm$alter diskgroup DATA add disk ‘/dev/asm-data15′,’/dev/asm-data16’ rebalance power 10; ### 该参数可以动态调整,10 太慢的话,可以改到中间值 5.

– 查看执行效率
select group_number,operation,state ,power,est_minutes from v$asm_operation;

– 等到执行完成后,改回 1,11 值为最小性能,1 为最大性能
alter diskgroup DATA rebalance power 1;

– 至此扩容工作已经完成,下面是具体监控办法
– 检查 header_status 状态,不应该有 MEMBER 以外的状态
select group_number,disk_number,name,state,path,header_status from v$asm_disk;

– 监控 alert 日志输出结果
2018-08-17T16:43:33.399676+08:00
NOTE: Assigning number (3,14) to disk (/dev/asm-data15)
SUCCESS: completed reconfiguration of group 3 (DATA)
NOTE: Assigning number (3,15) to disk (/dev/asm-data16)
SUCCESS: completed reconfiguration of group 3 (DATA)

– 监控查看 rebalance 进度,完成后查询为空,改回 power 为 1
select inst_id, operation, state, power, sofar, est_work, est_rate, est_minutes from gv$asm_operation;

正文完
星哥玩云-微信公众号
post-qrcode
 0
星锅
版权声明:本站原创文章,由 星锅 于2022-01-22发表,共计4806字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
【腾讯云】推广者专属福利,新客户无门槛领取总价值高达2860元代金券,每种代金券限量500张,先到先得。
阿里云-最新活动爆款每日限量供应
评论(没有评论)
验证码
【腾讯云】云服务器、云数据库、COS、CDN、短信等云产品特惠热卖中