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

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1601|回复: 0
打印 上一主题 下一主题

oracle 19c asm filter driver的使用

[复制链接]
跳转到指定楼层
楼主
发表于 2018-11-5 17:46:44 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 郑全 于 2018-11-5 17:57 编辑

从 12.1.0.2开始,oracle提供了一个 afd的东西,来替代asmlib库和 udev用于asm磁盘的处理。
也就是说,从12.1.0.2开始,要配置asm,在磁盘上,可以不用去配置 udev,或者安装 asmlib程序了,直接使用 afd即可搞定,这个afd是随oracle安装程序自带的,不需要到其他地方去下载,关键是使用 afd,启用了 filter后,root用户使用 dd 也不能破坏 disk,这点不错。下面我们在19c下面来操作一下 :


1.Log in as the root user
  and set the environment variable
             $ORACLE_HOME to the location of the Grid home
             and the environment variable $ORACLE_BASE to a temporary location.               
  su root
  set ORACLE_HOME=/u01/app/19.1.0/grid
  set ORACLE_BASE=/tmp               

  You set $ORACLE_BASE to a temporary location to avoid creating diagnostic or trace files in the Grid home
  before the Oracle Grid Infrastructure installation.               
2.Use Oracle ASM command line tool (ASMCMD) to provision the disk devices for use with Oracle ASM Filter Driver.                 
  ./u01/app/19.1.0/grid/bin/asmcmd afd_label DATA1 /dev/sdb --init
  ./u01/app/19.1.0/grid/bin/asmcmd afd_label DATA2 /dev/sdc --init
  ./u01/app/19.1.0/grid/bin/asmcmd afd_label DATA3 /dev/sdd --init               
3.Verify the device has been marked for use with Oracle ASMFD.                 
   ./u01/app/19.1.0/grid/bin/asmcmd afd_lslbl /dev/sdb
   ./u01/app/19.1.0/grid/bin/asmcmd afd_lslbl /dev/sdc
   ./u01/app/19.1.0/grid/bin/asmcmd afd_lslbl /dev/sdd               
4.Unset the ORACLE_BASE environment variable.


之后,我们在安装gi时,asm的磁盘,就可以选择:/dev/sdb,/dev/sdc;/dev/sdd了。
如果去查看 /dev/oracleafd,就会发现新的盘了:
[root@rac1 ~]# ls -ltr /dev/oracleafd/disks
total 28
-rw-rw-r--. 1 grid oinstall 9 Nov  5 17:19 DATA1
-rw-rw-r--. 1 grid oinstall 9 Nov  5 17:19 DATA2
-rw-rw-r--. 1 grid oinstall 9 Nov  5 17:19 DATA3



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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-5 16:19 , Processed in 0.097972 second(s), 19 queries .

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

© 2001-2020

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