11204 ASM 在线存储迁移。

本文涉及的产品
票证核验,票证核验 50次/账号
票据凭证识别,票据凭证识别 200次/月
企业资质识别,企业资质识别 200次/月
简介: 2.1停止数据库shutdown immediate2.2 扫描磁盘echo 1 > /sys/class/fc_host/host3/issue_lipecho 1 > /sys/class/fc_host/host4/issue_lip3,更改磁盘属性chown oracle:oinstall /dev/mapper/3PART*4,备份ocr.

2.1停止数据库

shutdown immediate

2.2 扫描磁盘

echo 1 > /sys/class/fc_host/host3/issue_lip

echo 1 > /sys/class/fc_host/host4/issue_lip

3,更改磁盘属性

chown oracle:oinstall /dev/mapper/3PART*

4,备份ocr

./ocrconfig -manualbackup 

./ocrconfig -showbackup

5,新建asm磁盘组

create diskgroup SYSDG normal redundancy disk '/dev/mapper/3PAR01VOTE01','/dev/mapper/3PAR01VOTE02','/dev/mapper/3PAR01VOTE03' attribute 'compatible.rdbms'='11.2.0.0', 'compatible.asm'='11.2.0.0';



create diskgroup SYSDG external redundancy disk '/dev/mapper/3PARVOT01','/dev/mapper/3PARVOT02','/dev/mapper/3PARVOT03';

6,迁移votedisk



crsctl query css votedisk

crsctl replace votedisk +SYSDG

crsctl query css votedisk

7,迁移ocr

ocrcheck

ocrconfig -add +SYSDG

ocrconfig -delete +DATA

ocrcheck

8,迁移asmspfile

sqlplus / as sysasm

show parameter spfile

create pfile='/home/oracle/asmpfilebak.ora' from spfile;

create spfile='+SYSDG' from pfile='/home/oracle/asmpfilebak.ora'

9,更换asm磁盘到新存储

alter diskgroup DATA 

add disk

'/dev/mapper/3PAR01DATA01',

'/dev/mapper/3PAR01DATA02',

'/dev/mapper/3PAR01DATA03',

'/dev/mapper/3PAR01DATA04',

'/dev/mapper/3PAR01DATA05'  

drop disk

DATA_0000,DATA_0001,DATA_0002,DATA_003,DATA_0004 rebalance power 11;


alter diskgroup DATA02 

add disk

'/dev/mapper/3PAR01DATA06',

'/dev/mapper/3PAR01DATA07',

'/dev/mapper/3PAR01DATA08',

'/dev/mapper/3PAR01DATA09',

'/dev/mapper/3PAR01DATA10',

'/dev/mapper/3PAR01DATA11',

'/dev/mapper/3PAR01DATA12'  

drop disk

DATA_0005,DATA_0006,DATA_007,DATA_0008,DATA_0009,DATA_0010,DATA02_0006 rebalance power 11;



10,检查集群和数据库状态

crsctl stat res -t

===============


SQL> create diskgroup SYSDG normal redundancy disk '/dev/mapper/3PAR01VOTE01','/dev/mapper/3PAR01VOTE02','/dev/mapper/3PAR01VOTE03' attribute 'compatible.rdbms'='11.2.0.0', 'compatible.asm'='11.2.0.0';


Diskgroup created.


SQL> create pfile='/home/oracle/asmpfilebak.ora' from spfile;


File created.


SQL> create spfile='+SYSDG' from pfile='/home/oracle/asmpfilebak.ora'

  2  ;


File created.


SQL> exit

Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production

With the Real Application Clusters and Automatic Storage Management options

[oracle@PSIYKTDB03 snow]$ ocrcheck

Status of Oracle Cluster Registry is as follows :

Version                  :          3

Total space (kbytes)     :     262120

Used space (kbytes)      :       2928

Available space (kbytes) :     259192

ID                       :  677303095

Device/File Name         :      +DATA

                                    Device/File integrity check succeeded


                                    Device/File not configured


                                    Device/File not configured


                                    Device/File not configured


                                    Device/File not configured


Cluster registry integrity check succeeded


Logical corruption check bypassed due to non-privileged user


[oracle@PSIYKTDB03 snow]$ ocrconfig -add +SYSDG

PROT-20: Insufficient permission to proceed. Require privileged user

[oracle@PSIYKTDB03 snow]$ which ocrconfig

/oracle/grid/bin/ocrconfig

[oracle@PSIYKTDB03 snow]$ su -

Password: 

[root@PSIYKTDB03 ~]# /oracle/grid/bin/ocrconfig -add +SYSDG

[root@PSIYKTDB03 ~]# /oracle/grid/bin/ocrconfig -add +SYSDG

[root@PSIYKTDB03 ~]# /oracle/grid/bin/ocrconfig -delete +DATA

[root@PSIYKTDB03 ~]# cat /etc/ora

oracle/      oraInst.loc  oratab       

[root@PSIYKTDB03 ~]# cat /etc/oracle/o

ocr.loc       ocr.loc.orig  olr.loc       olr.loc.orig  oprocd/       

[root@PSIYKTDB03 ~]# cat /etc/oracle/ocr.loc

#Device/file +DATA getting replaced by device +SYSDG 

ocrconfig_loc=+SYSDG

[root@PSIYKTDB03 ~]# /oracle/grid/bin/crsctl query css       

Parse error:

  Missing additional arguments


Usage:

  crsctl query css ipmiconfig

     Checks whether Oracle Clusterware has been configured for IPMI


  crsctl query css ipmidevice

     Checks whether the IPMI device/driver is present


  crsctl query css votedisk

     Lists the voting files used by Cluster Synchronization Services

