这篇文件介绍了如何通过命令行调整 ACFS 文件系统/ASM 卷 (ADVM) 大小。
- 从 ASM 实例创建 ACFSDG (8GB) 磁盘组:
SQL> CREATE DISKGROUP ACFSDG EXTERNAL REDUNDANCY DISK 'ORCL:ASMDISK8' SIZE 4157 M DISK 'ORCL:ASMDISK9' SIZE 4157M ATTRIBUTE 'compatible.asm' = '11.2', 'compatible.advm' = '11.2'; Diskgroup created.
SQL> Select name, state, total_mb, free_mb from v$asm_diskgroup where name like 'ACFSDG'; NAME STATE TOTAL_MB FREE_MB ------------------------------ ----------- ---------- --------- ACFSDG MOUNTED 8314 8260
- 在 ACFSDG 磁盘组中创建下一个卷 (5GB):
SQL> ALTER DISKGROUP ACFSDG ADD VOLUME ACFSVOLUME1 SIZE 5G ; Diskgroup altered.
- 在 /dev/asm/acfsvolume1-292 卷上创建新的 ACFS 文件系统:
# mkdir /oracle_backup ###(as root user)
$ /sbin/mkfs -t acfs -b 4k /dev/asm/acfsvolume1-292 -n "ACFSVOLUME1_LABEL" ###(as grid user)
- 在/oracle_backup 目录中注册/dev/asm/acfsvolume1-292 卷。
$ /sbin/acfsutil registry -f -a /dev/asm/acfsvolume1-292 /oracle_backup ###(as grid user)
- 在 /dev/asm/acfsvolume1-292 卷上挂载 /oracle_backup 目录:
# /bin/mount -t acfs /dev/asm/acfsvolume1-292 /oracle_backup ###(as root user)
- 创建的 /oracle_backup ACFS 文件系统大小为 5GB:
$ df -hBM /oracle_backup Filesystem 1M-blocks Used Available Use% Mounted on /dev/asm/acfsvolume1-292 5120M 47M 5074M 1% /oracle_backup
- 然后将 ACFS 文件系统大小调整为 6 GB:
$ /sbin/acfsutil size 6G /oracle_backup acfsutil size: new file system size: 6442450944 (6144MB)
- 确认 ACFS 文件系统已调整到 6GB:
$ df -hBM /oracle_backup Filesystem 1M-blocks Used Available Use% Mounted on /dev/asm/acfsvolume1-292 6144M 49M 6096M 1% /oracle_backup
- 由于 ACFS 文件系统调整大小,ASM 卷 (/dev/asm/acfsvolume1-292) 也被隐式调整大小(至 6GB)。
SQL> select FS_NAME, VOL_DEVICE, TOTAL_MB , FREE_MB from V$ASM_ACFSVOLUMES; FS_NAME VOL_DEVICE TOTAL_MB FREE_MB -------------------- ------------------------------ ---------- --------- /oracle_backup /dev/asm/acfsvolume1-292 6144 6095.57031
日期:2020-09-17 00:11:24 来源:oir作者:oir