首页 > 数据库 >Oracle集群升级迁移—老集群磁盘切割

Oracle集群升级迁移—老集群磁盘切割

时间:2023-10-19 12:45:22浏览次数:44  
标签:mapper NORMAL NUMBER dev VARCHAR2 集群 Oracle 磁盘 asm

目录

Oracle升级迁移

目前有两套Oracle采用ADG + RAC架构,其中备库使用的为SUSE12.4目前已EOS,文件系统BFTFS与Oracle兼容性据说也有一定的问题,决定对现有的集群进行升级,升级后服务器统一采用SUSE12.5+EXT4文件系统。
由于没有多余的存储,原Oracle备机的ASM磁盘又够大,为节省成本准备在备机存储上剔除磁盘供新建Oracle服务器使用。
先对剔除磁盘过程进行记录。

剔除磁盘腾出存储LUN

GRID用户登录,查询ASM磁盘

v$asm_diskgroup 查询磁盘组整体概况
v$asm_disk 查询ASM磁盘组具体挂载情况

172530.913: Last login: Sat Oct  7 20:04:28 2023 from 21.1.143.29
172541.398: szn-db-ora1:~ # su - grid
172555.803: grid@szn-db-ora1:~> sqlplus "/as sysdba"
172555.813: 
172555.813: SQL*Plus: Release 12.2.0.1.0 Production on Sun Oct 8 17:25:55 2023
172555.813: 
172555.813: Copyright (c) 1982, 2016, Oracle.  All rights reserved.
172555.813: 
172555.828: 
172555.833: Connected to:
172555.833: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
172555.833: 
172701.650: SQL> desc v$asm_diskgroup;
172701.650:  Name                                      Null?    Type
172701.655:  ----------------------------------------- -------- ----------------------------
172701.655:  GROUP_NUMBER                                       NUMBER
172701.655:  NAME                                               VARCHAR2(30)
172701.655:  SECTOR_SIZE                                        NUMBER
172701.655:  LOGICAL_SECTOR_SIZE                                NUMBER
172701.655:  BLOCK_SIZE                                         NUMBER
172701.655:  ALLOCATION_UNIT_SIZE                               NUMBER
172701.655:  STATE                                              VARCHAR2(11)
172701.655:  TYPE                                               VARCHAR2(6)
172701.655:  TOTAL_MB                                           NUMBER
172701.655:  FREE_MB                                            NUMBER
172701.655:  HOT_USED_MB                                        NUMBER
172701.655:  COLD_USED_MB                                       NUMBER
172701.655:  REQUIRED_MIRROR_FREE_MB                            NUMBER
172701.655:  USABLE_FILE_MB                                     NUMBER
172701.655:  OFFLINE_DISKS                                      NUMBER
172701.655:  COMPATIBILITY                                      VARCHAR2(60)
172701.655:  DATABASE_COMPATIBILITY                             VARCHAR2(60)
172701.655:  VOTING_FILES                                       VARCHAR2(1)
172701.655:  CON_ID                                             NUMBER
172701.655: 
172711.545: SQL> c/status/state

