6 Managing Oracle ACFS with Command-Line Tools
Numerous command-line tools are provided for managing Oracle Advanced Cluster File System (Oracle ACFS) and Oracle ASM Dynamic Volume Manager (Oracle ADVM).
Command-line tools for managing and implementing Oracle Advanced Cluster File System (Oracle ACFS), include the following:
Note:
Oracle does not recommend using identifiers for Oracle Database object names that must be quoted. While the use of quoted identifiers may be valid as names in some command-line tools or in SQL statements, the names may not be valid when using other tools that manage the object.
See Also:
-
About Using Oracle ACFS Command-Line Tools for information about running Oracle ACFS
acfsutil
commands -
Oracle Database SQL Language Reference for more information about naming Oracle Database objects
Oracle ACFS Command-Line Tools for Exascale
This topic provides a summary of managing ACFS file systems on Exadata Exascale storage.
ACFS file systems can be created on Exascale storage in the same way that they are created on ASM storage. The management and features of ACFS are identical, including the ACFS snapshot commands. Additionally, on Exascale, one can create and manage volume level snapshots, clones and backups. These are managed dynamically through ACFS on a mounted or unmounted file system. These volume snapshots consume no additional space in the file system. The snapshots and clones are mounted on a separate mountpoint from the source mountpoint and can also be mounted elsewhere in the Exadata RoCE fabric on another RAC cluster. The volume backups are created in OCI object storage.
See Also:
See Using Oracle Exascale for more information about creating and managing Exascale Direct Volumes and the differing volume device file naming conventions.
Note:
ACFS Accelerator operations are not supported with Exascale volumes.
Table 6-1 Summary of Oracle ACFS commands for Exascale
Command | Description |
---|---|
Creates a volume level snapshot of a mounted ACFS file system. |
|
Deletes a volume level snapshot of an ACFS file system on an Exascale volume. |
|
Creates a volume level backup of an ACFS file system on an Exascale volume. |
|
Provides the ability to query information about Exascale volume snapshots taken of ACFS file systems. |
Table 6-2 Summary of existing Oracle ACFS commands enhanced for Exascale
Command | Description |
---|---|
Support added for Exascale volumes to the default display of ACFS file system information. |
|
|
acfsutil volsnap create
Purpose
Create a volume level snapshot of a mounted ACFS file system.
Syntax and Description
acfsutil [-h] volsnap create [-r] [-f] [-n <snap_name>] [-b <backup_name>] {<mountpoint>|<volume_path>} -w [-f|-s] -n <snap_name> [-b <backup_name>] {<mountpoint>|<volume_path>}
Table 6-3 Options for the acfsutil volsnap create command
Option | Description |
---|---|
|
Creates a read-only EDV volume snapshot. |
|
Creates a writeable EDV volume snapshot. |
|
Freezes file system during operation. |
|
Name of EDV volume snapshot to be created. |
|
Name of EDV backup volume to be created. |
|
ACFS file system mount point on EDV volume. |
|
Unmounted ACFS file system on EDV volume. |
Expected Behavior
Default: Create an immediately accessible, read-only snapshot with a name that has
the form <origvolume>_<timestamp>
. The timestamp will
have the form YYMMDDHHMMSS
. Prior to the creation of a read-only
snapshot, the file system will be frozen to ensure crash consistent semantics.
If a snapshot name is supplied, it can be of the form
“/dev/exc/<snap_name>
” or
“<snap_name>
”.
<snap_name>
must be 128 characters or less.
If the backup option is specified, a backup of the volume with the supplied name will be created in the object store. The supplied name must be 128 characters or less. The backup that is created can be restored and attached to a particular node or cluster using ESCLI.
At the conclusion of the command, the created snapshot volume will be available in
/dev/exc/<snap_name>
and it will have the same
characteristics as the parent volume:
- A node-local volume that is snapped should result in a node-local snapshot.
- A cluster volume that is snapped should result in a snapshot that is available on all nodes in the cluster.
- The file system on the created volume snapshot will have the same ACFS compatibility as the parent volume.
- Some ACFS features that require initialization, such as Replication, that were active on the original volume will require new initialization on the created volume snapshot.
Requirements
The ACFS file system to be snapped must be on an Exascale volume. Exascale must be
configured appropriately to support the -b
option. This includes
configuration of the OCI object store and enabling volume backups.
Error Handling
-n
without name: ACFS-00519-b
without name: ACFS-00519-n
with name that exceeds 128 (EXC device name max): ACFS-03043-b
with name that exceeds 128 (EXC device name max): ACFS-03043- If any argument is supplied more than once, ACFS-00519 will be returned with usage.
- Too many arguments: ACFS-00519
- Insufficient arguments (no mount point): ACFS-00535
- Supplied mountpoint not ACFS: ACFS-03037
- Mountpoint or device not accessible: ACFS-03001
- EXC snap creation failed: ACFS-03913 plus errno information.
Examples
The following example show the use of the acfsutil volsnap create
command.
This example shows how to capture a snapshot of an ACFS file system when the file system is mounted.
$ sudo ./acfsutil volsnap create /usmmnt Creation of volume snapshot testvol_200422160634 complete.
This example shows how to capture a snapshot of an ACFS file system when the file system is unmounted.
$ sudo ./acfsutil volsnap create /dev/exc/testvol Creation of volume snapshot testvol_200422160644 complete.
acfsutil volsnap delete
Purpose
Delete a volume level snapshot of an ACFS file system on an Exascale volume.
Syntax and Description
acfsutil [-h] volsnap delete <snap_name>
Table 6-4 Options for the acfsutil volsnap delete command
Option | Description |
---|---|
|
Name of EDV volume snapshot to be deleted. |
Expected Behavior
Delete volume snapshot associated with the specified ACFS file system.
Requirements
- Linux
root
privileges are required. - Specified volume snapshot must be of an ACFS file system.
- Specified volume snapshot to be deleted cannot be actively mounted as an ACFS file system at the time of deletion.
- Specified snapshot name should have the form
“
/dev/exc/<snap_name>
” or “<snap_name>
”.
Error Handling
- Command without name: ACFS-00535
- Command with a name that exceeds 128 (EXC device name max): ACFS-03043
- Too many arguments: ACFS-00519
- Insufficient arguments (no mount point): ACFS-00535
- Invalid snapshot supplied: ACFS-03001
- Snapshot not associated with ACFS file system: ACFS-03911
- Snapshot cannot be deleted because it is in use: ACFS-03914
- EXC snapshot delete ioctl failed: ACFS-03912 and errno information
Examples
The following examples show the use of the acfsutil volsnap
delete
command.
The acfsutil volsnap delete
command cannot delete a volume snapshot
that is mounted.
$ sudo /bin/mount -t acfs /dev/exc/testvol_200422151134 /rousmmnt/ $ /bin/mount | grep /rousmmnt /dev/exc/testvol_200422151134 on /rousmmnt type acfs (ro,relatime,device,rootsuid,ordered,local) $ sudo touch /rousmmnt/new_file touch: cannot touch ‘rousmmnt/new_file’: Read-only file system $ sudo ./acfsutil volsnap delete testvol_200422151134 acfsutil volsnap delete: ACFS-03914: Volume snapshot /dev/exc/testvol_200422151134 cannot be deleted because it is in use.
Once unmounted, the volume snapshot can be deleted.
$ sudo umount /rousmmnt $ sudo /sbin/acfsutil volsnap delete /dev/exc/testvol_200422151134 Deletion of volume snapshot testvol_200422151134 complete.
acfsutil volsnap backup
Purpose
Create a volume level backup of an ACFS file system on an Exascale volume.
Syntax and Description
acfsutil [-h] volsnap backup [[-b <backup_name>] {<mountpoint>|<snap_name>}] | [-q {<mountpoint>|<snap_name>|<backupid>}]
Table 6-5 Options for the acfsutil volsnap backup command
Option | Description |
---|---|
|
Specifies name of EDV volume backup to be created |
|
Query volume backup information. |
|
Name of backup to be created. |
|
Name of EDV volume snapshot tof ACFS file system. |
|
Unique identifier for backup. |
Expected Behavior
Create volume level backup of the specified ACFS file system.
A backup of the volume with the supplied name will be created in the object store. The supplied name must be 128 characters or less.
The backup that is created can be further managed using ESCLI.
Requirements
ACFS file system to be backed up must be on an Exascale volume.
Exascale must be configured appropriately to support this command. This includes configuration of the OCI object store and enabling volume backups.
Error Handling
- Command without name: ACFS-00535
- Command with a name that exceeds 128 (EXC device name max): ACFS-03043
- Too many arguments: ACFS-00519
- Insufficient arguments (no mount point): ACFS-00535
- Invalid snapshot supplied: ACFS-03001
- EXC snapshot backup ioctl failed: ACFS-03954 and errno information
Examples
The following example shows the use of the acfsutil volsnap
backup
command.
This example queries backups of mounted ACFS on Exascale volume.
$ sudo /sbin/acfsutil volsnap backup -q /usmmnt OCI backup id: 2b1:9df2801c90fa486481108d43c03d73f0 OCI backup name: testvol2_240418201924 creation time: Thu Apr 18 20:19:31 2024 size 11796480 ( 11.25 MB ) related volume snapshot id: 2.1:c7866e1d462348068465a17c4da87972 parent file system: /dev/exc/testvol2 on /usmmnt number of volume backups: 1
acfsutil volsnap info
Purpose
Provide the ability to query information about Exascale volume snapshots taken of ACFS file systems. Return information about a single Exascale volume snapshot or all the volume snapshots.
Syntax and Description
acfsutil [h] volsnap info {<mountpoint>|<snap_name>}
Table 6-6 Options for the acfsutil volsnap info command
Option | Description |
---|---|
|
Name of EDV volume snapshot of ACFS file system. |
|
ACFS file system mount point on EDV volume. |
Expected Behavior
Display information about a volume snapshot that was taken of an ACFS file system.
Display a list of volume snapshots associated with the specified ACFS file system.
If specified, snapshot name should have the form
“/dev/exc/<snap_name>
” or
“<snap_name>
”
If the supplied ACFS mount point is associated with an Exascale snapshot, the information about that Exascale volume snapshot will be returned along with the list of volume snapshots associated with the parent.
Requirements
ACFS file system must be on an Exascale volume.
Exascale volume snapshot was created using acfsutil volsnap
create
.
Error Handling
snap_name
name that exceeds 128 (EXC device name max): ACFS-03043- Too many arguments: ACFS-00519
- Invalid snapshot supplied: ACFS-03001
Examples
The following examples show the use of the acfsutil volsnap
info
command.
Display general information about a snapshot such as the name, path, parent, and creation time.
$ sudo /sbin/acfsutil volsnap info testvol2_240418202047 volume snapshot name: testvol2_240418202047 volume snapshot path: /dev/exc/testvol2_240418202047 RO snapshot or RW snapshot: RO creation time: Thu Apr 18 20:20:47 2024 parent volume device name: testvol2 parent mount path: /usmmnt active ACFS features: number of volume snapshots: 1 $ sudo /sbin/acfsutil volsnap info snaprw volume snapshot name: snaprw volume snapshot path: /dev/exc/snaprw RO snapshot or RW snapshot: RW creation time: Thu Apr 18 20:20:53 2024 parent RO volume snapshot device name: testvol2_240418202047 active ACFS features: number of volume snapshots: 1
This example shows how to obtain a list of volume snapshots # associated with a file system.
$ sudo /sbin/acfsutil volsnap info /usmmnt volume snapshot name: testvol2_240418201924 volume snapshot path: /dev/exc/testvol2_240418201924 RO snapshot or RW snapshot: RO creation time: Thu Apr 18 20:19:25 2024 parent volume device name: testvol2 parent mount path: /usmmnt active ACFS features: OCI backup id: 2b1:9df2801c90fa486481108d43c03d73f0 OCI backup name: testvol2_240418201924 volume snapshot name: testvol2_240418202047 volume snapshot path: /dev/exc/testvol2_240418202047 RO snapshot or RW snapshot: RO creation time: Thu Apr 18 20:20:47 2024 parent volume device name: testvol2 parent mount path: /usmmnt active ACFS features: volume snapshot name: snaprw volume snapshot path: /dev/exc/snaprw RO snapshot or RW snapshot: RW creation time: Thu Apr 18 20:20:53 2024 parent RO volume snapshot device name: testvol2_240418202047 active ACFS features: number of volume snapshots: 3
Oracle ACFS Diagnostic Commands
This topic provides a summary of the Oracle ACFS command-line utilities for diagnostic purposes.
Oracle ACFS provides various acfsutil
command-line utilities for diagnostic purposes.
Note:
Run the diagnostic commands only when Oracle Support requests diagnostic data for analysis.
The following table lists the Oracle ACFS utilities with brief descriptions.
For information about running Oracle ACFS acfsutil
commands, refer to About Using Oracle ACFS Command-Line Tools.
Table 6-7 Summary of Oracle ACFS diagnostic commands
Command | Description |
---|---|
Debugs an Oracle ACFS file system. |
|
Writes text to a blog file. |
|
Collects internal Oracle ACFS state information. |
|
Display the trace entries for open files. |
|
Displays lock contention statistics. |
|
Retrieves memory diagnostic log files and manages debug settings. |
|
Copies metadata from an Oracle ACFS file system into a separate output file. |
|
Manages Oracle ACFS persistent logging configuration settings. |
|
Modifies or displays Oracle ACFS tunable parameters. |
|
Modifies or displays Oracle ADVM parameters. |
acfsdbg
Purpose
Debugs an Oracle ACFS file system.
Syntax and Description
acfsdbg [-r] [-l] [-x] volume_device
acfsdbg -h
For information about running Oracle ACFS acfsutil
commands, refer to About Using Oracle ACFS Command-Line Tools.
The following table contains the options available with the acfsdbg
command.
Table 6-8 Options for the acfsdbg command
Option | Description |
---|---|
|
Prints out the usage message which displays the various options that are available when invoking the |
|
Operates in read-only mode. No data is modified on the file system and all write commands are disabled. If the device is mounted anywhere, |
|
Processes kernel log files. The default is to not process the log files. |
|
Specified for accelerator data collected by |
|
Specifies the device name of the volume. |
You must be the administrator or a member of the Oracle ASM administrator group to run acfsdbg
.
Subcommands
Table 6-9 lists the subcommands of acfsdbg
.
Table 6-9 Subcommands for acfsdbg
Option | Description | Syntax |
---|---|---|
|
Calculates simple arithmetic expressions Valid operators: + - * / % & | ^ ~ << >> White space starts a new expression 0-1 represents a negative 1 |
|
|
Generates and replaces checksum in header Header offset can be an expression as used by the White space starts a new header offset Command is disabled in read-only mode |
|
|
Closes the open handle to the device |
|
|
Echoes text on command line to stdout |
|
|
Displays the specified File Entry TAble (FETA) entry |
|
|
Displays help message |
|
|
Displays structure at disk offset |
|
|
Opens a handle to a device. The default is the volume device name entered on the command line |
|
|
Sets the context of commands to the primary file system |
|
|
Sets the prompt to the specified string |
|
|
Exits the |
|
|
Reads value from offset The default size to read in is 8 bytes The default count to read is 1 |
|
|
Sets the context of commands to the specified snapshot |
|
|
Writes hexadecimal, octal, or decimal values at the disk offset, estimating how many bytes to write based on value size or number of digits in leading 0 hexadecimal values The disk offset can be an expression used by the Numeric values can also be an expression as used by the This command is disabled in read-only mode |
|
Examples
Example 6-1 shows the use of the acfsdbg
subcommand.
Example 6-1 Using the acfsdbg command
$ /sbin/acfsdbg /dev/asm/voume1-123 acfsdbg: version = 11.2.0.3.0 Oracle ASM Cluster File System (ACFS) On-Disk Structure Version: 39.0 The ACFS volume was created at Mon Mar 2 14:57:45 2011 acfsdbg> acfsbdg> calculate 60*1024 61,440 61440 61440 0xf000 0170000 1111:0000:0000:0000 acfsdbg> prompt "acfsdbg test>" acfsdbg test> echo "offset 64*1024" | acfsdbg /dev/asm/volume1-123
acfsutil blog
Purpose
Writes text to the blog file.
Syntax and Description
acfsutil [-h] blog acfsutil blog {-t text | -u} mount_point
For information about running Oracle ACFS acfsutil
commands, refer to About Using Oracle ACFS Command-Line Tools.
The following table contains the options available with the acfsutil
blog
command.
Table 6-10 Options for the acfsutil blog command
Option | Description |
---|---|
|
Writes text to the blog file at the specified mount point. |
|
Updates blog debug levels from |
|
Specifies the mount point. |
The acfsutil
blog
command enables you to write text to a blog file.
.
Examples
The following example illustrates how to run the acfsutil
blog
command. Running acfsutil
blog
with the —h
option displays help.
Example 6-2 Using acfsutil blog
$ /sbin/acfsutil -h $ /sbin/acfsutil -t "this is a blog test" blog my_mount_point $ /sbin/acfsutil -u blog my_mount_point
acfsutil dumpstate
Purpose
Collects internal Oracle ACFS state information for diagnosis by Oracle support.
Syntax and Description
acfsutil [-h] dumpstate acfsutil dumpstate {acfs_path | [-d [-p {file_name | -}]] [-z] [acfs_path]}
acfsutil
-h
dumpstate
displays help text and exits.
For information about running Oracle ACFS acfsutil
commands, refer to About Using Oracle ACFS Command-Line Tools.
The following table contains the options available with the acfsutil
dumpstate
command.
Table 6-11 Options for the acfsutil dumpstate command
Option | Description |
---|---|
acfs_path |
Specifies the directory path to an Oracle ACFS file system. |
|
Dump statistics to |
-p { file_name | - } |
Modifies the |
|
Clears all current statistics. |
The acfsutil
dumpstate
command collects internal Oracle ACFS state information for a specified file system. The state information is written to a binary incident file in a logging directory. The binary log incident file is specific to the file system mounted at the specified path. The acfs.dumpstats
statistics file, or the specified alternate output, contains statistics for the entire Oracle ACFS kernel module.
Note:
Run the acfsutil
dumpstate
command only when Oracle Support requests diagnostic and debugging data for analysis.
Examples
The following example shows the use of the acfsutil
dumpstate
command.
Example 6-3 Using the acfsutil dumpstate command
The following command execution creates a binary incident file for the specified file system.
$ /sbin/acfsutil dumpstate /acfsmounts/acfs1/
The following command execution dumps file system statistics to acfs.dumpstats
and creates a binary incident file for the specified file system.
$ /sbin/acfsutil dumpstate -d /acfsmounts/acfs1/
The following command execution clears statistics for all file systems.
$ /sbin/acfsutil dumpstate -z
The following command execution dumps file system statistics to acfs.dumpstats
, creates a binary incident file, and clears all file system statistics for the specified file system.
$ /sbin/acfsutil dumpstate -d -z /acfsmounts/acfs1/
acfsutil info ftrace
Purpose
Display the trace entries for open files associated with the Oracle ACFS file system specified by the mount point.
Syntax and Description
acfsutil info ftrace -h
acfsutil info ftrace [-s] mount_point
acfsutil info ftrace —h
displays help text and exits.
For information about running Oracle ACFS acfsutil
commands, refer to About Using Oracle ACFS Command-Line Tools.
The following table contains the options available with the acfsutil info ftrace
command.
Table 6-12 Options for the acfsutil info ftrace command
Option | Description |
---|---|
|
Display only file IDs of open files. |
|
Specifies the directory where the file system is mounted. |
The acfsutil
info
ftrace
command displays a list of open files on a mounted Oracle ACFS file system.
The Oracle ACFS kernel driver keeps track of which files are loaded in memory. These files may not have an active open and may just be cached. The open file tracing is able to determine which of those cached File Control Blocks (FCBs) have an active open or reference. The intent of this command is to enable you to determine if, and which, files are still being referenced that could prevent a file system unmount from occuring.
When acfsutil
info
ftrace
initially runs, the command attempts to purge any cached files that are no longer referenced. This operation may require some time to complete because the modified metadata and user data for each file has to be flushed to disk.
The following describes the output of the acfsutil
info
ftrace
command. Note that a file can refer to a regular file or directory.
The basic format of the output is:
Fileid: %ID%, Pathname: %PATH% [%OP%] Pid: %PID% Ppid: %PPID% Elapsed time: %TIME% Cmd: %CMD% ...
The fields are described in the following list.
-
%ID%
: The numeric file identifier. This is the same number that is used withacfsutil
info
id
. This value is also known as the inode number on Linux. -
%PATH%
: The generated pathname for the file based on the%ID%
.N/A
may be displayed if it is not available. -
%OP%:
The type of operation that accessed the file. The values may be the following:-
LOOKUP
: The specified process looked up this file via the pathname. -
CREATE
: The specified process created the file. -
NFS
: A NFS process has accessed the file on behalf of client. -
OPEN
: The specified process opened the file. -
MAP
: The specified process mapped the file into memory.
-
-
%PID%
: The process id%PPID%
: The parent process id. This output item may not be available. -
%TIME%
: The elapsed time from when the operation occurred. The format is: d (days), h (hours), m (minutes), s (seconds) -
%CMD%
: The name of the process that performed the operation.
Each file listed may have more than one operation listed depending on the system workload. The amount of operations displayed is limited to conserve memory. The Oracle ACFS driver keeps a rotating log for each operation and the operation entries may wrap. As a result, the oldest operation may not be the first one displayed.
Examples
The following example shows the acfsutil
info
ftrace
command run on the /mnt
mount point.
Example 6-4 Using the acfsutil info ftrace command
$ acfsutil info ftrace /mnt Fileid: 42, Pathname: /mnt/yum.conf [LOOKUP] Pid: 27009 Ppid: 14999 Elapsed time: 0d 00h 00m 03s Cmd: tail [OPEN ] Pid: 27009 Ppid: 14999 Elapsed time: 0d 00h 00m 03s Cmd: tail Fileid: 155, Pathname: /mnt/bash [LOOKUP] Pid: 9731 Ppid: 19588 Elapsed time: 0d 00h 00m 08s Cmd: cp [OPEN ] Pid: 9731 Ppid: 19588 Elapsed time: 0d 00h 00m 08s Cmd: cp [OPEN ] Pid: 9735 Ppid: 19588 Elapsed time: 0d 00h 00m 05s Cmd: bash [MAP ] Pid: 9735 Ppid: 19588 Elapsed time: 0d 00h 00m 05s Cmd: bash [MAP ] Pid: 9735 Ppid: 19588 Elapsed time: 0d 00h 00m 05s Cmd: bash [MAP ] Pid: 9735 Ppid: 19588 Elapsed time: 0d 00h 00m 05s Cmd: bash Fileid: 43, Pathname: /mnt/dir1 [LOOKUP] Pid: 14485 Ppid: 7829 Elapsed time: 0d 12h 20m 13s Cmd: mkdir [LOOKUP] Pid: 7829 Ppid: 7828 Elapsed time: 0d 12h 20m 06s Cmd: bash [LOOKUP] Pid: 7829 Ppid: 7828 Elapsed time: 0d 12h 20m 06s Cmd: bash
acfsutil lockstats
Purpose
Displays lock contention statistics.
Syntax and Description
acfsutil lockstats [-h] Command Subcmd Arguments -------------- ------------------ ---------------------------------------------- lockstats lh [-b] [-e] [-z] [-t <top>] [-s <sort column>] lockstats lh -b - Begin collecting lock statistics lockstats lh -e - End collecting lock statistics lockstats lh -z - Zero out the lock statistics collected so far lockstats lh -t <n> - Print only the top 'n' lock statistics lockstats lh -s < acquires - Sort the data on the specified column lockstats lh |totalwait lockstats lh |maxwait lockstats lh |totalheld lockstats lh |maxheld
acfsutil lockstats lh —h
displays help text and exits.
For information about running Oracle ACFS acfsutil
commands, refer to About Using Oracle ACFS Command-Line Tools.
The following table contains the options available with the acfsutil lockstats
command.
Table 6-13 Options for the acfsutil lockstats command
Option | Description |
---|---|
|
Begins (enables) collecting lock statistics. |
|
Stops (disables) collecting lock statistics. |
|
Zeroes out (clears) the current collected lock statistics. |
|
Displays the top n lock statistics. |
|
Sorts the lock statistics on the specified sort column. Valid sort column values are: By default, the statistics are sorted by |
-
The first column is the lock hierarchy group name.
-
The second column is the number of locks acquired in that particular group.
-
The third column is the maximum time waited among all the lock acquires.
- The fourth and seventh columns are file/line number references.
-
The fifth column is the cumulative time waited for all the lock acquires.
- The sixth column is the maximum number of locks held per type during the specified period.
Examples
The following example shows multiple ways to use of the acfsutil
lockstats
command.
Example 6-5 Using the acfsutil lockstats command
# Enable lock statistics collection in the kernel. No data is displayed. $ acfsutil lockstats lh -b # Zero out any and all the lock statistics collected. No data is displayed. $ acfsutil lockstats lh -z # Disable lock statistics collection in the kernel. No data is displayed. $ acfsutil lockstats lh -e # Displays lock statistics. $ acfsutil lockstats lh Stats time period: Mon Apr 8 14:23:41 2024 -> Mon Apr 8 14:25:50 2024 (129 sec) +--------------------------+---- ----+----------+--------------------+------------+----------+--------------------+------------+ | Lock Type | Acquires| Max Wait | @ File/Line | Total Wait | Max Held | @ File/Line | Total Held | +--------------------------+---------+----------+--------------------+------------+----------+--------------------+------------+ | LH_RangeDLMLock | 458752 | 1 | ofsgensnap.c/14091 | 4507 | 9 | ofsgensnap.c/25847 | 23972 | | LH_FileDLMLock | 131091 | 16 | ofslinfops.c/9812 | 1440 | 487 | ofslinfops.c/9812 | 121508 | | LH_SnapCowBufferLock | 9 | 283 | ofsgensnap.c/31458 | 1275 | 63 | ofsgensnap.c/31458 | 358 | | LH_MetabufLock | 2715309 | 1 | ofsgenmeta.c/8364 | 98 | 158 | ofsgenmeta.c/8364 | 19880 | | LH_SnapMasksLock | 399725 | 6 | ofsgensnap.c/27393 | 31 | 7 | ofsgensnap.c/3161 | 2643 | | LH_IgnoreCompletely |94075009 | 0 | */* | 0 | * | */* | * | ... | LH_GlobalVCBListResource | 18 | 0 | ofslinmisc.c/2164 | 0 | 0 | ofslinmisc.c/2164 | 0 |\ +--------------------------+---------+-----------+--------------------+------------+----------+-------------------+------------+ # Displays lock statistics, sorted on the ‘Acquires’ column. $ acfsutil lockstats 1h -s acquires Stats time period: Mon Apr 8 14:23:41 2024 -> Mon Apr 8 14:28:31 2024 (290 sec) +---------------------+----------+----------+---------------------+------------+----------+---------------------+------------+ | Lock Type | Acquires | Max Wait | @ File/Line | Total Wait | Max Held | @ File/Line | Total Held | +---------------------+----------+----------+---------------------+------------+----------+---------------------+------------+ | LH_IgnoreCompletely | 94405610 | 0 | */* | 0 | * | */* | * | | LH_OFSBUFHashChain | 2748263 | 0 | */* | 0 | * | */* | * | | LH_MetabufLock | 2734918 | 1 |ofsgenmeta.c/8364 | 98 | 158 |ofsgenmeta.c/8364 | 19941 | | LH_DLMSpinLock | 2512603 | 0 | */* | 0 | * | */* | * | | LH_FCBSpinLock | 963192 | 0 | */* | 0 | * | */* | * | | LH_TrackOnly | 820099 | 0 | ofsgensnapops.c/626 | 0 | 7 | ofsgensnapops.c/626 | 57 | # Displays all of the lock statistics, sorted on the ‘Max Wait’ column. $ acfsutil lockstats 1h -s maxwait Stats time period: Mon Apr 8 14:23:41 2024 -> Mon Apr 8 14:29:25 2024 (344 sec) +----------------------+----------+----------+--------------------+------------+----------+----------------------+------------+ | Lock Type | Acquires | Max Wait | @ File/Line | Total Wait | Max Held | @ File/Line | Total Held | +----------------------+----------+----------+--------------------+------------+----------+----------------------+------------+ | LH_SnapCowBufferLock | 9 | 283 | ofsgensnap.c/31458 | 1275 | 63 | ofsgensnap.c/31458 | 358 | | LH_DRSLScan_lock | 7 | 27 | ofsgendrsl.c/2427 | 27 | 27 | ofsgensnapops.c/5217 | 42 | | LH_FileDLMLock | 131092 | 16 | ofslinfops.c/9812 | 1440 | 487 | ofslinfops.c/9812 | 121508 | | LH_RangeMetaDataLock | 458752 | 9 | ofsgendlm.c/12260 | 26 | 9 | ofsgendlm.c/12255 | 21869 | | LH_SnapMasksLock | 399738 | 6 | ofsgensnap.c/27393 | 31 | 7 | ofsgensnap.c/-3161 | 2716 | +----------------------+----------+----------+--------------------+------------+----------+----------------------+------------+ # Displays lock statistics, sorted on the ’Total Wait’ column. $ acfsutil lockstats 1h -s totalwait Stats time period: Mon Apr 8 14:23:41 2024 -> Mon Apr 8 14:29:03 2024 (322 sec) +---------------------+----------+----------+---------------------+------------+------------+--------------------+------------+ | Lock Type | Acquires | Max Wait | @File/Line | Total Wait | Max Held | @ File/Line | Total Held | +---------------------+----------+----------+---------------------+------------+------------+--------------------+------------+ | LH_RangeDLMLock | 458752 | 1 | ofsgensnap.c/14091 | 4507 | 9 | ofsgensnap.c/25847 | 23972 | | LH_FileDLMLock | 131092 | 16 | ofslinfops.c/9812 | 1440 | 487 | ofslinfops.c/9812 | 121508 | | LH_SnapCowBufferLock| 9 | 283 | ofsgensnap.c/31458 | 1275 | 63 | ofsgensnap.c/31458 | 358 | | LH_MetabufLock | 2741093 | 1 | ofsgenmeta.c/8364 | 98 | 158 | ofsgenmeta.c/8364 | 19962 | | LH_SnapMasksLock | 399737 | 6 | ofsgensnap.c/27393 | 31 | 7 | ofsgensnap.c/3161 | 2711 | # Displays lock statistics, sorted on the ’Total Held’ column. $ util lockstats lh -s totalheld Stats time period: Mon Apr 8 14:23:41 2024 -> Mon Apr 8 14:29:48 2024 (367 sec) +-------------------------------------+--------------+-----------+------------------------------+------------+------------+------------------------------+------------+ | Lock Type | Acquires | Max Wait | @ File/Line | Total Wait | Max Held | @ File/Line | Total Held | +-------------------------------------+--------------+-----------+------------------------------+------------+------------+------------------------------+------------+ | LH_FileDLMLock | 131092 | 16 | ofslinfops.c/9812 | 1440 | 487 | ofslinfops.c/9812 | 121508 | | LH_SnapsModifyingVOPsLock | 131076 | 1 | ofsgenmisc.c/25924 | 4 | 490 | ofsgenmisc.c/25924 | 121487 | | LH_FileMetaDataLock | 131139 | 1 | ofslinfops.c/9812 | 4 | 487 | ofslinfops.c/9812 | 116919 | | LH_SnapSyncDIOCowLock | 65536 | 0 | ofslinfops.c/10484 | 0 | 15 | ofslinfops.c/10484 | 60020 | | LH_RangeDLMLock | 458752 | 1 | ofsgensnap.c/14091 | 4507 | 9 | ofsgensnap.c/25847 | 23972 | # Displays lock statistics, sorted on the ’Max Held’ column. $ util lockstats lh -s maxheld Stats time period: Mon Apr 8 14:23:41 2024 -> Mon Apr 8 14:30:02 2024 (381 sec) +-------------------------------------+--------------+-----------+------------------------------+------------+------------+------------------------------+------------+ | Lock Type | Acquires | Max Wait | @ File/Line | Total Wait | Max Held | @ File/Line | Total Held | +-------------------------------------+--------------+-----------+------------------------------+------------+------------+------------------------------+------------+ | LH_SnapsModifyingVOPsLock | 131076 | 1 | ofsgenmisc.c/25924 | 4 | 490 | ofsgenmisc.c/25924 | 121487 | | LH_FileMetaDataLock | 131139 | 1 | ofslinfops.c/9812 | 4 | 487 | ofslinfops.c/9812 | 116919 | | LH_FileDLMLock | 131092 | 16 | ofslinfops.c/9812 | 1440 | 487 | ofslinfops.c/9812 | 121508 | | LH_ResizeDeferLock | 259 | 0 | ofsgenfshare.c/13101 | 0 | 204 | ofsgenfshare.c/13101 | 6777 | | LH_SnapMapMarkerSerializeDLMLock | 125 | 0 | ofsgensnapops.c/626 | 0 | 204 | ofsgensnapops.c/626 | 6726 |
acfsutil log
Purpose
Retrieves memory diagnostic log files and manages debug settings.
Syntax and Description
acfsutil [-h] log acfsutil log [-f filename] [-s] [-r n{K|M|G|T|P}] [-p {avd|ofs|oks}] [-l debuglevel] [-n consolelevel] [-o wait_time] [-q] [-c debugcontext] [-T file_type] [-m mount_point] [-a] [-C] [-t]
For information about running Oracle ACFS acfsutil
commands, refer to About Using Oracle ACFS Command-Line Tools.
The following table contains the options available with the acfsutil
log
command.
Table 6-14 Options for the acfsutil log command
Option | Description |
---|---|
|
Write the in-memory log to the specified file. The default file is |
|
Shows the size of the in-memory log file. |
|
Sets the size of the in-memory log file. |
|
Specifies the product for setting the level or querying settings. The is default all products: Oracle ADVM ( |
|
Sets the in-memory debug level. The default debug level is |
|
Sets the debug level for persistent logging . Other persistent log configuration settings are managed by the |
|
Sets the log size, the debug level, and the product values on all nodes; waits for the number of seconds specified by wait_time; dumps in the memory log on all nodes; and then resets the debug level and the log size. |
|
Queries the debug settings for a specified product. For example: |
|
Sets the debug context, internal only. |
|
Sets the debug file type, internal only. |
|
Specifies to debug only the file system at the specified mount point. |
|
Resets the debug logging to log for all file systems. |
|
Dumps a memory log on all cluster nodes, and also can be added to |
|
Dumps all Hang Manager thread information to in-memory and persistent logs. |
The acfsutil
log
command enables you to manage memory diagnostic log files. With none of the options specified, the acfsutil
log
command retrieves and writes the ./oks.log
memory log by default.
The -o
option performs the following:
-
Sets the log size to
500M
, the log level to5
, and the product toofs
(acfs) for the in-memory log on all nodes -
Displays an informational message, such as Blocking for 180 seconds, reproduce problem now
-
After waiting for the specified number of seconds, then displays Dumping log on all nodes
-
Initiates a clusterwide dump of logs
-
Resets the log level to
2
and resets the log size to the default
The -o
option can be combined with the -p
, -l,
and -r
options if the default product, debug level, or log size settings should be changed.
You must be the root
user or an Oracle ASM administrator user to run this command.
Examples
The following example shows various ways to run the acfsutil
log
command.
Example 6-6 Using acfsutil log
#increase internal log size to 100Mb $ acfsutil log -r 100M #increase log level for acfs to 5 $ acfsutil log -l 5 -p ofs #increase log level for oks to 5 $ acfsutil log -l 5 -p oks #collect in memory log and place it into /tmp/logfile $ acfsutil log -f /tmp/logfile #put trace level back to default, level 2 $ acfsutil log -l 2 -p ofs $ acfsutil log -l 2 -p oks # increase log level to 5, wait 3 seconds, and then automatically dump a log on all nodes, # log will be in a dated file in directory specified by acfsutil plog -q $ acfsutil log -l 5 -o 3 Blocking for 3 seconds, reproduce problem now Dumping log on all nodes # dump out the stacks of all acfs threads running on the system on all nodes into log files # in the directory specified by acfsutil plog -q $ acfsutil log -t -C
acfsutil meta
Purpose
Copies metadata from an Oracle ACFS file system into a separate output file.
Syntax and Description
acfsutil meta -h acfsutil meta [-v] [-g] [-g -O -C -S] [-O] [-C COW_filepath] [-S COW_size] [-q nn[K|M|G|T]] [-l log_file_path] [-o acfs_extent_offsets] {-f record_oriented_metadata_output_file} [-a accel_device] volume_device acfsutil meta {-e record_oriented_metadata_input_file [-i]} {-f output_filesystem_meta_file_prefix_name}
acfsutil meta
-h
displays help text and exits.
For information about running Oracle ACFS acfsutil
commands, refer to About Using Oracle ACFS Command-Line Tools.
The following table contains the options available with the acfsutil
meta
command. The options are shown in Linux format (also AIX and Solaris format).
Table 6-15 Options for the acfsutil meta command
Option | Description |
---|---|
|
Specifies the path name of the output file into which the metadata is copied. |
|
Do not perform a block scan looking for lost metadata on the entire volume. Instead, only reads the known metadata blocks. This option is only recommended for file systems in good health. |
|
Same as the |
|
Specifies to run the Oracle ACFS online checker ( |
|
Specifies the path to the Copy-On-Write (COW) file for the Oracle ACFS online checker. The path must be on a different Oracle ACFS file system. |
|
Specifies the size of the Copy-On-Write (COW) file for Oracle ACFS online checker. The size must be large enough so the original blocks can be preserved when the file system modifications are made. |
|
Specifies a volume device name of the file system which is to be copied. |
|
Specifies verbose mode to generate additional diagnostic messages. |
|
Invokes the metadata collector in quick sccan mode. The scanning of the volume stops at the specified size. The number specified must be a positive integer and the value must be at least 200 M. The units are K (Kilobytes), M (Megabytes), G (Gigabytes), or T (Terabytes). If the unit indicator is specified, then it must be appended to the integer. If omitted, the default unit is bytes. |
|
Specifies the path to the log file. If not specified, the log file is generated in the current directory with a default name of |
|
Specifies a list of comma separated file offsets from which the meta collector additionally copies data. |
|
Specifies the location of any associated accelerator device, to be used if the file system is unmountable. |
|
Expands the specified record-oriented metadata file into files that can be used with |
|
The |
|
Specifies the path name of the output file from |
The acfsutil
meta
command operates as a metadata collector to partially copy an Oracle ACFS file system into a separate specified record-oriented output file. The metadata collector reads the contents of the file system specified by the volume device name of an Oracle ACFS file system. This input file system is searched for Oracle ACFS metadata and then all metadata found is written into the specified record-oriented output file. The generated record-oriented output file can be easily transferred to a another system, where it can expanded for diagnostics and analysis, without impact to the original file system at the customer site.
The -g
option collects only the known good metadata. The -g
option should not be used with a corrupted file system because the -g
option does not find lost metadata. Any lost metadata may be important in diagnosing a file system corruption. If the file system is in good repair, the -g
option may collect the metadata much faster because it does not need to scan the entire physical volume looking for lost metadata blocks.
When the acfsutil
meta
-g -O -C -S
command is run on
Linux, the Oracle ACFS online checker
(fsck
) runs automatically. The
Oracle ACFS online checker, running on behalf of
acfsutil
meta
-g
, transverses the Oracle ACFS
file system metadata using the metadata on-disk
pointers, and writes metadata that has been read
into the acfsutil
meta
-g
metadata
collection file. For information about the online
fsck
command on Linux, refer to
Oracle ACFS Command-Line Tools for Linux Environments.
To obtain the best copy of the file system with acfsutil meta
, dismount the file system before running acfsutil meta
. If it is not possible to dismount the file system, avoid modifying the contents or performing a volume resizing operation while acfsutil meta
is running.
If the original file system is very large, then the output file can also be very large. Compress the output file when possible to reduce storage space and transmission time.
If the file system has an accelerator device associated with it, acfsutil meta
also copies the accelerator device data into the record-oriented output file. This operation occurs automatically.
In most circumstances, acfsutil meta
automatically copies the accelerator device into the record-oriented output file. However, if you have think that the meta collector is not able to find the accelerator device on its own, you can specify the name on the command line with the -a
option. For example, this situation could occur if the file system is corrupt. Note that using the -a
option overrides how the meta collector operates automatically, so -a
should be used carefully.
The output file should not be placed on the Oracle ACFS device that is specified as the input device because the metadata command might process the output file also. The output file should be placed on a file system that can support an output file which is the size of the Oracle ACFS input volume device. The output file should not need all that storage unless the file system is full and contains all metadata and almost no user data, which is unlikely, but not impossible.
The -q
flag should be used with caution. When -q
is specified, the meta collector does not scan and copy the entire input file system. Instead, it only scans and copies a predetermined number of bytes and certain data structures which are considered important. The primary use for the -q
flag is for situations where there is not sufficient time to run the full version of the metadata collector. The -q
flag should not be used unless it is recommended by the support personnel investigating the problem.
Expanding the record-oriented output file should be performed on the system where diagnosis and analyzes is to be performed. For example, the following command expands record-oriented metadata file on another file system that has adequate storage space.
acfsutil meta -e record_oriented_metadata_input_file -f output_filesystem_meta_file_prefix_name
The output of the command provides sparse files suitable for use with fsck
or acfschkdsk
. If the record oriented metadata input file includes an accelerator volume, a second sparse output file is created using the same output file name prefix with .acc
suffix appended. The file system used for the expanded files should support sparse files. Otherwise, the resulting expanded files could be extremely large containing useless zeros where sparse holes could be saving space.
The acfsutil meta
expanded output file can be read by the fsck
command in most cases. However, the Oracle ACFS specific fsck
command on some OS platforms might not access the output file correctly or might not work with a specified flag. You can use a slightly modified fsck
command form in these cases. For example:
-
On Linux, run the command in this format if you are using the
—x
flag:/sbin/fsck.acfs -x filesystem_meta_file.acc filesystem_meta_file
-
On Solaris, run the command in this format if you are using the
—o
x
flag:/usr/lib/fs/acfs/fsck -o x=filesystem_meta_file.acc filesystem_meta_file
-
On AIX, run the command in this format:
/sbin/helpers/acfs/fsck filesystem_meta_file
Examples
Example 6-7 shows the use of the acfsutil meta
command to copy and expand metadata into output files.
Example 6-7 Using the acfsutil meta command
$ /sbin/acfsutil meta -f /acfsmounts/critical_apps/record_oriented_metadata_file /dev/asm/volume1-123
You can then expand the output file on the system where diagnostics and analysis are performed.
$ /sbin/acfsutil meta -e record_oriented_metadata_file -f filesystem_meta_file
acfsutil plogconfig
Purpose
Manages Oracle ACFS persistent logging configuration settings.
Syntax and Description
acfsutil plogconfig [-h] [-d persistent_log_directory] [-t] [-q ] [-i seconds] [-s buffer_size] [-l low_water_percent] [-u high_water_percent] [-m max_logfile_size] [-n max_logfile_number] [-w]
acfsutil
-h
plogconfig
displays help and exits.
For information about running Oracle ACFS acfsutil
commands, refer to About Using Oracle ACFS Command-Line Tools.
The following table contains the options available with the acfsutil
plogconfig
command.
Table 6-16 Options for the acfsutil plogconfig command
Option | Description |
---|---|
|
Specifies an alternative logging directory. If not specified, the default directory is |
|
Terminates logging. |
|
Queries for and then displays the persistent logging configuration settings. |
|
Specifies the number of seconds for the interval timer. |
|
Sets the log buffer size in kilobytes. |
|
Sets the file write trigger as a percentage. |
|
Sets the file write throttle as a percentage. |
|
Sets the maximum log file size in megabytes. |
|
Sets the maximum number of log files. |
|
Reports if the ACFS persistent logs have wrapped. |
The acfsutil
plogconfig
command provides a diagnostic tool to manage configuration settings for persistent logging.
All command arguments are optional, but at least one argument must be specified.
Note:
Run the acfsutil
plogconfig
command only when Oracle Support requests configuration of persistent logging settings.
You must be the root
user or an Oracle ASM administrator user to run this command.
Examples
The following example illustrates the use of the acfsutil
plogconfig
command to display the current configuration settings.
Example 6-8 Using the Oracle ACFS acfsutil plogconfig command
# /sbin/acfsutil plogconfig -q Log Directory Name : /oracle/crsdata/my_host/acfs Buffer Size (KB) : 64 Low Water Level (percent) : 50 High Water Level (percent) : 75 Timer Interval (Seconds) : 5 Maximum Number of Log Files : 10 Maximum Log File Size (MB) : 100
acfsutil tune
Purpose
The acfsutil
tune
command displays or sets the value of Oracle ACFS tunable parameters.
Syntax and Description
acfsutil tune -h acfsutil tune [tunable_name] acfsutil tune tunable_name=value
acfsutil
tune
-h
displays help text and exits.
The following table contains the options available with the acfsutil
tune
command.
Table 6-17 Options for the acfsutil tune command
Option | Description |
---|---|
|
Specifies the name of the tunable parameter. |
|
Specifies the value for a tunable parameter. |
If a tunable parameter and value are specified, the acfsutil
tune
command sets the value of the tunable parameter in a persistent manner on a particular node.
If a tunable parameter is specified without a value, the acfsutil
tune
command displays the value that is currently assigned to the specified tunable parameter.
If no options are specified, the acfsutil
tune
command displays the tunable parameter values that are currently assigned.
The Oracle ACFS tunable parameter AcfsMaxOpenFiles
limits the number of open Oracle ACFS files on AIX. Normally you do not have to change the value of this tunable parameter; however, you may want to consider increasing the value if you have a large working set of files in your Oracle ACFS file systems.
The Oracle ACFS tunable parameter AcfsMaxCachedFiles
sets the maximum number of closed files that remain cached in memory on AIX. Normally you do not have to change value of this tunable parameter; however, you many to consider changing the value to get better performance.
Changing a tunable parameter has an immediate effect and persists across restarts.
You must be a root user to change the value of a tunable parameter.
Examples
The first command displays Oracle ACFS tunable parameters with their values. The second command changes the value of the AcfsHMTimeOutIntervalSecs
parameter.
Example 6-9 Using the acfsutil tune command
$ /sbin/acfsutil tune AcfsHMTimeOutIntervalSecs = 60 (0x3c) AcfsHMSilenceIntervalMins = 240 (0xf0) # /sbin/acfsutil tune AcfsHMTimeOutIntervalSecs=120
advmutil tune
Purpose
advmutil
tune
displays or sets the value of an Oracle ADVM parameter.
Syntax and Description
advmutil -h advmutil tune [parameter] advmutil tune parameter=value
advmutil
-h
displays help text and exits.
The following table contains the options available with the advmutil
tune
command.
Table 6-18 Options for the advmutil tune command
Option | Description |
---|---|
|
Specifies the parameter for which you want to set or display the value. |
|
Specifies the value of the specified parameter. |
If no options are specified, the advmutil
tune
command displays the parameter values that are currently assigned.
If a parameter is specified without a value, the advmutil
tune
command displays the value that is currently assigned to the specified parameter.
You must be a privileged user to set a parameter.
Note:
Parameters should be set with caution and usually only by Oracle Support Services.
Examples
A parameter that can be specified with advmutil
tune
is the maximum time in minutes for the deadlock timer (deadlock_timer
). The first command in the example changes the maximum time in minutes for the deadlock_timer
parameter. The second command displays the current settings of the Oracle ADVM parameters.
Example 6-10 Using advmutil tune
$ /sbin/advmutil tune deadlock_timer=20 $ /sbin/advmutil tune deadlock_timer = 20 (0x14) resilver_power = 8 (0x8) resilver_regio = 32 (0x20)