龙空技术网

从Oracle ASMLIB/udev 迁移到ASM Filter Driver

思庄认证培训 189

前言:

目前看官们对“oracleasmlib更该权限”大致比较关注,大家都想要了解一些“oracleasmlib更该权限”的相关资讯。那么小编在网摘上网罗了一些对于“oracleasmlib更该权限””的相关内容,希望看官们能喜欢,大家快快来了解一下吧!

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.

标签: #oracleasmlib更该权限