暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

rhel配置ACFS集群文件系统

Leo 2024-01-11
486

文档课题:rhel配置ACFS集群文件系统.

环境介绍:

OS:rhel 7.9 64位

架构:rac 双节点

数据库:oracle 11.2.0.4

1、配置前信息

如下所示,在安装好p31718723_112040_Linux-x86-64.zip补丁后,asm cluster file systems和volumes选项卡正常显示,当前已添加磁盘组ACFS,现在目标是创建ASM集群文件系统.


2、ACFS创建步骤

2.1、配置acfsload进程开机自启

说明:两个节点均需执行.

[root@rac1 ~]# vi /etc/init.d/acfsload

#!/bin/bash

# chkconfig: 2345 30 21

# description: Load Oracle ASM volume driver on system startup

ORACLE_HOME=/u01/app/11.2.0/grid

export ORACLE_HOME

$ORACLE_HOME/bin/acfsload start -s

 

[root@rac1 init.d]# chmod 755 /etc/init.d/acfsload

[root@rac1 init.d]# chkconfig --add acfsload

[root@rac1 init.d]# chkconfig --list | grep acfsload

 

Note: This output shows SysV services only and does not include native

      systemd services. SysV configuration data might be overridden by native

      systemd configuration.

 

      If you want to list systemd services use 'systemctl list-unit-files'.

      To see services enabled on particular target use

      'systemctl list-dependencies [target]'.

 

acfsload        0:off   1:off   2:on    3:on    4:on    5:on    6:off

 

2.2、添加ora.registry.acfs到ocr配置

说明:该步骤仅需在节点1执行.

[root@rac1 init.d]# /u01/app/11.2.0/grid/bin/crsctl add type ora.registry.acfs.type -basetype ora.local_resource.type -file /u01/app/11.2.0/grid/crs/template/registry.acfs.type

[root@rac1 init.d]# /u01/app/11.2.0/grid/bin/crsctl add resource ora.registry.acfs -attr ACL=\'owner:root:rwx,pgrp:oinstall:r-x,other::r--\' -type ora.registry.acfs.type -f

 

查看是否添加成功.

[root@rac1 init.d]# su - grid -c crs_stat | grep acfs

NAME=ora.registry.acfs

TYPE=ora.registry.acfs.type

 

[root@rac2 init.d]# su - grid -c crs_stat | grep acfs

NAME=ora.registry.acfs

TYPE=ora.registry.acfs.type

 

使用acfsuit命令注册文件系统

[root@rac1 init.d]# /sbin/acfsutil registry

 

2.3、创建卷

说明:此步骤也在节点1执行.

[grid@rac1 ~]$ sqlplus / as sysasm

 

SQL*Plus: Release 11.2.0.4.0 Production on Mon Jan 8 23:41:06 2024

 

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

 

 

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

With the Real Application Clusters and Automatic Storage Management options

 

SQL> alter diskgroup acfs add volume ogg size 5g;

 

Diskgroup altered.

 

SQL> col name for a15

SQL> col state for a15

SQL> select group_number,name,state,type from v$asm_diskgroup;

 

GROUP_NUMBER NAME            STATE           TYPE

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

           1 ACFS            MOUNTED         EXTERN

           2 DATA            MOUNTED         EXTERN

           3 OCR             MOUNTED         EXTERN

 

[grid@rac1 ~]$ export DISPLAY=192.168.133.1:0.0

[grid@rac1 ~]$ asmca


说明:此时在Volumns列已成功出现卷OGG.

 

2.4、格式化为acfs文件系统并挂载

创建/ogg挂载点.

[root@rac1 ~]# mkdir /ogg

[root@rac2 ~]# mkdir /ogg

 

在节点1格式化为acfs集群文件系统.

[root@rac1 ~]# /sbin/mkfs -t acfs -n ogg /dev/asm/ogg-36

mkfs.acfs: version                   = 11.2.0.4.0

mkfs.acfs: on-disk version           = 39.0

mkfs.acfs: volume                    = /dev/asm/ogg-36

mkfs.acfs: volume size               = 5368709120

mkfs.acfs: Format complete.

 

[root@rac1 ~]# /sbin/acfsutil registry -a -f /dev/asm/ogg-36 /ogg

acfsutil registry: mount point /ogg successfully added to Oracle Registry

 

2.5、挂载并验证

[root@rac1 ~]# mount.acfs -o all

[root@rac1 ~]# df -h

Filesystem             Size  Used Avail Use% Mounted on

devtmpfs               894M     0  894M   0% /dev

tmpfs                  910M  566M  345M  63% /dev/shm

tmpfs                  910M   11M  900M   2% /run

tmpfs                  910M     0  910M   0% /sys/fs/cgroup

/dev/mapper/rhel-root   95G   33G   63G  35% /

/dev/sda1             1014M  183M  832M  19% /boot

tmpfs                  182M   12K  182M   1% /run/user/42

tmpfs                  182M     0  182M   0% /run/user/11012

tmpfs                  182M     0  182M   0% /run/user/0

/dev/asm/ogg-36        5.0G   49M  5.0G   1% /ogg

 

[root@rac1 ~]# /sbin/acfsutil info fs

/ogg

    ACFS Version: 11.2.0.4.0

    flags:        MountPoint,Available

    mount time:   Mon Jan  8 23:47:02 2024

    volumes:      1

    total size:   5368709120

    total free:   5317959680

    primary volume: /dev/asm/ogg-36

        label:                 ogg

        flags:                 Primary,Available,ADVM

        on-disk version:       39.0

        allocation unit:       4096

        major, minor:          252, 18433

        size:                  5368709120

        free:                  5317959680

        ADVM diskgroup         ACFS

        ADVM resize increment: 33554432

        ADVM redundancy:       unprotected

        ADVM stripe columns:   4

        ADVM stripe width:     131072

    number of snapshots:  0

    snapshot space usage: 0

    replication status: DISABLED

[root@rac2 ~]# mount.acfs -o all

[root@rac2 ~]# df -h

Filesystem             Size  Used Avail Use% Mounted on

devtmpfs               894M     0  894M   0% /dev

tmpfs                  910M  606M  305M  67% /dev/shm

tmpfs                  910M   11M  900M   2% /run

tmpfs                  910M     0  910M   0% /sys/fs/cgroup

/dev/mapper/rhel-root   95G   26G   70G  28% /

/dev/sda1             1014M  183M  832M  19% /boot

tmpfs                  182M   12K  182M   1% /run/user/42

tmpfs                  182M     0  182M   0% /run/user/11012

tmpfs                  182M     0  182M   0% /run/user/0

/dev/asm/ogg-36        5.0G   87M  5.0G   2% /ogg



说明:如上所示,新建的ASM集群文件成功被挂载到/ogg挂载点.

 

参考文档:

https://blog.csdn.net/shiyu1157758655/article/details/62215468

「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论