重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 956|回复: 1
打印 上一主题 下一主题

从Oracle ASMLIB/udev 迁移到ASM Filter Driver

[复制链接]
跳转到指定楼层
楼主
发表于 2021-2-18 11:44:21 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
1.查询并设置当前的ASM磁盘以及发现路径
[root@dbserver ~]# su - grid
[grid@dbserver ~]$ asmcmd dsget
parameter:/dev/asm*
profile:/dev/asm*
[grid@dbserver ~]$ asmcmd dsset '/dev/asm*','AFD:*'
[grid@dbserver ~]$ asmcmd dsget
parameter:/dev/asm*, AFD:*
profile:/dev/asm*,AFD:*


2.停止GI服务
[root@dbserver ~]# /u01/app/19.10.0/grid/bin/crsctl stop has -f
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'dbserver'
CRS-2673: Attempting to stop 'ora.orcl.db' on 'dbserver'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'dbserver'
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'dbserver' succeeded
CRS-2677: Stop of 'ora.orcl.db' on 'dbserver' succeeded
CRS-2673: Attempting to stop 'ora.FRA.dg' on 'dbserver'
CRS-2673: Attempting to stop 'ora.DATA.dg' on 'dbserver'
CRS-2677: Stop of 'ora.DATA.dg' on 'dbserver' succeeded
CRS-2677: Stop of 'ora.FRA.dg' on 'dbserver' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'dbserver'
CRS-2677: Stop of 'ora.asm' on 'dbserver' succeeded
CRS-2673: Attempting to stop 'ora.evmd' on 'dbserver'
CRS-2677: Stop of 'ora.evmd' on 'dbserver' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'dbserver'
CRS-2677: Stop of 'ora.cssd' on 'dbserver' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'dbserver' has completed
CRS-4133: Oracle High Availability Services has been stopped.


3.卸载ASMLIB软件
# systemctl disable oracleasm
# oracleasm exit
3 yum remove oracleasm-support


4.配置AFD
[root@dbserver ~]# /u01/app/19.10.0/grid/bin/asmcmd afd_configure
AFD-627: AFD distribution files found.
AFD-634: Removing previous AFD installation.
AFD-635: Previous AFD components successfully removed.
AFD-9294: updating file /etc/sysconfig/oracledrivers.conf
AFD-636: Installing requested AFD software.
AFD-637: Loading installed AFD drivers.
AFD-9321: Creating udev for AFD.
AFD-9323: Creating module dependencies - this may take some time.
AFD-9154: Loading 'oracleafd.ko' driver.
AFD-649: Verifying AFD devices.
AFD-9156: Detecting control device '/dev/oracleafd/admin'.
AFD-638: AFD installation correctness verified.
Modifying resource dependencies - this may take some time.


5.查看状态
[root@dbserver ~]# /u01/app/19.10.0/grid/bin/asmcmd afd_state
ASMCMD-9526: The AFD state is 'LOADED' and filtering is 'ENABLED' on host 'dbserver‘


--如果上述的状态为disabled,则使用下面的命令启用
[root@dbserver ~]# /u01/app/19.10.0/grid/bin/asmcmd afd_filter -e


6.修改/etc/oracleafd.conf
[root@dbserver ~]# vim /etc/oracleafd.conf


afd_diskstring='/dev/asm/data*‘


加上上面这行


7.迁移所有ASM磁盘


