Thứ Hai, 30 tháng 11, 2020

Thủ tục add đĩa vào diskgroup RECO trong AXIX

2:52 ST9985 HLRGW 1.83 SATA /dev/rhdisk5 RECO_0002 5005076307FFD2BD0000000000000013 1.83 hdisk47 hdisk47
2:10 ST9985 HLRGW 1.83 SATA /dev/rhdisk7 RECO_0003 5005076307FFD2BD0000000000000014 1.83 hdisk48 hdisk48
4:10 ST9985 HLRGW 1.83 SATA /dev/rhdisk18 RECO_0000 5005076307FFD2BD0000000000000015 1.83 hdisk49 hdisk49
4:11 ST9985 HLRGW 1.83 SATA /dev/rhdisk19 RECO_0001 5005076307FFD2BD0000000000000110 1.83 hdisk54 hdisk54


1. CAU HINH
-- Thuc hien tren ca 2 node, root
lscfg |grep hdisk47; lscfg |grep hdisk48; lscfg |grep hdisk49; lscfg |grep hdisk54; 
lspath -l hdisk47; lspath -l hdisk48; lspath -l hdisk49; lspath -l hdisk54
lsattr -El hdisk47; lsattr -El hdisk48; lsattr -El hdisk49; lsattr -El hdisk54

chdev -l hdisk47 -a reserve_policy=no_reserve; chdev -l hdisk48 -a reserve_policy=no_reserve; chdev -l hdisk49 -a reserve_policy=no_reserve; chdev -l hdisk54 -a reserve_policy=no_reserve; 
chdev -l hdisk47 -a algorithm=round_robin; chdev -l hdisk48 -a algorithm=round_robin;chdev -l hdisk49 -a algorithm=round_robin; chdev -l hdisk54 -a algorithm=round_robin;
chdev -l hdisk47 -a queue_depth=32; chdev -l hdisk48 -a queue_depth=32;chdev -l hdisk49 -a queue_depth=32; chdev -l hdisk54 -a queue_depth=32;

lsattr -El hdisk47; lsattr -El hdisk48;lsattr -El hdisk49; lsattr -El hdisk54;

-- Phan quyen
ls -l /dev/rhdisk47; ls -l /dev/rhdisk48; ls -l /dev/rhdisk49; ls -l /dev/rhdisk54; 

chown oracle.oinstall /dev/rhdisk47; chown oracle.oinstall /dev/rhdisk48; chown oracle.oinstall /dev/rhdisk49; chown oracle.oinstall /dev/rhdisk54; 

chmod 660 /dev/rhdisk47;chmod 660 /dev/rhdisk48; chmod 660 /dev/rhdisk49;chmod 660 /dev/rhdisk54; 

ls -l /dev/rhdisk47; ls -l /dev/rhdisk48; ls -l /dev/rhdisk49; ls -l /dev/rhdisk54

2. ADD DIA VAO GROUP RECO (CHI NODE2)
. grid
sqlplus / as sysasm
alter diskgroup RECO add disk '/dev/rhdisk47';
alter diskgroup RECO add disk '/dev/rhdisk48';
alter diskgroup RECO add disk '/dev/rhdisk49';
alter diskgroup RECO add disk '/dev/rhdisk54';
exit
SQL-ASM> ALTER DISKGROUP RECO REBALANCE POWER 8;

-- Monitoring
asmcmd lsop
asmcmd lsdg
asmcmd lsdsk

-- Khi EST_MINUTES=0 la OK, xem inst_id nao thi giam sat IO tiep
SQL-ASM> select INST_ID, OPERATION, STATE, POWER, SOFAR, EST_WORK, EST_RATE, EST_MINUTES from GV$ASM_OPERATION;
   INST_ID OPERA STAT      POWER      SOFAR   EST_WORK   EST_RATE EST_MINUTES
---------- ----- ---- ---------- ---------- ---------- ---------- -----------
         2 REBAL RUN           8     320254     323108       3026           0
         2 REBAL WAIT          8
         1 REBAL WAIT          8
         1 REBAL RUN           8       5708     930910       1412         655
--> Giam sat IO node 1
-- Giam sat IO node 1
(oracle)$ iostat 3 | egrep hdisk47
(oracle)$ iostat 3 | egrep hdisk48
(oracle)$ iostat 3 | egrep hdisk49
(oracle)$ iostat 3 | egrep hdisk54

-- 114MB write/s
[root@dbaviet1 /]#iostat 5 |grep hdisk47
Disks:        % tm_act     Kbps      tps    Kb_read   Kb_wrtn
hdisk47         10.0     21303.9      84.2          0    106516
hdisk47         10.2     22121.5      87.0          0    110604
hdisk47         10.8     22936.4      90.2          0    114700

[root@dbaviet1 /]#iostat 5 |grep hdisk48
hdisk48         13.2     27866.1     110.6          4    139296
hdisk48         12.8     27039.3     106.4          0    135184
hdisk48         10.6     23758.5      93.4          0    118796

[root@dbaviet1 /]#iostat 5 |grep hdisk49
hdisk49         12.2     25330.3      99.9          0    126996
hdisk49         12.8     29499.1     115.8          0    147468
hdisk49         13.2     26216.8     103.0          0    131084


-- Drop disk
RECO_0000 1923918 1923916 183212 /dev/rhdisk18 MEMBER CACHED ONLINE NORMAL 23/05/2013 12:40:22 PM 13/06/2016 4:16:26 PM
RECO_0001 1923918 1923916 183140 /dev/rhdisk19 MEMBER CACHED ONLINE NORMAL 23/05/2013 12:40:22 PM 13/06/2016 4:16:26 PM
RECO_0002 1923860 1923860 183188 /dev/rhdisk5 MEMBER CACHED ONLINE NORMAL 17/03/2014 2:21:01 PM 13/06/2016 4:16:26 PM
RECO_0003 1923891 1923888 183204 /dev/rhdisk7 MEMBER CACHED ONLINE NORMAL 17/03/2014 2:21:01 PM 13/06/2016 4:16:26 PM
RECO_0004 961950 961948 91644 /dev/rhdisk26 MEMBER CACHED ONLINE NORMAL 07/07/2015 4:34:17 PM 13/06/2016 4:16:26 PM
RECO_0005 961950 961948 91512 /dev/rhdisk27 MEMBER CACHED ONLINE NORMAL 07/07/2015 4:34:32 PM 13/06/2016 4:16:26 PM

alter diskgroup RECO DROP DISK RECO_0000;
alter diskgroup RECO DROP DISK RECO_0001;
alter diskgroup RECO DROP DISK RECO_0002;
alter diskgroup RECO DROP DISK RECO_0003;
alter diskgroup RECO DROP DISK RECO_0004;
alter diskgroup RECO DROP DISK RECO_0005;

-- Sau khi hoan thanh chuyen ve
SQL-ASM> ALTER DISKGROUP RECO REBALANCE POWER 1;

Note: Có thể dùng GUI để thêm disk
Bat Xmanager
export DISPLAY=192.168.1.10:0
asmca
===



KẾT NỐI VỚI CHUYÊN GIA TRẦN VĂN BÌNH: 📧 Mail: binhoracle@gmail.com ☎️ Mobile: 0902912888 ⚡️ Skype: tranbinh48ca 👨 Facebook: https://www.facebook.com/BinhOracleMaster 👨 Inbox Messenger: https://m.me/101036604657441 (profile) 👨 Fanpage: https://www.facebook.com/tranvanbinh.vn 👨 Inbox Fanpage: https://m.me/tranvanbinh.vn 👨👩 Group FB: https://www.facebook.com/groups/OracleDBAVietNam 👨 Website: http://www.tranvanbinh.vn 👨 Blogger: https://tranvanbinhmaster.blogspot.com 🎬 Youtube: http://bit.ly/ytb_binhoraclemaster 👨 Tiktok: https://www.tiktok.com/@binhoraclemaster?lang=vi 👨 Linkin: https://www.linkedin.com/in/binhoracle 👨 Twitter: https://twitter.com/binhoracle 👨 Địa chỉ: Tòa nhà Sun Square - 21 Lê Đức Thọ - Phường Mỹ Đình 1 - Quận Nam Từ Liêm - TP.Hà Nội #OracleTutorial #OracleDBA #OracleDatabaseAdministration #học oracle database #oca #ocp #oce #ocm

ĐỌC NHIỀU

Trần Văn Bình - Oracle Database Master