172711.545:   1*  select name,free_mb/1024,total_mb/1024,state from v$asm_diskgroup
172712.590: SQL> /
172712.705: 
172712.705: NAME                           FREE_MB/1024 TOTAL_MB/1024 STATE
172712.705: ------------------------------ ------------ ------------- -----------
172712.705: CDB_REDOA                        10.7109375            25 MOUNTED
172712.705: CDB_REDOB                        10.7109375            25 MOUNTED
172712.705: DATA                             7584.29688          8192 MOUNTED
172712.710: FRA                              2033.77734          2048 MOUNTED
172712.710: MGMT                             133.554688           200 MOUNTED
172712.710: OCR                              14.1523438            15 MOUNTED
172712.710: 
172712.710: 6 rows selected.
172712.710: 
172732.235: SQL> desc v$asm_disk
172732.240:  Name                                      Null?    Type
172732.245:  ----------------------------------------- -------- ----------------------------
172732.245:  GROUP_NUMBER                                       NUMBER
172732.245:  DISK_NUMBER                                        NUMBER
172732.245:  COMPOUND_INDEX                                     NUMBER
172732.245:  INCARNATION                                        NUMBER
172732.245:  MOUNT_STATUS                                       VARCHAR2(7)
172732.245:  HEADER_STATUS                                      VARCHAR2(12)
172732.245:  MODE_STATUS                                        VARCHAR2(7)
172732.245:  STATE                                              VARCHAR2(8)
172732.245:  REDUNDANCY                                         VARCHAR2(7)
172732.245:  LIBRARY                                            VARCHAR2(64)
172732.245:  OS_MB                                              NUMBER
172732.245:  TOTAL_MB                                           NUMBER
172732.245:  FREE_MB                                            NUMBER
172732.245:  HOT_USED_MB                                        NUMBER
172732.245:  COLD_USED_MB                                       NUMBER
172732.245:  NAME                                               VARCHAR2(30)
172732.245:  FAILGROUP                                          VARCHAR2(30)
172732.245:  LABEL                                              VARCHAR2(31)
172732.245:  PATH                                               VARCHAR2(256)
172732.245:  UDID                                               VARCHAR2(64)
172732.245:  PRODUCT                                            VARCHAR2(32)
172732.245:  CREATE_DATE                                        DATE
172732.245:  MOUNT_DATE                                         DATE
172732.245:  REPAIR_TIMER                                       NUMBER
172732.245:  READS                                              NUMBER
172732.245:  WRITES                                             NUMBER
172732.280:  READ_ERRS                                          NUMBER
172732.280:  WRITE_ERRS                                         NUMBER
172732.280:  READ_TIMEOUT                                       NUMBER
172732.280:  WRITE_TIMEOUT                                      NUMBER
172732.280:  READ_TIME                                          NUMBER
172732.280:  WRITE_TIME                                         NUMBER
172732.280:  BYTES_READ                                         NUMBER
172732.280:  BYTES_WRITTEN                                      NUMBER
172732.280:  PREFERRED_READ                                     VARCHAR2(1)
172732.280:  HASH_VALUE                                         NUMBER
172732.280:  HOT_READS                                          NUMBER
172732.285:  HOT_WRITES                                         NUMBER
172732.285:  HOT_BYTES_READ                                     NUMBER
172732.285:  HOT_BYTES_WRITTEN                                  NUMBER
172732.285:  COLD_READS                                         NUMBER
172732.285:  COLD_WRITES                                        NUMBER
172732.285:  COLD_BYTES_READ                                    NUMBER
172732.285:  COLD_BYTES_WRITTEN                                 NUMBER
172732.285:  VOTING_FILE                                        VARCHAR2(1)
172732.285:  SECTOR_SIZE                                        NUMBER
172732.285:  LOGICAL_SECTOR_SIZE                                NUMBER
172732.285:  FAILGROUP_TYPE                                     VARCHAR2(7)
172732.285:  CON_ID                                             NUMBER
172732.285:  THIN_PROVISION_CAPABLE                             VARCHAR2(1)
172732.285:  DATA_INTEGRITY_CAPABLE                             VARCHAR2(1)
172732.285:  SITE_NAME                                          VARCHAR2(30)
172732.285:  SITE_GUID                                          VARCHAR2(33)
172732.285:  FAILGROUP_LABEL                                    VARCHAR2(30)
172732.285:  SITE_LABEL                                         VARCHAR2(30)
172732.285:  SITE_STATUS                                        VARCHAR2(11)
172732.285: 
SQL> set linesize 200
172842.636: SQL> /
172842.756: 
172842.756: NAME                           FREE_MB/1024 TOTAL_MB/1024 STATE       GROUP_NUMBER
172842.756: ------------------------------ ------------ ------------- ----------- ------------
172842.756: CDB_REDOA                        10.7109375            25 MOUNTED                1
172842.756: CDB_REDOB                        10.7109375            25 MOUNTED                2
172842.756: DATA                             7584.29688          8192 MOUNTED                3
172842.756: FRA                              2033.77734          2048 MOUNTED                4
172842.756: MGMT                             133.554688           200 MOUNTED                5
172842.756: OCR                              14.1523438            15 MOUNTED                6
172842.756: 



