I have a 12.2 RAC cluster in my lab, on two virtual machines. Checking out what acfsutil can do, I figured out that it can supposedly do defragmentation:
[grid@rac1 ~]$ acfsutil defrag -help Usage: acfsutil [-h] command ... # (Version 220.127.116.11.0) -h - help Command Subcmd Arguments --------------- --------- ------------------------------------------------------ defrag dir [-r] <path> defrag dir Defrag all files in a specific directory defrag dir [-r] recursively traverse directories defrag dir <path> path to a specific dir defrag file [-i] <path> [<path> ...] defrag file Defrag specific files defrag file [-i] Estimate reduction in number of extents possible defrag file <path> path to a specific file
So, let’s try it out:
[grid@rac1 ~]$ sudo su - oracle Last login: Mon Aug 28 18:52:05 EDT 2017 from 192.168.1.100 on pts/0 [oracle@rac1 ~]$ acfsutil defrag -r /oradata acfsutil INVALID: Version 18.104.22.168.0
I switched to “oracle” because /oradata mount point is owned by that user.
[oracle@rac1 ~]$ ls -ld /oradata drwxrwxr-x 7 oracle grid 32768 Aug 28 01:47 /oradata
I tried with the user root, but no cigar. The error message is exactly the same. So, it’s time to take a closer look at the error message. The error message tells me that the version 22.214.171.124.0 is invalid. OK, time to look at ASM:
[grid@rac1 ~]$ sqlplus / as sysasm SQL*Plus: Release 126.96.36.199.0 Production on Thu Aug 31 21:40:28 2017 Copyright (c) 1982, 2016, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 188.8.131.52.0 - 64bit Production SQL> column database_compatibility format a20 column compatibility format a20 column name format a15 select name,compatibility,database_compatibility from v$asm_diskgroup; SQL> SQL> SQL> NAME COMPATIBILITY DATABASE_COMPATIBILI --------------- -------------------- -------------------- ACFS 184.108.40.206.0 10.1.0.0.0 MGMT 220.127.116.11.0 10.1.0.0.0 OCR 18.104.22.168.0 10.1.0.0.0
The compatibility of all disk groups is correctly set to the software release, which is 22.214.171.124.0, as is clearly visible from the sqlplus header. The database compatibility doesn’t matter, it simply marks the lowest release of the database that can be created on the ASM group. Time to check out the ACFS file system itself:
[grid@rac1 ~]$ acfsutil compat get /oradata /oradata compatible.advm: 126.96.36.199.0 ACFS compatibility: 188.8.131.52.0
So, ACFS compatibility is set to 184.108.40.206.0, which is an invalid version, as correctly noted by the error message. However, the only way to change the compatibility is to run “mkfs” with the correct options or, in common vernacular, to “reformat the file system”. I will not do that because that would destroy my database. I consider this to be a serious bug. Oracle should not set the default file system compatibility to an invalid version. Here are the arguments for the mkfs.acfs:
[grid@rac1 ~]$ mkfs.acfs mkfs.acfs: Create an ACFS file system. mkfs.acfs: Usage: [-h] [-v] [-f] [-i <metasize>] [-n <name>] [-a <volume>] [-c <release>] <volume> [<size>] mkfs.acfs: [-h] - Prints out this usage message mkfs.acfs: [-v] - Verbose mode mkfs.acfs: [-f] - Force file system format, use to overwrite an existing file system mkfs.acfs: [-i <metasize>] - Metadata block size mkfs.acfs: [-n <name>] - Name of file system to be created mkfs.acfs: [-a <volume>] - ACFS accelerator volume pathname mkfs.acfs: [-c <release>] - Create ACFS file system compatible with specified release (For example, 220.127.116.11.0) mkfs.acfs: <volume> - ACFS primary volume pathname mkfs.acfs: [<size>] - Desired size of the file system in bytes or in units of K|M|G|T|P mkfs.acfs: Version 18.104.22.168.0
The incorrect argument is “-c”. The funniest thing is that the invalid version in question is even listed at the help screen. It looks like the defrag utility will stay out of range for now.