[root@PSIYKTDB03 ~]# /oracle/grid/bin/crsctl query css votedisk

##  STATE    File Universal Id                File Name Disk group

--  -----    -----------------                --------- ---------

 1. ONLINE   7f6b3c9b6f6b4fb7bff0d6e03f993474 (/dev/mapper/DATA1) [DATA]

Located 1 voting disk(s).

[root@PSIYKTDB03 ~]# /oracle/grid/bin/crsctl replace votedisk +SYSDG

Successful addition of voting disk 4e76af5f1ce24fa9bf5df9efb6f660e8.

Successful addition of voting disk 7129487e16954fb0bf796e3d8b005d0c.

Successful addition of voting disk 1133f01ca9ec4f23bf056fb90fa883fc.

Successful deletion of voting disk 7f6b3c9b6f6b4fb7bff0d6e03f993474.

Successfully replaced voting disk group with +SYSDG.

CRS-4266: Voting file(s) successfully replaced

[root@PSIYKTDB03 ~]# /oracle/grid/bin/crsctl query css votedisk

##  STATE    File Universal Id                File Name Disk group

--  -----    -----------------                --------- ---------

 1. ONLINE   4e76af5f1ce24fa9bf5df9efb6f660e8 (/dev/mapper/3PAR01VOTE01) [SYSDG]

 2. ONLINE   7129487e16954fb0bf796e3d8b005d0c (/dev/mapper/3PAR01VOTE02) [SYSDG]

 3. ONLINE   1133f01ca9ec4f23bf056fb90fa883fc (/dev/mapper/3PAR01VOTE03) [SYSDG]

Located 3 voting disk(s).

[root@PSIYKTDB03 ~]# 

[root@PSIYKTDB03 ~]# exit

logout

[


SQL> alter diskgroup DATA 

add disk

'/dev/mapper/3PAR01DATA01',

'/dev/mapper/3PAR01DATA02',

'/dev/mapper/3PAR01DATA03',

'/dev/mapper/3PAR01DATA04',

'/dev/mapper/3PAR01DATA05'  

drop disk

DATA_0000,

DATA_0001,

DATA_0002,

DATA_0003,

DATA_0004 rebalance power 11;

  2    3    4    5    6    7    8    9   10   11   12   13  


Diskgroup altered.


SQL> SQL> ^Hexit

SP2-0042: unknown command exit" - rest of line ignored.

SQL> exit

Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production

With the Real Application Clusters and Automatic Storage Management options

[oracle@PSIYKTDB03 snow]$ ssh PSIYKTDB0 

[oracle@PSIYKTDB03 snow]$ asmcmd

ASMCMD> lsop

Group_Name  Dsk_Num  State  Power  

DATA02      REBAL    WAIT   11     

DATA        REBAL    RUN    11     

ASMCMD> lsop

Group_Name  Dsk_Num  State  Power  

DATA02      REBAL    WAIT   11     

DATA        REBAL    RUN    11     

ASMCMD> lsop

Group_Name  Dsk_Num  State  Power  

DATA02      REBAL    WAIT   11     

DATA        REBAL    RUN    11     

ASMCMD> lsop

Group_Name  Dsk_Num  State  Power  

DATA02      REBAL    WAIT   11     

DATA        REBAL    RUN    11     

ASMCMD> exit

[oracle@PSIYKTDB03 snow]$ 

[oracle@PSIYKTDB03 snow]$ asmcmd

ASMCMD> lsop -help

Group_Name  Dsk_Num  State  Power  

DATA02      REBAL    WAIT   11     

DATA        REBAL    RUN    11     

ASMCMD> lsop

Group_Name  Dsk_Num  State  Power  

DATA02      REBAL    WAIT   11     

DATA        REBAL    RUN    11     

ASMCMD> lsop

Group_Name  Dsk_Num  State  Power  

DATA02      REBAL    WAIT   11     

DATA        REBAL    RUN    11     

ASMCMD> exit


相关文章
|
存储 机器学习/深度学习 Oracle
Oracle 11gR2 ASM存储日常管理手册
Oracle 11gR2 ASM存储日常管理手册 目 录1 文档简介 31.1 编写目的 31.2 适用范围 31.3 名词解释 31.4 格式约定 42 配置多链路和LUN 42.
1137 0
|
Oracle 关系型数据库 数据库
从文件系统迁移到ASM上
从文件系统迁移到ASM上
1408 0
|
SQL 存储 Oracle
Oracle 11g R2 RAC with ASM存储迁移--Rman copy&ASM REBALANCE
by acdante Oracle 11g R2 RAC with ASM存储迁移                                            -----Rman copy&ASM REBALANCE     环境介绍 VMware版本:VMware12pro 主机操作系统:RHEL6.5_64 共享存储使用VMWARE创建共享磁盘文件 数据库版本:Oracle11gR2 11.2.0.4.0_RAC   Oracle数据库文件部署在ASM磁盘组上,需要在不停机或者尽量短的停机时间完成存储迁移。
3268 0
|
存储 数据库
数据库从文件系统迁移到ASM
今天需要把文件系统上的数据文件迁移到ASM上 文件系统上数据文件:/dev/sda /database/oradata 归档:/dev/sda /arch 新ASM存储: /dev/sdb1、/dev/sdc1、/dev/sdd1对应asm的+DG1 存放数...
1283 0
|
存储 Oracle 关系型数据库
|
Oracle 关系型数据库 数据库
下一篇
无影云桌面