OS:rh6.4數據庫
ORACLE 11g RAC ASM服務器
OCR和VOTING DISK在crs磁盤組,控制文件、數據文件、參數文件在DATA組。oracle
一、備份數據庫spa
RUN {
ALLOCATE CHANNEL ch00 DEVICE TYPE disk;
ALLOCATE CHANNEL ch01 DEVICE TYPE disk;
backup database filesperset 5 format '/u01/backup/bk_%d_%T%s_%p' ;
backup current controlfile format '/u01/backup/ctl_%d_%T_%s';
RELEASE CHANNEL ch00;
RELEASE CHANNEL ch01;
}orm
二、備份參數文件get
三、中止監聽it
四、查看字符集、數據文件、用戶等asm
SQL> select userenv('language') from dual;form
USERENV('LANGUAGE')
----------------------------------------------------
AMERICAN_AMERICA.ZHS16GBK配置
TABLESPACE_NAME SUM_MB FREE_MB USE_PER
---------------- ---------- ---------- ----------
BUSIDATA 20480 20466 .07
PERFDATA 40000 39942 .14
RESDATA 10240 9389 8.31
STATISDATA 61440 61414 .04
SYSAUX 1754 565 67.77
SYSDATA 10240 10034 2.01
SYSTEM 1784 964 45.99
UNDOTBS1 950 880 7.41
UNDOTBS2 175 166 4.89
USERS 5 4 26.25
USERNAME DEFAULT_TABLESPACE
------------------------- -------------------------
SYS SYSTEM
SYSTEM SYSTEM
I6000_COL PERFDATA
I6000_PER PERFDATA
I6000_ALA PERFDATA
I6000_KNO SYSDATA
I6000_SYS SYSDATA
I6000_SAF RESDATA
I6000_RES RESDATA
I6000_DIS BUSIDATA
I6000_RUN BUSIDATA
USERNAME DEFAULT_TABLESPACE
------------------------- -------------------------
I6000_REP BUSIDATA
I6000_SER BUSIDATA
I6000_CBM BUSIDATA
I6000_DRM BUSIDATA
I6000_THI BUSIDATA
I6000_STA STATISDATA
OUTLN SYSTEM
MGMT_VIEW SYSTEM
FLOWS_FILES SYSAUX
MDSYS SYSAUX
ORDSYS SYSAUX
USERNAME DEFAULT_TABLESPACE
------------------------- -------------------------
EXFSYS SYSAUX
DBSNMP SYSAUX
WMSYS SYSAUX
APPQOSSYS SYSAUX
APEX_030200 SYSAUX
OWBSYS_AUDIT SYSAUX
ORDDATA SYSAUX
CTXSYS SYSAUX
ANONYMOUS SYSAUX
SYSMAN SYSAUX
XDB SYSAUX
USERNAME DEFAULT_TABLESPACE
------------------------- -------------------------
ORDPLUGINS SYSAUX
OWBSYS SYSAUX
SI_INFORMTN_SCHEMA SYSAUX
OLAPSYS SYSAUX
SCOTT USERS
ORACLE_OCM USERS
XS$NULL USERS
MDDATA USERS
DIP USERS
APEX_PUBLIC_USER USERS
SPATIAL_CSW_ADMIN_USR USERS
USERNAME DEFAULT_TABLESPACE
------------------------- -------------------------
SPATIAL_WFS_ADMIN_USR USERS
NAME
--------------------------------------------------------------------------------
+DATA/idb/datafile/system.256.883073683
+DATA/idb/datafile/sysaux.257.883073683
+DATA/idb/datafile/undotbs1.258.883073683
+DATA/idb/datafile/users.259.883073683
+DATA/idb/datafile/undotbs2.264.883073875
+DATA/idb/datafile/perfdata01.dbf
+DATA/idb/datafile/perfdata02.dbf
+DATA/idb/datafile/sysdata01.dbf
+DATA/idb/datafile/resdata01.dbf
+DATA/idb/datafile/busidata01.dbf
+DATA/idb/datafile/statisdata01.dbf
NAME
--------------------------------------------------------------------------------
+DATA/idb/datafile/statisdata02.dbf
+DATA/idb/datafile/system01.dbf
+DATA/idb/datafile/sysaux01.dbf
中止數據庫,重啓服務器
數據盤5塊400G 4條路徑
/dev/sdb
/dev/sdc
/dev/sdd
/dev/sde
/dev/sdf
/dev/sdl
/dev/sdm
/dev/sdn
/dev/sdo
/dev/sdp
/dev/sdah
/dev/sdai
/dev/sdaj
/dev/sdal
/dev/sdak
/dev/sdas
/dev/sdar
/dev/sdat
/dev/sdau
/dev/sdav
36845b1210033a20b214a9ea200000000
[root@orcl1 ~]# scsi_id -g -u /dev/sdc
36845b1210033a20b214a9f6b00000001
[root@orcl1 ~]# scsi_id -g -u /dev/sdd
36845b1210033a20b214a9fb400000002
[root@orcl1 ~]# scsi_id -g -u /dev/sde
36845b1210033a20b214aa00000000003
[root@orcl1 ~]# scsi_id -g -u /dev/sdf
36845b1210033a20b214aa04b00000004
CRS磁盤組3塊4G大小,4條路徑
/dev/sdi:
/dev/sdj:
/dev/sdk:
/dev/sds:
/dev/sdu:
/dev/sdt:
/dev/sdao:
/dev/sdap:
/dev/sdaq:
/dev/sday:
/dev/sdaz:
/dev/sdba:
[root@orcl1 ~]# scsi_id -g -u /dev/sdi
36845b1210033a20b2194051d0000000b
[root@orcl1 ~]# scsi_id -g -u /dev/sdj
36845b1210033a20b2194055e0000000c
[root@orcl1 ~]# scsi_id -g -u /dev/sdk
36845b1210033a20b219405a10000000d
兩塊500G歸檔 4條路徑
/dev/sdg:
/dev/sdh:
/dev/sdq:
/dev/sdr:
/dev/sdam:
/dev/sdan:
/dev/sdaw:
/dev/sdax:
節點1:
36845b1210033a20b214b92ff00000007
[root@orcl1 ~]# scsi_id -g -u /dev/sdh
36845b1210033a20b214b934000000008
節點2:
36845b1210033a20b214b93a000000009
[root@orcl2 ~]# scsi_id -g -u /dev/sdh
36845b1210033a20b214b94150000000a
cd /etc/udev/rules.d
vi 99-oracle-asmdevices.rules
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="36001438006489e470000500002d50000", NAME="asm-crs1", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="36001438006489e470000500002d90000", NAME="asm-crs2", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="36001438006489e470000500002dd0000", NAME="asm-crs3", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="36001438006489e470000500002c90000", NAME="asm-data1", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="36001438006489e470000500002cd0000", NAME="asm-data2", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="36001438006489e470000500002d10000", NAME="asm-data3", OWNER="grid", GROUP="asmadmin", MODE="0660"
兩個節點添加(注意字符空格等信息):
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="36845b1210033a20b214a9ea200000000", NAME="asm-data4", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="36845b1210033a20b214a9f6b00000001", NAME="asm-data5", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="36845b1210033a20b214a9fb400000002", NAME="asm-data6", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="36845b1210033a20b214aa00000000003", NAME="asm-data7", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="36845b1210033a20b214aa04b00000004", NAME="asm-data8", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="36845b1210033a20b2194051d0000000b", NAME="asm-crs4", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="36845b1210033a20b2194055e0000000c", NAME="asm-crs5", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="36845b1210033a20b219405a10000000d", NAME="asm-crs6", OWNER="grid", GROUP="asmadmin", MODE="0660"
start_udev
參看1638177.1
./ocrconfig -add +CRS_VOTE
./ocrconfig -delete +CRS
./crsctl replace votedisk +CRS_VOTE
SQL> create pfile='/tmp/init' from spfile;
SQL> create spfile='+CRS_VOTE' from pfile='/tmp/init';
./gpnptool get
alter diskgroup CRS_VOTE mount;
crsctl stop crs
crsctl start crs
srvctl add CRS_VOTE -g CRS
./crs_unregister ora.gsd
./crs_unregister ora.CRS.dg
DATA組採用ASMCA圖形化界面加盤再DROP老盤,ASM自動轉移數據
數據遷移後清除踢出去的盤的UDEV配置信息