fsck

Purpose

Checks and repairs an Oracle ACFS file system on the AIX operating system.

Syntax and Description

fsck -V acfs [-n|-y] [-o options] volume_device

Table 16-12 contains the options available with the AIX fsck command.


Table 16-12 Options for the AIX fsck command

Option Description

-V acfs

Specifies an Oracle ADVM volume on AIX. acfs designates the Oracle ACFS type.

-n

Answers no to any prompts.

-y

Answers yes to any prompts.

-o options

Specifies that options follow (a, f, v). Options are preceded with the -o flag and entered as a comma-delimited string. For example: -o a,v

  • a

    Specifies to automatically fix the file system.

  • f

    Forces the file system into mountable state without completing a file system check or fix.

  • v

    Specifies verbose mode. The progress is displayed as the operation occurs. Running in verbose mode can impact performance.

volume_device

Specifies the primary Oracle ADVM volume device.


fsck checks and repairs an existing Oracle ACFS. This command can only be run on a dismounted file system. root privileges are required to run fsck. The Oracle ACFS driver must be loaded for fsck to work.

By default, fsck only checks for and reports any errors. The -a flag must be specified to instruct fsck to fix errors in the file system. Do not interrupt fsck during the repair operation.

In a few cases, fsck prompts for questions before proceeding to check a file system. These cases include:

  • If fsck detects that another fsck is in progress on the file system

  • If fsck detects that the Oracle ACFS driver is not loaded

  • If the file system does not appear to be Oracle ACFS

In checking mode, fsck also prompts if there are transaction logs that have not been processed completely due to an incomplete shutdown. To run in a non-interactive mode, include either the -y or -n options to answer yes or no to any questions.

fsck creates working files before it checks a file system. These working files are created in /usr/tmp if space is available. /tmp is used if /usr/tmp does not exist. If insufficient space is available in the tmp directory, fsck attempts to write to the current working directory. The files that fsck creates are roughly the size of the file system being checked divided by 32K. At most three such files are allocated. For example, a 2 GB file system being checked causes fsck to generate one to three 64K working files in the /usr/tmp directory. These files are deleted after fsck has finished.

In the event that fsck finds a file or directory in the file system for which it cannot determine its name or intended location (possibly due to a corruption in its parent directory), it places this object in the /lost+found directory when fsck is run in fix mode. For security reasons only the root user on Linux can read files in /lost+found. If the administrator can later determine the original name and location of the file based on its contents, the file can be moved or copied into its intended location.

The file names in the /lost+found directory are in the following formats:

parent.id.file.id.time-in-sec-since-1970
parent.id.dir.id.time-in-sec-since-1970

The id fields are the internal Oracle ACFS numeric identifiers for each file and directory in the file system.

You can use acfsutil info id id mount_point to attempt to determine the directory associated with parent.id. This directory is assumed to be where the deleted object originated. For information about acfsutil info, see "acfsutil info file".

If the parent directory is not known, the parent id field is set to UNKNOWN.

Note:

It is not possible to see the contents of the /lost+found directory from a snapshot.

Examples

The following example shows how to check and repair an Oracle ACFS file system.

Example 16-9 Using the fsck command

# /usr/sbin/fsck -V acfs -y -o a /dev/asm/volume1-123