ACFS是oracle提供的基于ASM的共享文件系统,在11.2版本之上才能使用。可以在安装oracle asm软件的主机上用作共享文件系统,存放归档日志,本地的rman备份等,比单纯放在ASM中更直观,可以使用os上的命令进行检查和操作。下面是简单的用法 1,create DG SQL CRE
ACFS是oracle提供的基于ASM的共享文件系统,在11.2版本之上才能使用。可以在安装oracle asm软件的主机上用作共享文件系统,存放归档日志,本地的rman备份等,比单纯放在ASM中更直观,可以使用os上的命令进行检查和操作。下面是简单的用法SQL> CREATE DISKGROUP ACFSDG EXTERNAL REDUNDANCY DISK 'ORCL:ASMDISK8' SIZE 4157 M DISK 'ORCL:ASMDISK9' SIZE 4157 M ATTRIBUTE 'compatible.asm' = '11.2', 'compatible.advm' = '11.2';
alter diskgroup FRA set attribute 'COMPATIBLE.ASM'='11.2'; alter diskgroup FRA set attribute 'compatible.advm'='11.2'
SQL> ALTER DISKGROUP FRA ADD VOLUME ACFSARCVOL SIZE 100G; Diskgroup altered. ASMCMD> volinfo -a Diskgroup Name: FRA Volume Name: ACFSARCVOL Volume Device: /dev/asm/acfsarcvol-306 State: ENABLED Size (MB): 102400 Resize Unit (MB): 256 Redundancy: UNPROT Stripe Columns: 4 Stripe Width (K): 128 Usage: Mountpath:
su - root mkidr -p /archive chown oracle:oinstall /archive /sbin/mkfs -t acfs -b 4k /dev/asm/acfsarcvol-306 [root@dtydb3 ~]# /sbin/mkfs -t acfs -b 4k /dev/asm/acfsarcvol-306 mkfs.acfs: version = 11.2.0.2.0 mkfs.acfs: on-disk version = 39.0 mkfs.acfs: volume = /dev/asm/acfsarcvol-306 mkfs.acfs: volume size = 107374182400 mkfs.acfs: Format complete. [root@dtydb3 ~]# /sbin/acfsutil registry -f -a /dev/asm/acfsarcvol-306 /archive acfsutil registry: mount point /archive successfully added to Oracle Registry [root@dtydb3 ~]# [root@dtydb3 ~]# /sbin/mount.acfs -o all [root@dtydb3 ~]# df -h /dev/asm/acfsarcvol-306 100G 304M 100G 1% /archive
5, 再一次查看信息
ASMCMD> volinfo -a Diskgroup Name: FRA Volume Name: ACFSARCVOL Volume Device: /dev/asm/acfsarcvol-306 State: ENABLED Size (MB): 102400 Resize Unit (MB): 256 Redundancy: UNPROT Stripe Columns: 4 Stripe Width (K): 128 Usage: ACFS Mountpath: /archive
su - grid [grid@dtydb4 ~]$ /sbin/acfsutil size 110G /archive acfsutil size: new file system size: 118111600640 (112640MB) [grid@dtydb4 ~]$ df -h /archive Filesystem Size Used Avail Use% Mounted on /dev/asm/acfsarcvol-306 110G 3.5G 107G 4% /archive
SQL> ALTER SYSTEM SET DB_RECOVERY_FILE_DEST_SIZE = 10G SCOPE=BOTH SID='*'; SQL> ALTER SYSTEM SET DB_RECOVERY_FILE_DEST = '/backup/flash_recovery_area' SCOPE=BOTH SID='*'; 如果不使用acfs,而是默认备份到ASM磁盘组FRA中,使用如下命令 SQL> ALTER SYSTEM SET DB_RECOVERY_FILE_DEST = '+FRA' SCOPE=BOTH SID='*';
1)删除acfs,官方的文档,可以参考下
To permanently remove a volume and Oracle ACFS file system, perform the following steps. These steps destroy the data in the file system.2)如何手工启动acfs