172925.122: SQL> select GROUP_NUMBER,DISK_NUMBER  ,NAME,PATH,STATE  from v$asm_disk;
SQL> col path for a40
172930.522: SQL> /
172930.652: 
172930.652: GROUP_NUMBER DISK_NUMBER NAME                           PATH                                     STATE
172930.652: ------------ ----------- ------------------------------ ---------------------------------------- --------
172930.652:            3           1 DATA_0001                      /dev/mapper/asm-data2                    NORMAL
172930.652:            3           0 DATA_0000                      /dev/mapper/asm-data1                    NORMAL
172930.652:            4           1 FRA_0001                       /dev/mapper/asm-fra2                     NORMAL
172930.652:            4           0 FRA_0000                       /dev/mapper/asm-fra1                     NORMAL
172930.657:            5           1 MGMT_0001                      /dev/mapper/asm-mgmt2                    NORMAL
172930.657:            5           0 MGMT_0000                      /dev/mapper/asm-mgmt1                    NORMAL
172930.657:            6           2 OCR_0002                       /dev/mapper/asm-ocr3                     NORMAL
172930.657:            2           4 CDB_REDOB_0004                 /dev/mapper/asm-redob5                   NORMAL
172930.657:            2           3 CDB_REDOB_0003                 /dev/mapper/asm-redob4                   NORMAL
172930.657:            2           2 CDB_REDOB_0002                 /dev/mapper/asm-redob3                   NORMAL
172930.657:            2           1 CDB_REDOB_0001                 /dev/mapper/asm-redob2                   NORMAL
172930.657: 
172930.657: GROUP_NUMBER DISK_NUMBER NAME                           PATH                                     STATE
172930.657: ------------ ----------- ------------------------------ ---------------------------------------- --------
172930.657:            2           0 CDB_REDOB_0000                 /dev/mapper/asm-redob1                   NORMAL
172930.657:            1           4 CDB_REDOA_0004                 /dev/mapper/asm-redoa5                   NORMAL
172930.657:            6           0 OCR_0000                       /dev/mapper/asm-ocr2                     NORMAL
172930.657:            1           3 CDB_REDOA_0003                 /dev/mapper/asm-redoa4                   NORMAL
172930.687:            1           2 CDB_REDOA_0002                 /dev/mapper/asm-redoa3                   NORMAL
172930.687:            1           1 CDB_REDOA_0001                 /dev/mapper/asm-redoa2                   NORMAL
172930.687:            1           0 CDB_REDOA_0000                 /dev/mapper/asm-redoa1                   NORMAL
172930.687:            3           7 DATA_0007                      /dev/mapper/asm-data8                    NORMAL
172930.687:            3           6 DATA_0006                      /dev/mapper/asm-data7                    NORMAL
172930.687:            3           5 DATA_0005                      /dev/mapper/asm-data6                    NORMAL
172930.687:            3           4 DATA_0004                      /dev/mapper/asm-data5                    NORMAL
172930.687: 
172930.687: GROUP_NUMBER DISK_NUMBER NAME                           PATH                                     STATE
172930.687: ------------ ----------- ------------------------------ ---------------------------------------- --------
172930.692:            3           3 DATA_0003                      /dev/mapper/asm-data4                    NORMAL
172930.692:            3           2 DATA_0002                      /dev/mapper/asm-data3                    NORMAL
172930.692:            6           1 OCR_0001                       /dev/mapper/asm-ocr1                     NORMAL
172930.692: 
172930.692: 25 rows selected.

剔除磁盘

操作系统登录GRID,SQL登录sysasm进行剔盘
alter diskgroup FRA drop disk 'FRA_0001' 剔除磁盘
select *from v$asm_operation; 查询操作
CDB、MGMT、OCR不动,剔除FRA和DATA的磁盘各腾出一半

