溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

12C RAC for ASM添加磁盤步驟

發(fā)布時(shí)間:2020-04-09 16:10:10 來(lái)源:網(wǎng)絡(luò) 閱讀:2482 作者:yangjunfeng 欄目:關(guān)系型數(shù)據(jù)庫(kù)

RHEL 7.2使用EMC Powerpath擴(kuò)容2T磁盤空間,需要添加至以用12C RAC for ASM系統(tǒng)中。下面是具體步驟,主機(jī)人員告知擴(kuò)容別名為data_center_16、data_center_17

1:linux 7 系統(tǒng)下添加映射存儲(chǔ)LUN(無(wú)需重啟)
1>查看機(jī)器HBA卡信息--兩個(gè)節(jié)點(diǎn)機(jī)器都得root用戶執(zhí)行
#ls /sys/class/fc_host
host0-10
2>通過(guò)修改文件“scan”權(quán)限,讓系統(tǒng)重新掃描新的硬件設(shè)備
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>查詢新識(shí)別出的來(lái)設(shè)備,兩個(gè)節(jié)點(diǎn)機(jī)器都得執(zhí)行root用戶
#powermt display dev=all
#ls -al /dev/emcpower*
#powermt display
#powermt config
#powermt save

4>查詢新增的擴(kuò)容盤為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

并且查看有關(guān)系統(tǒng)信息是否有emcpowert、emcpoweru此次擴(kuò)容盤別名
cat /proc/partitions | awk {'print $4'} |grep emcpower|sort

5> 執(zhí)行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到節(jié)點(diǎn)二。

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 確認(rèn)99.rules文件在兩邊后,兩個(gè)節(jié)點(diǎn)執(zhí)行以下命令;
/sbin/udevadm control --reload
/sbin/udevadm trigger --type=devices --action=change
檢查磁盤是否屬組正確

3、ASM磁盤組加磁盤或創(chuàng)建新的磁盤組。
[grid@dwdb1 ~]$ sqlplus / as sysasm
sysasm$alter diskgroup DATA add disk '/dev/asm-data15','/dev/asm-data16' rebalance power 10; ###該參數(shù)可以動(dòng)態(tài)調(diào)整,10太慢的話,可以改到中間值5.

--查看執(zhí)行效率
select group_number,operation,state ,power,est_minutes from v$asm_operation;

--等到執(zhí)行完成后,改回1,11值為最小性能,1為最大性能
alter diskgroup DATA rebalance power 1;

--至此擴(kuò)容工作已經(jīng)完成,下面是具體監(jiān)控辦法
--檢查header_status狀態(tài),不應(yīng)該有MEMBER以外的狀態(tài)
select group_number,disk_number,name,state,path,header_status from v$asm_disk;

--監(jiān)控alert日志輸出結(jié)果
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)

--監(jiān)控查看rebalance進(jìn)度,完成后查詢?yōu)榭?,改回power 為1
select inst_id, operation, state, power, sofar, est_work, est_rate, est_minutes from gv$asm_operation;

向AI問(wèn)一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI