Thứ Ba, 28 tháng 7, 2020

Quy trình add ổ đĩa mới vào diskgroup DATA trong Solaris của cơ sở dữ liệu Oracle

Mục đích: Quy trình add ổ đĩa mới vào diskgroup DATA trong Solaris của cơ sở dữ liệu Oracle

 16. c0t60060E80075AA60000305AA600000085d0 <HITACHI-OPEN-V      -SUN-8001-1.80TB>
          /scsi_vhci/disk@g60060e80075aa60000305aa600000085

-- Check tu lenh
root@db1 # ls -lL /dev/rdsk/c0t60060E80075AA60000305AA600000085d0*
crw-r-----   1 root     sys      118, 423 Jul 22 10:28 /dev/rdsk/c0t60060E80075AA60000305AA600000085d0
crw-r-----   1 root     sys      118, 416 Jul 22 09:14 /dev/rdsk/c0t60060E80075AA60000305AA600000085d0s0
crw-r-----   1 root     sys      118, 417 Jul 22 09:14 /dev/rdsk/c0t60060E80075AA60000305AA600000085d0s1
crw-r-----   1 root     sys      118, 418 Jul 22 09:14 /dev/rdsk/c0t60060E80075AA60000305AA600000085d0s2
crw-r-----   1 root     sys      118, 419 Jul 22 09:14 /dev/rdsk/c0t60060E80075AA60000305AA600000085d0s3
crw-r-----   1 root     sys      118, 420 Jul 22 09:14 /dev/rdsk/c0t60060E80075AA60000305AA600000085d0s4
crw-r-----   1 root     sys      118, 421 Jul 22 09:14 /dev/rdsk/c0t60060E80075AA60000305AA600000085d0s5
crw-r-----   1 root     sys      118, 422 Jul 22 09:14 /dev/rdsk/c0t60060E80075AA60000305AA600000085d0s0
 
1. Yêu cầu disk
DATA, RECO -- Bỏ 34 Sector đầu tiên trong solaris vì ghi vào bị lỗi
selecting c0t60060E80075AA60000305AA600000085d0
Total disk sectors available: 3865454302 + 16384 (reserved sectors)

partition> p
Current partition table (original):
Total disk sectors available: 3865454116 + 16384 (reserved sectors)

Part      Tag    Flag     First Sector          Size          Last Sector
  0        usr    wm                34         1.80TB           3865454149 
  1 unassigned    wm                 0            0                0 
  2 unassigned    wm                 0            0                0 
  3 unassigned    wm                 0            0                0 
  4 unassigned    wm                 0            0                0 
  5 unassigned    wm                 0            0                0 
  6 unassigned    wm                 0            0                0 
  8   reserved    wm        3865454150         8.00MB           3865470533   

2. GÁN QUYỀN TRỂN CẢ 2 NODE (USER ROOT)
 16. c0t60060E80075AA60000305AA600000085d0 <HITACHI-DF600F-0000-1.83TB>  DATA09

(root)# ls -lL /dev/rdsk/c0t60060E80075AA60000305AA600000085d0s0;
crw-r-----   1 root     sys      118, 416 Jul 22 09:14 /dev/rdsk/c0t60060E80075AA60000305AA600000085d0s0

(root)# chown -R oracle:asmadmin /dev/rdsk/c0t60060E80075AA60000305AA600000085d0s0

(root)# ls -lL /dev/rdsk/c0t60060E80075AA60000305AA600000085d0s0
crw-r-----   1 oracle   asmadmin 118, 94 May 11 16:13 /dev/rdsk/c0t60060E80075AA60000305AA600000085d0s0

(root)# chmod  660 /dev/rdsk/c0t60060E80075AA60000305AA600000085d0s0

-- Check lai dam bao du quyen crw-rw----
root # ls -lL /dev/rdsk/c0t60060E80075AA60000305AA600000085d0s0
crw-rw----   1 oracle   asmadmin 118, 94 May 11 16:13 /dev/rdsk/c0t60060E80075AA60000305AA600000085d0s0

3. Add disk: 
-- Check node tai thap de add
prstat -Z

oracle$ . grid
sqlplus / as sysasm
SQL-ASM> ALTER DISKGROUP DATA REBALANCE POWER 4;
SQL-ASM> ALTER DISKGROUP DATA ADD DISK '/dev/rdsk/c0t60060E80075AA60000305AA600000085d0s0';

4. MONITORING
(oracle)$ iostat -xnz 3 | egrep 'device|c0t60060E80075AA60000305AA600000085d0'
--(Write 108MB/s)
                    extended device statistics           
    r/s    w/s   kr/s   kw/s wait actv wsvc_t asvc_t  %w  %b device
     4.6  111.4 1440.7 108981.5  0.0  0.9    0.0    7.9   0  31 c0t60060E80075AA60000305AA600000085d0

(oracle)$ . grid
(oracle)$ sqlplus / as sysasm
SQL-ASM> select INST_ID, OPERATION, STATE, POWER, SOFAR, EST_WORK, EST_RATE, EST_MINUTES from GV$ASM_OPERATION;

-- Dam bao EST_MINUTES=0
 INST_ID OPERA STAT      POWER      SOFAR   EST_WORK   EST_RATE EST_MINUTES
---------- ----- ---- ---------- ---------- ---------- ---------- -----------
         2 REBAL RUN           4     296441     296441       1094           0
         1 REBAL WAIT          4

5. CHUYEN POWER VE 1 SAU KHI REBALANCE XONG

SQL-ASM> ALTER DISKGROUP DATA REBALANCE POWER 1;

@ Trần Văn Bình - Founder of "Oracle DBA Việt Nam" #OracleTutorial #OracleDBA #OracleDatabaseAdministration #học oracle database #oca #ocp #oce #ocm

ĐỌC NHIỀU

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