172944.392: SQL> select name,free_mb/1024,total_mb/1024,state,GROUP_NUMBER  from v$asm_diskgroup;
172944.577: 
172944.577: NAME                           FREE_MB/1024 TOTAL_MB/1024 STATE       GROUP_NUMBER
172944.577: ------------------------------ ------------ ------------- ----------- ------------
172944.577: CDB_REDOA                        10.7109375            25 MOUNTED                1
172944.577: CDB_REDOB                        10.7109375            25 MOUNTED                2
172944.577: DATA                             7584.29688          8192 MOUNTED                3
172944.577: FRA                              2033.77734          2048 MOUNTED                4
172944.582: MGMT                             133.554688           200 MOUNTED                5
172944.582: OCR                              14.1523438            15 MOUNTED                6
173035.283: SQL> conn /as sysasm
173035.303: Connected.
173043.318: SQL> alter diskgroup FRA drop disk 'FRA_0001';
173043.403: 
173043.403: Diskgroup altered.
173043.403: 
173056.033: SQL> select *from v$asm_operatoin;
173056.038: select *from v$asm_operatoin
173056.038:              *
173056.038: ERROR at line 1:
173056.038: ORA-01219: database or pluggable database not open: queries allowed on fixed tables or views only
173056.038: 
173056.038: 
173102.933: SQL> select *from v$asm_operation;
173102.943: 
173102.943: GROUP_NUMBER OPERA PASS      STAT      POWER     ACTUAL      SOFAR   EST_WORK   EST_RATE EST_MINUTES ERROR_CODE                                       CON_ID
173102.943: ------------ ----- --------- ---- ---------- ---------- ---------- ---------- ---------- ----------- -------------------------------------------- ----------
173102.943:            4 REBAL COMPACT   WAIT          1          1          0          0          0           0                                                       0
173102.943:            4 REBAL REBALANCE RUN           1          1       1354       1821      16394           0                                                       0
173102.943:            4 REBAL REBUILD   DONE          1          1          0          0          0           0                                                       0
173102.943: 
173109.233: SQL> /
173109.238: 
173109.238: GROUP_NUMBER OPERA PASS      STAT      POWER     ACTUAL      SOFAR   EST_WORK   EST_RATE EST_MINUTES ERROR_CODE                                       CON_ID
173109.238: ------------ ----- --------- ---- ---------- ---------- ---------- ---------- ---------- ----------- -------------------------------------------- ----------
173109.238:            4 REBAL COMPACT   RUN           1          1          0          0          0           0                                                       0
173109.238:            4 REBAL REBALANCE DONE          1          1       1821       1821          0           0                                                       0
173109.243:            4 REBAL REBUILD   DONE          1          1          0          0          0           0                                                       0
173109.243: 
173110.178: SQL> /

剔除成功后 $v$asm_disgroup 里的state显示droping

174625.392: SQL> select group_number,disk_number,state,name,path from v$asm_disk where group_number=3;
174626.787: 
174626.787: GROUP_NUMBER DISK_NUMBER STATE    NAME                           PATH
174626.787: ------------ ----------- -------- ------------------------------ ----------------------------------------
174626.787:            3           1 NORMAL   DATA_0001                      /dev/mapper/asm-data2
174626.787:            3           0 NORMAL   DATA_0000                      /dev/mapper/asm-data1
174626.787:            3           7 DROPPING DATA_0007                      /dev/mapper/asm-data8
174626.787:            3           6 DROPPING DATA_0006                      /dev/mapper/asm-data7
174626.787:            3           5 DROPPING DATA_0005                      /dev/mapper/asm-data6
174626.787:            3           4 DROPPING DATA_0004                      /dev/mapper/asm-data5
174626.787:            3           3 NORMAL   DATA_0003                      /dev/mapper/asm-data4
174626.787:            3           2 NORMAL   DATA_0002                      /dev/mapper/asm-data3