[root@dbserver ~]# /u01/app/19.10.0/grid/bin/asmcmd afd_label data1 /dev/asm/data1 --migrate
[root@dbserver ~]# /u01/app/19.10.0/grid/bin/asmcmd afd_label data1 /dev/asm/data2 –migrate
[root@dbserver ~]# /u01/app/19.10.0/grid/bin/asmcmd afd_label data3 /dev/asm/data3 --migrate
[root@dbserver ~]# /u01/app/19.10.0/grid/bin/asmcmd afd_label data4 /dev/asm/data4 --migrate
[root@dbserver ~]# /u01/app/19.10.0/grid/bin/asmcmd afd_label data5 /dev/asm/data5 --migrate
[root@dbserver ~]# /u01/app/19.10.0/grid/bin/asmcmd afd_label data6 /dev/asm/data6 --migrate
[root@dbserver ~]# /u01/app/19.10.0/grid/bin/asmcmd afd_label data7 /dev/asm/data7 --migrate
[root@dbserver ~]# /u01/app/19.10.0/grid/bin/asmcmd afd_label data8 /dev/asm/data8 --migrate
[root@dbserver ~]# /u01/app/19.10.0/grid/bin/asmcmd afd_label data9 /dev/asm/data9 --migrate
[root@dbserver ~]# /u01/app/19.10.0/grid/bin/asmcmd afd_label data10 /dev/asm/data10 --migrate
[root@dbserver ~]# /u01/app/19.10.0/grid/bin/asmcmd afd_lsdsk
--------------------------------------------------------------------------------
Label                     Filtering   Path
================================================================================
DATA1                       ENABLED   /dev/asm/data1
DATA10                      ENABLED   /dev/asm/data10
DATA2                       ENABLED   /dev/asm/data2
DATA3                       ENABLED   /dev/asm/data3
DATA4                       ENABLED   /dev/asm/data4
DATA5                       ENABLED   /dev/asm/data5
DATA6                       ENABLED   /dev/asm/data6
DATA7                       ENABLED   /dev/asm/data7
DATA8                       ENABLED   /dev/asm/data8
DATA9                       ENABLED   /dev/asm/data9
8.启动GI
[root@dbserver ~]# /u01/app/19.10.0/grid/bin/crsctl start has
CRS-4123: Oracle High Availability Services has been started.


9.修改新的ASM磁盘发现路径,只包含AFD


[root@dbserver ~]# su - grid
[grid@dbserver ~]$ asmcmd dsget
parameter:/dev/asm*, AFD:*
profile:/dev/asm*,AFD:*
[grid@dbserver ~]$ asmcmd dsset 'AFD:*'
[grid@dbserver ~]$ asmcmd dsget
parameter:AFD:*
profile:AFD:*


10.列出ASM磁盘


[grid@dbserver ~]$ asmcmd lsdsk
Path
AFD:DATA1
AFD:DATA10
AFD:DATA2
AFD:DATA3
AFD:DATA4
AFD:DATA5
AFD:DATA6
AFD:DATA7
AFD:DATA8
AFD:DATA9


11.执行下面的SQL进行验证
[grid@dbserver ~]$ sqlplus /nolog
SQL> conn / as sysasm
SQL> set linesize 300
SQL> col path for a20
SQL> col library for a45
SQL> col name for a15
SQL> select inst_id,group_number grp_num,name,state,header_status header,mount_status mount,path, library
  2  from gv$asm_disk order by inst_id,group_number,name;
   INST_ID    GRP_NUM NAME            STATE    HEADER       MOUNT   PATH                 LIBRARY
---------- ---------- --------------- -------- ------------ ------- -------------------- ---------------------------------------------
         1          1 DATA_0000       NORMAL   MEMBER       CACHED  AFD:DATA1            AFD Library - Generic , version 3 (KABI_V3)
         1          1 DATA_0001       NORMAL   MEMBER       CACHED  AFD:DATA2            AFD Library - Generic , version 3 (KABI_V3)
         1          1 DATA_0002       NORMAL   MEMBER       CACHED  AFD:DATA3            AFD Library - Generic , version 3 (KABI_V3)
         1          1 DATA_0003       NORMAL   MEMBER       CACHED  AFD:DATA4            AFD Library - Generic , version 3 (KABI_V3)
         1          1 DATA_0004       NORMAL   MEMBER       CACHED  AFD:DATA5            AFD Library - Generic , version 3 (KABI_V3)
         1          1 DATA_0005       NORMAL   MEMBER       CACHED  AFD:DATA6            AFD Library - Generic , version 3 (KABI_V3)
         1          1 DATA_0006       NORMAL   MEMBER       CACHED  AFD:DATA7            AFD Library - Generic , version 3 (KABI_V3)
         1          2 FRA_0000        NORMAL   MEMBER       CACHED  AFD:DATA10           AFD Library - Generic , version 3 (KABI_V3)
         1          2 FRA_0001        NORMAL   MEMBER       CACHED  AFD:DATA8            AFD Library - Generic , version 3 (KABI_V3)
         1          2 FRA_0002        NORMAL   MEMBER       CACHED  AFD:DATA9            AFD Library - Generic , version 3 (KABI_V3)


10 rows selected.

分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

沙发
 楼主| 发表于 2021-2-18 11:45:32 | 只看该作者
以上操作在19.10 + oracle linux 8.3 上通过。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-11-24 23:53 , Processed in 0.086184 second(s), 19 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表