ACFS 12.2 Quirks with defragmentation

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

-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 on pts/0
[oracle@rac1 ~]$ acfsutil defrag -r /oradata
acfsutil INVALID: Version

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 is invalid. OK, time to look at ASM:


[grid@rac1 ~]$ sqlplus / as sysasm

SQL*Plus: Release 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 - 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;
--------------- -------------------- --------------------

The compatibility of all disk groups is correctly set to the software release, which is, 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
 ACFS compatibility:

So, ACFS compatibility is set to, 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,
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

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.


About mgogala

I am a consultant with an extensive Oracle DBA experience. I have worked on very large databases. I have worked with OPS and RAC since its inception.I am also a published book writer, having published two books about PHP. This blog is about the challenges and adventures in my professional life. Sorry, no family pictures here.
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s