标签:mapper,NORMAL,NUMBER,dev,VARCHAR2,集群,Oracle,磁盘,asm
From: https://www.cnblogs.com/AllenWongFly/p/17774448.html

相关文章

  • kubeadm安装k8s集群
    kubeadm安装k8s集群一、机器准备(所有的master和node节点需要执行)部署k8s集群的节点按照用途可以划分为如下2类角色:master:集群的master节点,集群的初始化节点,基础配置不低于2c4gslave:集群的slave节点,可以多台,基础配置不低于1c2g主机名、节点ip、部署组件k8s-master10.......
  • hadoop集群 大数据项目实战_电信用户行为分析_day03
    配置系统环境  Reis1.先把之前的dump.rdb删除掉rm-rfdump.rdb 2.把原始项目给的dump.rdb放进来,它里面包含了需要的数据,比如端口;在这部之前必须要进行关闭端口,随后传送文件,最后重启端口相关指令:   bin/redis-server conf/redis.conf   bin/redis-cli  bin......
  • 【ORCAL】oracle 数据库中case when 语句的用法详解
     今天向大家介绍oracle数据库中casewhen语句的用法详解,主要包括它的用法详解、使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值。CASEWHEN表达式有两种形式1--简单Case函数23CASEsex4WHEN'1'THEN'男'5WHEN'2'THEN......
  • datax从oracle到mysql数据传输
    datax进行数据迁移: 所需配置:1、服务器:windows/linux(本人使用的本地windows)         2、环境:python2.6.3  和java.11.0.20(本人使用)         3、datax(https://github.com/taosdata/DataX)以上下载完成后可以通过下面命令来查看是否下载......
  • ES集群调优建议
    9 ES集群调优建议9.1内核参数优化#对于操作系统,需要调整几个内核参数[root@node~]#vim/etc/sysctl.conffs.file-max=655360#设定系统最大打开文件描述符数,建议修改为655360或者更高,vm.max_map_count=262144#用于限制一个进程可以拥有的虚拟内存大小,建议修改成262144......
  • 如何查看Kubernetes集群中哪个Pod占用CPU最高?
    下载MetricsServer的部署文件:wgethttps://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml编辑下载的components.yaml文件,以便MetricsServer可以与kubelet进行安全通信。spec:containers:-args:......
  • ZooKeeper集群版本升级
     ZooKeeper集群版本升级 环境描述:3节点的集群,当前版本为3.8.1,计划将所有节点版本升级到3.8.3。由于过半机制,即存活的节点数量>(非>=)所有节点数量的一半,则整个集群可以正常对外提供服务。举个例子,3个节点,最少存活2>(3/2=1.5)个节点,即允许有一个节点宕机下依旧能够对外服务。......
  • oracle TDE使用
    环境:OS:Centos6DB:11.2.0.43节点组成的rac环境 1.先要创建一个"wallet钱包",这个钱包里面保存着密钥,Oracle就是通过这个密钥对列进行加密和解密的.在其中一个节点上操作,我这里是在节点1上操作su-oracle[oracle@rac01~]$mkdir$ORACLE_BASE/wallet[oracle@rac01~]$c......
  • 用system账户修改过Oracle密码期限,改成unlimited 后来新建的账户的密码期限也是unlimi
    https://www.cnblogs.com/hooly/p/14171716.htmlhttps://blog.csdn.net/wang13145/article/details/106660266用system账户修改过Oracle密码期限,改成unlimited后来新建的账户的密码期限也是unlimited吗?......
  • 小景的Dba之路--Oracle用exp导出dmp文件很慢
    小景最近在系统压测相关的工作,其中涉及了Oracle数据库相关的知识,之前考的OCP证书也在此地起了作用。今天的问题是:Oracle用exp导出dmp文件很慢,究竟是什么原因,具体的解决方案都有哪些呢? 下面我逐一来说下,首先列举了一些常见的原因:1.数据量大:如果你要导出的数据库包含大量数据,导......