Skip Headers
Oracle® Database Storage Administrator's Guide
11g Release 2 (11.2)

Part Number E10500-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

13 Oracle ACFS Command-Line Tools

Command-line tools for managing and implementing Oracle Automatic Storage Management Cluster File System (Oracle ACFS), include the following:

Basic Steps to Manage an Oracle ACFS

This section provides an outline of the basic steps when managing an Oracle ACFS using command-line utilities.

The examples in this section show operating system commands that are run in a Linux environment system. ASMCMD commands are used to manage the volumes, but SQL*PLus, Oracle ASM Configuration Assistant (ASMCA), and Oracle Enterprise Manager can also be used to manage volumes.

This section contains these topics:

Creating an Oracle ACFS File System

To create and verify a file system, perform the following steps:

  1. Create an Oracle ASM volume in a mounted disk group with the ASMCMD volcreate command.

    The compatibility parameters COMPATIBLE.ASM and COMPATIBLE.ADVM must be set to 11.2 or higher for the disk group. See "Disk Group Compatibility Attributes".

    Start ASMCMD connected to the Oracle ASM instance. You must be a user in the OSASM operating system group. See "About Privileges for Oracle ASM".

    When configuring Oracle ADVM volume devices within a disk group, Oracle recommends assigning the Oracle grid infrastructure user and Oracle ASM administrator roles to users who have root privileges.

    To create a volume:

    ASMCMD [+] > volcreate -G data -s 10G volume1
    

    The volume name must be less than or equal to eleven alphanumeric characters, starting with an alphabetic character.

    When creating an Oracle ASM volume, a volume device name is created that includes a unique Oracle ADVM persistent disk group number. The volume device file can be used in the same manner as any other disk or logical volume to mount file systems or for applications to use directly.

    For information about the volcreate command, see "volcreate".

  2. Determine the device name of the volume that was created.

    You can determine the volume device name with the ASMCMD volinfo command or from the VOLUME_DEVICE column in the V$ASM_VOLUME view.

    For example:

    ASMCMD [+] > volinfo -G data volume1
    Diskgroup Name: DATA
    
             Volume Name: VOLUME1
             Volume Device: /dev/asm/volume1-123
             State: ENABLED
         ... 
    
    SQL> SELECT volume_name, volume_device FROM V$ASM_VOLUME 
         WHERE volume_name ='VOLUME1';
    
    VOLUME_NAME        VOLUME_DEVICE
    -----------------  --------------------------------------
    VOLUME1            /dev/asm/volume1-123
    

    For information about the volinfo command, see "volinfo".

    See Also:

    Oracle Database Reference for information about the V$ASM_VOLUME view
  3. Create a file system with the Oracle ACFS mkfs command.

    Create a file system using an existing volume device.

    For example:

    $ /sbin/mkfs -t acfs /dev/asm/volume1-123
    
    mkfs.acfs: version                   = 11.2.0.1.0.0
    mkfs.acfs: on-disk version           = 39.0
    mkfs.acfs: volume                    = /dev/asm/volume1-123
    mkfs.acfs: volume size               = 10737418240
    mkfs.acfs: Format complete.
    

    See "mkfs" (Linux or UNIX) or "acfsformat" (Windows). The root privilege is not required. The ownership of the volume device file dictates who can run this command.

  4. Register the file system with the acfsutil registry command.

    For example:

    $ /sbin/acfsutil registry -a /dev/asm/volume1-123 /u01/app/acfsmounts/myacfs
    
    acfsutil registry: mount point /u01/app/acfsmounts/myacfs successfully added 
      to Oracle Registry
    

    See "acfsutil registry". The root or asmadmin privileges are required to modify the registry. The Windows Administrator privilege is equivalent to the root privilege on Linux.

    Registering a file system is optional. After registering an Oracle ACFS file system in the cluster mount registry, the file system is mounted automatically on each cluster member listed in the registry entry during the next registry check action. This automatic process runs every 30 seconds and eliminates the requirement to manually mount the file system on each member of the cluster.

    Registering an Oracle ACFS file system also causes the file system to be mounted automatically whenever Oracle Clusterware or the system is restarted.

    Note:

    In an Oracle grid infrastructure Clusterware configuration, you can run srvctl add filesystem to automount a file system; this method is required when an Oracle Database home is installed on an Oracle ACFS file system. However, that file system should not be added to the registry. For information about Server Control Utility (SRVCTL), see Oracle Real Application Clusters Administration and Deployment Guide.

    For more information, see "About the Oracle ACFS Mount Registry".

    Note:

    A file system is not automatically mounted for an Oracle Restart configuration, which is a single-instance (non-clustered) environment.
  5. Mount the file system with the Oracle ACFS mount command. You can mount a file system before or after registering the file system. If the file system has been registered, you can wait for the file system to be mounted automatically.

    For example:

    # /bin/mount -t acfs /dev/asm/volume1-123 /u01/app/acfsmounts/myacfs
    

    See "mount" (Linux or UNIX) or "acfsmountvol" (Windows). The root privilege is required run the mount command and the Windows Administrator privilege is required to run the acfsmountvol command.

    After the file system has been mounted, ensure that the permissions are set to allow access to the file system for the appropriate users. For example:

    # chown -R oracle:dba /u01/app/acfsmounts/myacfs
    
  6. Create a test file in the file system.

    The user that creates the test file should be a user that is intended to access the file system. This test ensures that the appropriate user can write to the file system.

    For example:

    $ echo "Oracle ACFS File System" > /u01/app/acfsmounts/myacfs/myfile
    
  7. List the contents of the test file that was created in the file system.

    For example:

    $ cat /u01/app/acfsmounts/myacfs/myfile
    Oracle ACFS File System
    

Accessing an Oracle ACFS File System on a Different Node in the Cluster

If the node is part of a cluster system, perform the following steps on node 2 to view the test file you created on node 1.

Note:

If the file system has been registered with the Oracle ACFS mount registry, you can skip steps 1 to 3.
  1. Enable the volume that was previously created and enabled on node 1.

    Start ASMCMD connected to the Oracle ASM instance. You must be a user in the OSASM operating system group. See "About Privileges for Oracle ASM".

    For example:

    ASMCMD [+] > volenable -G data volume1
    

    See "volenable".

  2. View information about the volume that you created on node 1.

    For example:

    ASMCMD [+] > volinfo -G data volume1
    

    See "volinfo".

  3. Mount the file system using the Oracle ACFS mount command.

    For example:

    # /bin/mount -t acfs /dev/asm/volume1-123 /u01/app/acfsmounts/myacfs
    

    See "mount" (Linux or UNIX) or "acfsmountvol" (Windows). The root privilege is required run the mount command and the Windows Administrator privilege is required to run the acfsmountvol command.

    After the file system has been mounted, ensure that the permissions are set to allow access for the appropriate users.

  4. List the contents of the test file you previously created on the file system.

    For example:

    $ cat /u01/app/acfsmounts/myacfs/myfile
    Oracle ACFS File System
    

    The contents should match the file created previously on node 1.

Managing Oracle ACFS Snapshots

To create and verify a snapshot on node 1:

  1. Create snapshot of the new file system created on node 1.

    For example:

    $ /sbin/acfsutil snap create mysnapshot_20090725 /u01/app/acfsmounts/myacfs
    

    See "acfsutil snap create".

  2. Update the test file in the file system so that it is different than the snapshot.

    For example:

    $ echo "Modifying a file in Oracle ACFS File System" > /u01/app/acfsmounts/myacfs/myfile
    
  3. List the contents of the test file and the snapshot view of the test file.

    For example:

    $ cat /u01/app/acfsmounts/myacfs/myfile
    
    $ cat /u01/app/acfsmounts/myacfs/.ACFS/snaps/mysnapshot_20090725/myfile
    

    The contents of the test file and snapshot should be different. If node 1 is in a cluster, then you can perform the same list operation on node 2.

To manage snapshots with Oracle Enterprise Manager, see "Managing Oracle ACFS Snapshots with Oracle Enterprise Manager".

Deregistering, Dismounting, and Disabling Volumes and Oracle ACFS File Systems

This sections discusses the operations to deregister or dismount a file system and disable a volume. This section contains these topics:

Deregistering an Oracle ACFS File System

You can deregister an Oracle ACFS file system if you do not want the file system to be automatically mounted.

For example:

$ /sbin/acfsutil registry -d /u01/app/acfsmounts/myacfs

If you deregister a file system, then you must explicitly mount the file system after Oracle Clusterware or the system is restarted.

For more information about the registry, see "About the Oracle ACFS Mount Registry". For information about acfsutil registry, see "acfsutil registry".

Dismounting an Oracle ACFS File System

You can dismount a file system without deregistering the file system or disabling the volume on which the file system is mounted.

For example, you can dismount a file system and run fsck to check the file system.

# /bin/umount /u01/app/acfsmounts/myacfs

# /sbin/fsck -a -v -y -t acfs /dev/asm/volume1-123

After you dismount a file system, you must explicitly mount the file system.

Use umount on Linux systems or acfsdismount on Windows systems. For information about the commands to dismount a file system, see "umount" or "acfsdismount".

Use fsck on Linux systems or acfschkdsk on Windows systems to check a file system. For information about the commands to check a file system, see "fsck" or "acfschkdsk".

Disabling a Volume

To disable a volume, you must first dismount the file system on which the volume is mounted.

For example:

# /bin/umount /u01/app/acfsmounts/myacfs

After a file system is dismounted, you can disable the volume and remove the volume device file.

For example:

ASMCMD> voldisable -G data volume1

Dismounting the file system and disabling a volume does not destroy data in the file system. You can enable the volume and mount the file system to access the existing data. For information about voldisable and volenable, see "voldisable" and "volenable".

Removing an Oracle ACFS File System and a Volume

To permanently remove a volume and Oracle ACFS file system, perform the following steps. These steps destroy the data in the file system.

  1. Deregister the file system with acfsutil registry -d.

    For example:

    $ /sbin/acfsutil registry -d /oracle/acfsmounts/acfs1
    acfsutil registry: successfully removed ACFS mount point
       /oracle/acfsmounts/acfs1 from Oracle Registry
    

    For information about running acfsutil registry, see "acfsutil registry".

  2. Dismount the file system.

    For example:

    # /bin/umount /oracle/acfsmounts/acfs1
    

    You must dismount the file system on all nodes of a cluster.

    Use umount on Linux systems or acfsdismount on Windows systems. For information about running umount or acfsdismount, see "umount" or "acfsdismount".

  3. Remove the file system with acfsutil rmfs.

    If you were not planning to remove the volume in a later step, this step is necessary to remove the file system. Otherwise, the file system is removed when the volume is deleted.

    For example:

    $ /sbin/acfsutil rmfs /dev/asm/volume1-123
    

    For information about running acfsutil rmfs, see "acfsutil rmfs".

  4. Optionally you can disable the volume with the ASMCMD voldisable command.

    For example:

    ASMCMD> voldisable -G data volume1
    

    For information about running voldisable, see "voldisable".

  5. Delete the volume with the ASMCMD voldelete command.

    For example:

    ASMCMD> voldelete -G data volume1
    

    For information about running voldelete, see "voldelete".

Oracle ACFS Command-line Tools for Linux and UNIX Environments

Table 13-1 contains a summary of the Oracle ACFS commands for Linux and UNIX.

Table 13-1 Summary of ACFS Commands for Linux and UNIX

Command Description

fsck

Checks and repairs an Oracle ACFS file system.

mkfs

Creates an Oracle ACFS file system.

mount

Mounts an Oracle ACFS file system.

umount

Dismounts an Oracle ACFS file system.


The commands in Table 13-1 have been extended with additional options to support Oracle ACFS. All other Linux and UNIX file system commands operate without change for Oracle ACFS.

For example, Oracle ACFS adds a set of Oracle ACFS-specific mount options to those provided with the base operating system platform. You should review both the mount options for the Linux and UNIX platforms in addition to the Oracle ACFS-specific options for the complete set of file system mount options.

File systems on Oracle ADVM volumes that are not Oracle ACFS file systems, such as ext3, are managed with the same Linux commands that are listed in Table 13-1 using the file-specific options for the type of file system. You can refer to the man pages for options available for the Linux commands in Table 13-1.

fsck

Purpose

Checks and repairs an Oracle ACFS file system.

Syntax and Description


fsck [-h]
fsck [-a|-f] [-v] -t acfs [-n|-y] volume_device

Table 13-2 contains the options available with the fsck command.

Table 13-2 Options for the fsck command

Option Description

-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.

-h

Displays the usage help text and exits.

-n

Answers no to any prompts.

-y

Answers yes to any prompts.

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.

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 unclean 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 two such files are allocated. For example, a 2 GB file system being checked causes fsck to generate one or two 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".

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 13-1 Using fsck

# /sbin/fsck -a -v -y -t acfs /dev/asm/volume1-123

mkfs

Purpose

Creates an Oracle ACFS file system.

Syntax and Description


mkfs [-h]
mkfs [-v] [-f]-t acfs [-b blocksize] [-n name ] volume_device [blocks]

Table 13-3 contains the options available with the mkfs command.

Table 13-3 Options for the mkfs command

Option Description

-t acfs

Specifies the type of file system on Linux. acfs designates the Oracle ACFS type.

-v

Specifies verbose mode. The progress is displayed as the operation occurs.

-n name

Specifies the name for the file system. A name can be a maximum of 64 characters. acfsutil info fs returns the name if one was specified.

-f

Specifies the force option. This action creates the file system even if there is an existing Oracle ACFS on the volume device, although only if the file system is dismounted. This option overwrites structures on the original file system. Use this option with caution.

-h

Displays the usage help text and exits.

-b blocksize

The default block size is 4K and this is the only size supported in 11g Release 2 (11.2).

blocks

Specifies the number of blocks that the file system should consume on the named device. The quantity specified can be in units of K (kilobytes), M (megabytes), G (gigabytes), or T (terabytes). If a unit is not specified, the default is bytes. If number of blocks specified is not a multiple of the block size, than the value is rounded up to the closest multiple. If this option is not specified, the entire device is consumed.

volume_device

Specifies an Oracle ADVM device file that is to be formatted.


mkfs is used to create the on-disk structure needed for Oracle ACFS file system to be mounted. The mkfs command is the traditional UNIX command used to build a file system. After mkfs executes successfully, the USAGE column in the V$ASM_VOLUME view displays ACFS. root privilege is not required. The ownership of the volume device file dictates who can run this command. The minimum file system size is 200 MB. The Oracle ACFS driver must be loaded for mkfs to work.

Examples

Before creating an Oracle ACFS file system, first determine which Oracle ADVM volume devices are available. You can use the ASMCMD volinfo command to display information about the volumes and volume devices.

ASMCMD [+] > volinfo -a
...
         Volume Name: VOLUME1
         Volume Device: /dev/asm/volume1-123
         State: ENABLED
... 

See "volinfo".

Next create an Oracle ACFS file system on the volume device file.

Example 13-2 Using mkfs

$ /sbin/mkfs -t acfs /dev/asm/volume1-123

mount

Purpose

Mounts an Oracle ACFS file system.

Syntax and Description


mount [-h]
mount [-v] -t acfs [-o options] volume_device dir
mount

Table 13-4 contains the options available with the mount command.

Table 13-4 Options for the mount command

Option Description

-h

Displays the usage help text and exits.

-t acfs

Specifies the type of file system on Linux. acfs designates the Oracle ACFS type.

-v

Specifies verbose mode. The progress is displayed as the operation occurs.

-o

Options are specified with the -o flag followed by a comma separated string of options. The following options are available:

  • all

    Reads the Oracle ACFS mount registry created with the acfsutil registry command and mounts the file systems in it. A mount -t acfs -o all command is automatically executed at Oracle ACFS startup.

    When the -o all option is specified, other -o options are ignored. To specify mount options for a registry entry, include those options with the acfsutil registry command when you add the entry to the registry.

  • ro

    Mounts the file system in read-only mode.

  • norootsuid

    Fails the execution of binaries by non-root users whose permissions allow set user Id execution, and are owned by root. An attempt to run these executables as a non-root user fails with a permission denied error.

  • rootsuid

    Allows the execution of binaries by non-root users of set user Id files owned by root. This is the default action.

volume_device

Specifies an Oracle ADVM volume device file that has been formatted by mkfs. device is required but can be a dummy value.

dir

Specifies the directory on which this file system gets mounted. This directory must exist before you issue the mount command. The directory is also known as the file system mount point. The dir directory refers to the root of the file system on the device. dir is required but can be a dummy value.


mount is used to attach a file system to the Oracle ACFS hierarchy at the dir mount point that is the path name of a directory. The mount happens on the node where the mount command was issued. The mount command returns an error if the file system is not in a dismounted state on this node.

It is not always possible to return the cause of a mount failure to the mount command. When this happens Oracle ACFS writes the cause of the failure to the system console and associated system log file.

After mount executes successfully, the MOUNTPATH field in the V$ASM_VOLUME view displays the directory name on which the file system is now mounted.

The mount command lists all mounted file systems if it is invoked with no parameters.

root privilege is required to run mount.

Examples

The first example shows how to mount volume1-123 on the mount point /u01/app/acfsmounts/myacfs. The second example shows how to mount all the registered Oracle ACFS file systems. The dummy names (none) have been entered for the device and directory as they are required, but not used, when the all option is specified.

Example 13-3 Using mount

# /bin/mount -t acfs /dev/asm/volume1-123 /u01/app/acfsmounts/myacfs

# /bin/mount -t acfs -o all none none

umount

Purpose

Dismounts an Oracle ACFS file system.

Syntax and Description


umount [-h]
umount [-v] volume_device |dir
umount -a [-t acfs]

Table 13-5 contains the options available with the umount command.

Table 13-5 Options for the umount command

Option Description

-h

Displays the usage help text and exits.

-t acfs

Specifies the type of file system on Linux. acfs designates the Oracle ACFS type.

-v

Specifies verbose mode. The progress is displayed as the operation occurs.

-a

Specifies to dismount all Oracle ACFS file systems on this node.

volume_device

Specifies an Oracle ADVM volume device file that has been formatted by mkfs.

dir

Specifies the directory on which this file system gets mounted. This directory must exist before you issue the mount command. The director is also known as the file system mount point. The dir directory refers to the root of the file system on the device.


umount detaches an Oracle ACFS from the file system hierarchy on the current node. If the file system is busy, umount fails.

root privileges are required to run the umount command.

Examples

The following examples show how to dismount an Oracle ACFS file system. The first example uses the volume device file and the second example uses the file system.

Example 13-4 Using umount

# /bin/umount /dev/asm/volume1-123

# /bin/umount /u01/app/acfsmounts/myacfs

Oracle ACFS Command-line Tools for Windows Environments

Table 13-6 contains a summary of the Oracle ACFS file system commands for Windows. These commands have been extended to support Oracle ACFS. All other Windows file system commands operate without change for Oracle ACFS.

Table 13-6 Summary of ACFS File System Commands for Windows

Command Description

acfschkdsk

Checks and repairs an Oracle ACFS file system.

acfsdismount

Dismounts an Oracle ACFS and removes its name space attachment.

acfsformat

Creates an Oracle ACFS file system.

acfsmountvol

Mounts an Oracle ACFS file system.

acfsutil detach

Prepares the Oracle ACFS driver for module unload.


Table 13-7 contains a summary of the non-Oracle ACFS file system commands for Windows.

Table 13-7 Summary of Non-ACFS File System Commands for Windows

Command Description

advmutil dismount

Dismounts Oracle ASM volume devices for file systems that are not Oracle ACFS.

advmutil list

Lists Oracle ASM volume devices for file systems that are not Oracle ACFS.

advmutil mount

Mounts Oracle ASM volume devices for file systems that are not Oracle ACFS.


acfschkdsk

Purpose

Checks and repairs an Oracle ACFS file system.

Syntax and Description


acfschkdsk [/h]
acfschkdsk [/a|/f] [/v] [/n|/y] volume_device

Table 13-8 contains the options available with the acfschkdsk command.

Table 13-8 Options for the acfschkdsk command

Option Description

/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.

/h

Displays the usage help text and exits.

/n

Answers no to any prompts.

/y

Answers yes to any prompts.

volume_device

Specifies the Oracle ADVM volume device.


acfschkdsk checks and repairs an existing Oracle ACFS. This command can only be run on a file system that has been dismounted clusterwide.

The Oracle ACFS driver must be loaded for acfschkdsk to work. If the driver is not loaded, the administrator is prompted to ensure this is intentional. For information about loading drivers, see "Oracle ACFS Drivers Resource Management".

The Oracle ACFS driver normally ensures that acfschkdsk is the only user of the file system clusterwide. In extreme cases it may be necessary to fix a file system without loading the driver if the file system automount causes the system to fail. The verifications that are normally done by the driver for exclusive access are bypassed in this case.

By default acfschkdsk only checks for and only reports any errors. The /a flag must be specified to instruct acfschkdsk to fix errors in the file system.

In a few cases, acfschkdsk prompts for questions before proceeding to check a file system. For example, if acfschkdsk detects that another acfschkdsk is in progress on the file system, or if acfschkdsk detects that the Oracle ACFS driver is not loaded, or if the file system does not appear to be Oracle ACFS. In checking mode, acfschkdsk also prompts if there are transaction logs that have not been processed completely due to an unclean shutdown. To run in a non-interactive mode, include either the /y or /n options to answer yes or no to any questions.

acfschkdsk creates working files before it checks a file system. These working files are created in the temp directory if space is available. If insufficient space is available acfschkdsk attempts to write in the current working directory. The files acfschkdsk creates are roughly the size of the file system being checked divided by 32K. At most two files are allocated. These files are deleted when acfschkdsk has finished.

In the event that acfschkdsk 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 acfschkdsk is run in fix mode. For security reasons only the Windows Administrator 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".

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 an Oracle ACFS file system on Windows.

Example 13-5 Using acfschkdsk

C:\> acfschkdsk asm-volume1-123

acfsdismount

Purpose

Dismounts an Oracle ACFS file system and removes its mount point path (name space attachment).

Syntax and Description


acfsdismount [/h]
acfsdismount [/v] {drive_letter | path}
acfsdismount [/v] /all

Table 13-9 contains the options available with the acfsdismount command.

Table 13-9 Options for the acfsdismount command

Option Description

/v

Specifies verbose mode. The progress is displayed as the operation occurs.

/h

Displays help text and exits.

/all

Specifies to dismount all Oracle ACFSs on this node.

drive_letter

Specifies the drive letter followed by a colon.

path

Specifies the full path of the mount point including the drive letter.


acfsdismount removes the mount point path (name space attachment) for the specified file system on the current node and dismounts the file system if it is mounted. When the file system is in the dismounted state, the data is preserved on the device and the file system can be re-mounted with the acfsmountvol command.

Windows Administrator privileges are required to use the acfsdismount command.

Examples

The following examples show how to dismount an Oracle ACFS file system. The first example dismounts a file system using only the drive letter. The second example dismounts a file system using the full path and enables the verbose mode.

Example 13-6 Using acfsdismount

C:\> acfsdismount O:

C:\> acfsdismount /v O:\mnt\

acfsformat

Purpose

Creates an Oracle ACFS file system.

Syntax and Description


acfsformat [/h]
acfsformat [/v] [/f] [/b blocksize] [/n name] volume_device [blocks]

Table 13-10 contains the options available with the acfsformat command.

Table 13-10 Options for the acfsformat command

Option Description

/v

Specifies verbose mode. The progress is displayed as the operation occurs.

/n name

Specifies the name for the file system. This is also known as a volume label. acfsutil info fs returns the name if one was specified. This can also be displayed from the VOL_LABEL column in the V$ASM_ACFSVOLUMES view.

/f

Specifies the force option. This action creates the file system even if there is an existing Oracle ACFS on the device, although only if the file system is dismounted. This option overwrites structures on the original file system. Use this option with caution.

/h

Displays the usage help text.

/b blocksize

The default block size is 4K and this is the only size supported in 11g Release 2 (11.2).

blocks

Specifies the number of blocks that the file system should consume on the named device. The quantity specified can be in units of K (kilobytes), M (megabytes), G (gigabytes), or T (terabytes). If a unit is not specified, the default is bytes. If number of blocks specified is not a multiple of the block size, than the value is rounded up to the closest multiple. If this option is not specified, the entire device is consumed.

volume_device

Specifies an Oracle ADVM device file to be formatted.


acfsformat creates the on-disk structure needed for Oracle ACFS to be mounted. acfsformat performs a quick format on the target volume. After acfsformat executes successfully, the USAGE column in the V$ASM_VOLUME view displays ACFS.

Windows Administrator privileges are not required to use this command. The minimum file system size is 200 MB. The Oracle ACFS driver must be loaded for acfsformat to work.

Examples

This example shows how to create an Oracle ACFS file system.

Example 13-7 Using acfsformat

C:\> acfsformat asm-volume1-123

acfsmountvol

Purpose

Mounts an Oracle ACFS file system.

Syntax and Description


acfsmountvol /h
acfsmountvol [/v] /all
acfsmountvol [/v] { drive_letter |path } volume_device

Table 13-11 contains the options available with the acfsmountvol command.

Table 13-11 Options for the acfsmountvol command

Option Description

/v

Specifies verbose mode. The progress is displayed as the operation occurs.

/h

Displays the help usage text and exits.

/all

Reads the ACFS mount registry created with acfsutil registry and mounts the file systems listed in it on this node.

drive_letter

The Windows drive letter to link to an Oracle ADVM volume device.

path

Specifies the full path of the mount point including the drive letter.

volume_device

Specifies an Oracle ADVM volume device file that has been formatted by acfsformat.


acfsmountvol is used to attach an Oracle ACFS to the file system hierarchy at the specified path or drive letter. path must be an empty directory. Oracle ACFS mount points can be created on any empty directory and they can be hierarchical (nested).

After acfsmountvol executes successfully, the MOUNTPATH column in the V$ASM_VOLUME view displays the path or drive letter on which the file system is now mounted. If no arguments are specified, the command lists all mounted Oracle ACFSs on this node.

It is not always possible to return the cause of a mount failure to the acfsmountvol command. When this happens Oracle ACFS writes the cause of the failure to the Windows system event logger.

Windows Administrator privileges are required to mount an Oracle ACFS.

Examples

The first example shows how to mount asm-volume1-123 on the mount point identified as the F: drive. The second example shows how to mount asm-volume1-215 on the mount point G:\mnt\ and enables verbose mode.

Example 13-8 Using acfsmountvol

C:\> acfsmountvol  F:  asm-volume1-123

C:\> acfsmountvol /v  G:\mnt\  asm-volume1-215

acfsutil detach

Purpose

Prepares the Oracle ACFS driver for module unload.

Syntax and Description

acfsutil detach

acfsutil detach prepares Oracle ACFS for having its driver unloaded. Oracle ACFS registers itself as a base file system upon driver load. In order for the Windows service control manager to issue a stop command to the driver, Oracle ACFS must unregister itself as a base file system in addition to deleting any device objects associated with the driver.

After acfsutil detach has completed successfully, and all volumes have been dismounted, then the administrator can issue the Windows service control manager's stop command to the Oracle ACFS driver. If the acfsutil detach command is not used, then the stop command does not call the Oracle ACFS driver unload routine. This command can only be invoked by the Windows Administrator. It is called automatically by the Oracle ACFS shutdown scripts.

Examples

The following examples show how to detach all Oracle ACFS file systems and unload drivers on Windows. The first example dismounts all the Oracle ACFS file systems volume devices. The second example detaches the volume devices.

Example 13-9 Using acfsutil detach

C:\> acfsdismount /all

C:\> acfsutil detach

advmutil dismount

Purpose

The advmutil dismount command dismounts Oracle ADVM volume devices for file systems that are not Oracle ACFS.

Syntax and Description


advmutil dismount [/unregister] {drive_letter | path}
advmutil dismount [/unregister] [/all | /dg=disk_group]

Table 13-12 contains the options available with the Windows advmutil dismount command.

Table 13-12 Options for the advmutil dismount command

Option Description

drive_letter

Specifies the drive letter to dismount.

path

Specifies the full path of the mount point, including the drive letter, to dismount.

/all

Specifies to dismount all file systems on this node.

/unregister

Optional unregister from the system registry an Oracle ADVM volume device and its drive letter. Upon startup of the Oracle ASM instance and Oracle ACFS, the unregistered drive letter and Oracle ADVM volume symbolic links are not created.

/dg=disk_group

Optional name of the disk group containing the registered Oracle ADVM volume devices to create drive letters or possibly mount or dismount file systems.


Note:

To format an Oracle ADVM volume device with NTFS, it must be mounted on a drive letter. After formatting, Oracle ADVM volume devices with NTFS can be mounted on either a drive letter or a directory.

To successfully execute this command, the local Oracle ASM instance must be running and the disk groups required by this command must have been created and mounted in the Oracle ASM instance and volumes enabled.

Examples

These examples show how to dismount a file system that is not Oracle ACFS.

  1. The first example shows how to remove a drive letter for an Oracle ADVM volume device which disallows access to the file system.

  2. The second example shows how to remove a drive letter for an Oracle ADVM volume device which disallows access to the file system and removes it from the registry.

  3. The third example shows how to remove a drive letter for all registered Oracle ADVM volume devices which disallows access to all file systems.

  4. The fourth example shows how to remove a drive letter for all registered Oracle ADVM volume devices in a particular Oracle ASM disk group which disallows access to all related file systems.

Example 13-10 Using advmutil dismount

C:\> advmutil dismount H:

C:\> advmutil dismount H: /unregister

C:\> advmutil dismount /all

C:\> advmutil dismount /dg=data

advmutil list

Purpose

The advmutil list command lists the Oracle ADVM volume devices that were registered with advmutil mount /register.

Syntax and Description


advmutil list /registry

Table 13-13 contains the options available with the Windows advmutil list command.

Table 13-13 Options for the advmutil list command

Option Description

list /registry

Lists the drive letter and corresponding Oracle ADVM volume device name contained in the Windows registry.


To successfully execute this command, the local Oracle ASM instance must be running and the disk groups required by this command must have been created and mounted in the Oracle ASM instance and volumes enabled.

For information about listing Oracle ADVM volume devices for Oracle ACFS, see "acfsutil info".

Examples

The following example shows how to list all entries in the system registry.

Example 13-11 Using advmutil list

C:\> advmutil list /registry

  Drive Letter     Asm Volume
  ===================================
  H:               asm-volume1-123
  K:               asm-volume2-245

advmutil mount

Purpose

The advmutil mount command mounts Oracle ADVM volume devices for file systems that are not Oracle ACFS.

Syntax and Description


advmutil mount [/register] {drive_letter | path} volume_device
advmutil mount [/all | /dg=disk_group]

Table 13-14 contains the options available with the Windows advmutil mount command.

Table 13-14 Options for the advmutil mount command

Option Description

drive_letter

Specifies the drive letter to mount.

path

Specifies the full path of the mount point, including the drive letter, to mount.

volume_device

Indicates the Oracle ADVM volume device.

/all

Specifies to mount all non-Oracle ACFS file systems on this node.

/register

Optional register of an Oracle ADVM volume device and its drive letter in the Windows system registry. After startup of the Oracle ASM instance and Oracle ACFS, all registered drive letter and Oracle ADVM volume symbolic links are created. This allows for automatic file system mounting by Windows as is also done for Oracle ACFS file systems.

/dg=disk_group

Optional name of the disk group containing the registered Oracle ADVM volume devices to create drive letters or possibly mount or dismount file systems.


Note:

To format an Oracle ADVM volume device with NTFS, it must be mounted on a drive letter. After formatting, Oracle ADVM volume devices with NTFS can be mounted on either a drive letter or a directory.

To successfully execute this command, the local Oracle ASM instance must be running and the disk groups required by this command must have been created and mounted in the Oracle ASM instance and volumes enabled.

For information about registering Oracle ADVM volume devices for Oracle ACFS, see "acfsutil registry".

Examples

These examples show how to mount a file system that is not Oracle ACFS.

  1. The first example shows how to create a drive letter for an Oracle ASM volume device to be used for non-Oracle ACFS access which can then be used to format the volume possibly for use with NTFS.

  2. The second example shows how to create a drive letter for an Oracle ASM volume device to be used for non-Oracle ACFS access which can then be used to format the volume possibly for use with NTFS and save it in the Windows system registry.

  3. The third example shows how to create a drive letter for all Oracle ASM volume devices which were saved in the system registry which also allows a file system to be accessible.

  4. The fourth example shows how to create a drive letter for all Oracle ASM volume devices in a particular Oracle ASM disk group which were saved in the system registry which also allows a file system to be accessible.

Example 13-12 Using advmutil mount

C:\> advmutil mount H: asm-volume1-123

C:\> advmutil mount H: asm-volume1-123 /register

C:\> advmutil mount /all

C:\> advmutil mount /dg=data

Oracle ACFS Command-Line Tools for All Environments

Table 13-15 contains a summary of the Oracle ACFS commands for all environments. When the options are entered with commands on a Windows platform, use / instead of - with the option.

Table 13-15 Summary of ACFS Commands for All Environments

Command Description

acfsdbg

Debugs an Oracle ACFS file system.

acfsutil info

Displays various Oracle ACFS file system information.

acfsutil registry

Registers an Oracle ACFS file system with the Oracle ACFS mount registry.

acfsutil rmfs

Removes an Oracle ACFS file system.

acfsutil size

Resizes an Oracle ACFS file system.

acfsutil snap create

Creates a read-only snapshot of an Oracle ACFS file system.

acfsutil snap delete

Deletes a read-only snapshot of an Oracle ACFS file system.

acfsutil tune

Modifies or displays Oracle ACFS tuneables.

advmutil tune

Modifies or displays Oracle ADVM parameters.

advmutil volinfo

Displays information about Oracle ADVM volumes.


acfsdbg

Purpose

Debugs an Oracle ACFS file system.

Syntax and Description


acfsdbg [-h]
acfsdbg [-r] [-l] volume_device

Table 13-16 contains the options available with the acfsdbg command.

Table 13-16 Options for the acfsdbg command

Option Description

-h

Prints out the usage message which displays the various options that can be used when invoking the acfsdbg command, then exits.

-r

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, acfsdbg may not display the latest data as some of it is cached by the file system mounts.

-l

Processes kernel log files. The default is to not process the log files.

volume_device

Specifies the device name of the volume.


acfsdbg is an extension to fsck and acfschkdsk, and is an interactive program that can be used to view and modify on disk structures of the file system. This command should be used with caution by experienced development and support engineers to examine on disk structures to diagnose problems.

When acfsdbg is started, it displays a command prompt. At the command prompt, you can enter the subcommands listed in Table 13-17.

acfsdbg can also be used by scripts by echoing acfsdbg subcommands with a shell pipe to the acfsdbg binary.

By default the file system is not modified when running the tool. If the -l option is used, the file system metadata in the transaction logs is applied before the interactive disk block dump session. The volume device must specify a volume with a dismounted Oracle ACFS file system. If the volume device has a mounted Oracle ACFS file system, acfsdbg displays an error message and exits.

You must be the administrator or a member of the Oracle ASM administrator group to run acfsdbg.

Subcommands

Table 13-17 lists the subcommands of acfsdbg.

Table 13-17 Subcommands for acfsdbg

Option Description Syntax

calculate

Calculates simple 2+2 arithmetic expressions

Valid operators: + - * / % & | ^ ~ << >>

White space starts a new expression

0-1 represents a negative 1

calculate [-v] expr […]


-v Verbose mode
expr Simple 2+2 expression

cksum

Generates and replaces checksum in header

Header offset can be an expression as used by the calculate subcommand

White space starts a new header offset

Command is disabled in read-only mode

cksum [-C | -CE] header_offset […]


-C Regenerate for normal structure checksum
-CE Re-generate for Extent structure checksum
header_offset Offset of on-disk structure header. The value can be an expression as used by the calculate subcommand

close

Closes the open handle to the device

close

echo

Echoes text on command line to stdout

echo

fenum

Displays the specified File Entry TAble (FETA) entry

fenum [-f | -e | -d] FETA_entry_number


-f Displays all on-disk structures related to this structure.
-e Displays all on-disk extent information related to this structure.
-d Casts the structure as a directory and displays its contents.
FETA_entry_number The File Entry Table number used to identify a file on the file system.

help

Displays help message

help

offset

Displays structure at disk offset

offset [-c cast] [-f | -d] disk_offset


-f Displays all on-disk structures related to this structure.
-d Casts the structure as a directory and displays its contents.
disk_offset Disk offset to display. The value can be an expression as used by the calculate subcommand.

open

Opens a handle to a device. The default is the volume device name entered on the command line

open [volume_device]

primary

Sets the context of commands to the primary file system

primary

prompt

Sets the prompt to the specified string

prompt "prompt_string"

quit

Exits the acfsdbg debugger command

quit

read

Reads value from offset

The default size to read in is 8 bytes

The default count to read is 1

read [-1 | -2 | -4 | -8 | -s] [count] offset


-1 Read byte value
-2 Read 2 byte (short) value
-4 Read 4 byte (int) value
-8 Read 8 byte (long long) value
-s Read null- terminated string
count Number of values to read. If not specified, the default is 1
offset Disk offset to read. The value can be an expression as used by the calculate subcommand

snapshot

Sets the context of commands to the specified snapshot

snapshot snapshot_name

write

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 calculate subcommand

Numeric values can also be an expression as used by the calculate subcommand

This command is disabled in read-only mode

write [-1 | -2 | -4 | -8 | -c | -s] [-C | -CE] offset value


-1 Write byte value
-2 Write 2 byte (short) value
-4 Write 4 byte (int) value
-8 Write 8 byte (long long) value
-c Write text (no null termination). Enclose string in single-quotes (')
-s Write null-terminated string. Enclose string in quotes (")
-C Regenerate normal structure checksum
-CE Regenerate extent structure checksum
offset Disk offset to write. The value can be an expression used by the calculate subcommand
value The value to write. If numeric, the value can be an expression as used by the calculate subcommand

Examples

These examples show the use of the acfsdbg subcommands.

Example 13-13 Using acfsdbg

$ /sbin/acfsdbg /dev/asm/voume1-123
acfsdbg: version                   = 11.2.0.0.2.0
Oracle ASM Cluster File System (ACFS) On-Disk Structure Version: 38.0
The ACFS volume was created at  Mon Aug  2 14:57:45 2009
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 info

Purpose

Displays various Oracle ACFS file system information.

Syntax and Description


acfsutil info fs [-h ]
acfsutil info fs [-o item] [ path...]
acfsutil info file path
acfsutil info id num path

acfsutil info -h displays help text and exits.

Table 13-18 contains the options available with the acfsutil info command.

Table 13-18 Options for the acfsutil info command

Option Description

-o

Displays the specific file system item from the following list:

  • freespace - Amount of free space available in the file system

  • totalspace - Size of the file system

  • mountpoints - Mount point associated with path

  • volumes - Number of volumes associated with the file system

  • primaryvolume - Path name of the device associated with file system

  • available - Length of time the file system has been available

  • ismountpoint - 1 if path is the mount point, 0 if path is not a mount point

  • isavailable - 1 if the file system is available, 0 if file system is not available

  • iscorrupt - 1 if the file system is corrupt, 0 if file system is not corrupt

  • diskgroup - Name of the disk group associated with path

  • redundancy - Type of redundancy used by the Oracle ADVM volume

  • resizeincrement - Allocation unit size in megabytes of the Oracle ADVM volume used by path

  • stripewidth - Stripe width for the Oracle ADVM volume used by path

  • stripecolumns - Stripe set columns for the Oracle ADVM volume used by path

path

Specifies an existing directory folder where the mount point resides or a drive letter.

num

Specifies the Oracle ACFS file identifier number reported by the Oracle ACFS driver. The number should be specified in decimal format.


acfsutil info fs prints out basic information about Oracle ACFS such as the driver version number and detailed information about the specified mounted file system.

The file system information includes the volume device name, the size of the file system, the amount of space available on the volume device, the file system mount time on this node, the state of the file system, the user specified block size, the number of ACFS snapshots, the space consumed by snapshots in the file system, and the optional name or volume label associated with the file system. Any user can run acfsutil info fs.

Possible Oracle ACFS states include:

  • offline indicates that the underlying devices are not accessible, possibly due to an Oracle ASM instance failure, disk group forced dismount, or an irrecoverable I/O error. The file system on this node can only be dismounted. All other attempts at access result in errors.

  • available indicates that the file system is on line and operational

  • corrupt indicates that fsck or acfschkdsk should be run on the file system at the earliest possible convenience to correct a detected inconsistency

acfsutil info file displays information about an Oracle ACFS file such as its extent map which details the locations of the blocks comprising the file. It also displays information such as the used versus allocated storage for a file. You must have read access to the specified file to run acfsutil info file.

acfsutil info id is used to translate an internal numeric Oracle ACFS file identifier to a path name in the file system. This is useful when the Oracle ACFS driver reports I/O errors to the system event logger associated with a particular file in an Oracle ACFS and identifies it by its internal identifier. You must have administrator privileges or you must be a member of the Oracle ASM administrator group to run acfsutil info id.

Examples

The following are examples of the use of acfsutil info. The first example displays information about the specified file system. The second example checks whether the file system is corrupt.

Example 13-14 Using acfsutil info

$ /sbin/acfsutil info fs /u01/app/acfsmounts/myacfs
/u01/app/acfsmounts/myacfs
    ACFS Version: 11.2.0.1.0.0
    flags:        MountPoint,Available
    mount time:   Tue Jun 29 10:18:27 2009
    volumes:      1
    total size:   268435456
    total free:   163360768
    primary volume: /dev/asm/volume1-228
        label:                 
        flags:                 Primary,Available,ADVM
        on-disk version:       39.0
        allocation unit:       4096
        major, minor:          252, 116737
        size:                  268435456
        free:                  163360768
        ADVM diskgroup         DATA
        ADVM resize increment: 268435456
        ADVM redundancy:       mirror
        ADVM stripe columns:   4
        ADVM stripe width:     131072
    number of snapshots:  3
    snapshot space usage: 106496

$ /sbin/acfsutil info fs -o iscorrupt /u01/app/acfsmounts/myacfs
0

acfsutil registry

Purpose

Registers an Oracle ACFS file system with the Oracle ACFS mount registry.

Syntax and Description


acfsutil registry [-h]
acfsutil registry
acfsutil registry -a [-f] [-n { nodes|all } ] [-o moptions] device path
acfsutil registry -d {device | path}
acfsutil registry -l [device | path]
acfsutil registry -m device

acfsutil registry -h displays help text and exits.

Table 13-19 contains the options available with the acfsutil registry command.

Table 13-19 Options for the acfsutil registry command

Option Description

-a

Specifies to add the device, path, and associated moptions to the Oracle ACFS mount registry. The Oracle ASM volume device specified must exist on the local node to add the information to the mount registry.

The arguments represent all the information needed to mount the file system. At Oracle ACFS startup time these file systems are automatically mounted. On Windows the volume mount points on the specified directories are created if they do not exist.

Duplicate device entries are not allowed. Duplicate mount points are allowed but must be used with the -n option for disjoint node-specific mounts.

-d

Deletes the device or path from the Oracle ACFS mount registry. If a path is specified and it is not unique in the Oracle ACFS mount registry, the command fails and you must reissue the command specifying the device as an argument instead.

-f

This is used in combination with -a when the specified device might exist in the registry and the administrator wants to replace the registration.

-n

This is used in combination with -a and specifies an optional comma-delimited list of nodes, or the all keyword. This specifies which nodes should attempt to mount this device on the specified mount point. Host names should be specified. The all keyword is functionally equivalent to not specifying a list of nodes and indicates that the device should be mounted on all nodes. Mounting on all nodes is the default behavior.

-o moptions

Specifies the mount options to be used when mounting the file system. For Linux only. All options are available except the all option. See "mount".

-l

Lists all the mount points currently in the registry on a single line, with fields separated by a colon (:).

-m

List the registered mount point, if one exists, associated with the specified device.

path

Specifies an existing directory folder where the mount point resides or a drive letter.

device

Specifies an Oracle ACFS device file that has been formatted.


acfsutil registry adds or deletes a file system from the Oracle ACFS persistent mount registry. The mount registry is a global registry that is used at Oracle ACFS startup on each node to mount all file systems specified in it. root or asmadmin privileges are required to modify the registry. For information about operating system group privileges, see "About Privileges for Oracle ASM".

Any user is allowed to display the contents of the registry. To mount all the file systems in the Oracle ACFS mount registry, use the platform specific mount command with the all option. This is done automatically at Oracle ACFS startup on each node.

If no options are specified, the command displays all of the Oracle ACFS mounts in the registry.

See "About the Oracle ACFS Mount Registry".

Examples

The following examples show the use of acfsutil registry. The first example shows how to add the volume device file and file system mount point to the registry. The second example shows how to list the registered mount point associated with the specified volume device file. The third example shows how to delete the specified volume device file from the registry.

Example 13-15 Using acfsutil registry

$ /sbin/acfsutil registry -a /dev/asm/volume1-123 /u01/app/acfsmounts/myacfs

$ /sbin/acfsutil registry -m /dev/asm/volume1-123

$ /sbin/acfsutil registry -d /dev/asm/volume1-123

acfsutil rmfs

Purpose

Removes an Oracle ACFS file system.

Syntax and Description


acfsutil [-h]
acfsutil rmfs device

acfsutil rmfs -h displays help text and exits.

Table 13-20 contains the options available with the acfsutil rmfs command.

Table 13-20 Options for the acfsutil rmfs command

Option Description

device

Specifies an Oracle ACFS device file that has been formatted.


acfsutil rmfs is used to remove an Oracle ACFS that is dismounted. When the command is executed, the superblock of the file system is disabled. root or asmadmin privileges are required to run this command. For information about operating system group privileges, see "About Privileges for Oracle ASM".

After acfsutil rmfs executes successfully, the MOUNTPATH and USAGE columns in the V$ASM_VOLUME view are cleared for the device. The removed Oracle ACFS can be restored using fsck or acfschkdsk. The device can be reformatted with a new Oracle ACFS using the mkfs or acfsformat commands.

Examples

The following example shows the use of acfsutil rmfs to remove the specified volume device file and associated file system.

Example 13-16 Using acfsutil rmfs

$ /sbin/acfsutil rmfs /dev/asm/volume1-123

acfsutil size

Purpose

Resizes an Oracle ACFS file system.

Syntax and Description


acfsutil size [-h]
acfsutil size [+|-]n[K|M|G|T|P ] [device] path

acfsutil size -h displays help text and exits.

Table 13-21 contains the options available with the acfsutil size command.

Table 13-21 Options for the acfsutil size command

Option Description

[+|-]n

Specifies the new size for the Oracle ACFS file system where n is a valid positive whole number greater than zero. The number can be preceded by a + or - to indicate the amount to add or decrease. If no operand exists, the new size is the absolute size.

K|M|G|T|P

Specifies that the integer supplied for size is in the units of K (Kilobytes), M (Megabytes), G (Gigabytes), T (Terabytes), or P (Petabytes). If the unit indicator is specified, then it must be appended to the integer. If omitted, the default unit is bytes.

device

Specifies the optional volume device file.

path

Specifies an existing directory folder where the mount point resides or a drive letter.


acfsutil size grows or shrinks the mounted Oracle ACFS and its underlying Oracle ADVM storage to match the new size specified. This operation also resizes the underlying Oracle ASM Volume file to match the new length that is specified. The disk group must have enough free storage to accommodate any requested increase to the file system size.

Reducing a file system size returns unused storage space located at the end of the file system to the disk group. Shrinking in this release is intended for accidents when the wrong initial size or resize increment was specified, and before the storage was actually used. After storage has been used for user data or file system metadata, it may not be possible to shrink the file system, even if the files using that storage have been deleted.

Note:

Defragmenting a file system is not supported in this release; only unused storage can be deallocated from the end of the file system.

The size value is rounded up based on the block size of the file system and the allocation unit of the Oracle ASM volume device file. To determine the Oracle ASM volume device resize increment, examine the RESIZE_UNIT_MB field in the V$ASM_VOLUME view, or look for Resize Unit in the output of asmcmd volinfo.

There is a limit of 5 extents for the file system's internal storage bitmap. This cause any attempts to increase the file system to fail after it has been increased four or more times. When the limit on a file system expansion has been reached, running fsck or acfschkdsk with the -a option may consolidate the internal storage bitmap, allowing future file system expansion.

root or users who are members of the asmadmin group can issue this command. For information about operating system group privileges, see "About Privileges for Oracle ASM".

Examples

The following example shows the use of acfsutil size. This example increases the primary device file of /u01/app/acfsmounts/myacfs file system by 500 MB.

Example 13-17 Using acfsutil size

$ /sbin/acfsutil size +500M /u01/app/acfsmounts/myacfs

acfsutil snap create

Purpose

Creates a read-only snapshot of an Oracle ACFS file system.

Syntax and Description


acfsutil snap create [-h]
acfsutil snap create snapshot mount_point

acfsutil snap create -h displays help text and exits.

Table 13-22 contains the options available with the acfsutil snap create command.

Table 13-22 Options for the acfsutil snap create command

Option Description

snapshot

Specifies a name for the snapshot. The.ACFS/snaps directory itself cannot be snapped.

mount_point

Specifies the mount point.


acfsutil snap create creates a read-only snapshot of the Oracle ACFS mounted on mount_point. Snapshots are not separate file systems. The snapshot appears in.ACFS/snaps/snapshot and is a complete replica of the file system at the time the snapshot command was given. Snapshots usually use very little storage initially as they share file system blocks with the original file system until a file changes.

Tools such as du report the total disk space usage of the snapshotted files, which includes the storage shared with the original versions of the files. To determine the total space used for the snapshots, use the acfsutil info fs command. See "acfsutil info".

Oracle ACFS snapshots are immediately available for use after they are created. They are always online under the.ACFS/snaps directory when the original file system is mounted. No separate command is needed to mount them.The last modification time of .ACFS/snaps/snapshot is set to the time the snapshot was created, not the last modification time of the root directory of the file system at the time of the snapshot creation. An ls -l or similar command in the.ACFS/snaps directory can be used to determine the age of each snapshot.

Administrator privileges are required to use this command or you must be a member of the Oracle ASM administrator group.

For more information about Oracle ACFS snapshots, see "About Oracle ACFS Snapshots".

Examples

The following examples show the use of acfsutil snap create. The first and second examples create snapshots of the Oracle ACFS file system mounted on /u01/app/acfsmounts/myacfs. The third example lists the contents of the .ACFS/snaps directory.

Example 13-18 Using acfsutil snap create

$ /sbin/acfsutil snap create mysnapshot_0900609b /u01/app/acfsmounts/myacfs

$ /sbin/acfsutil snap create mysnapshot_0900609c /u01/app/acfsmounts/myacfs

$ ls /u01/app/acfsmounts/myacfs/.ACFS/snaps
mysnapshot_0900609a  mysnapshot_0900609b  mysnapshot_0900609c

acfsutil snap delete

Purpose

Deletes a read-only snapshot of an Oracle ACFS file system.

Syntax and Description


acfsutil snap delete [-h]
acfsutil snap delete snapshot mount_point

acfsutil snap delete -h displays help text and exits.

Table 13-23 contains the options available with the acfsutil snap delete command.

Table 13-23 Options for the acfsutil snap delete command

Option Description

snapshot

Specifies a name for the snapshot.

mount_point

Specifies the mount point of the file system that contains the snapshot.


acfsutil snap delete deletes the snapshot named snapshot in the Oracle ACFS mounted on mount_point. After successful completion of the command, the representation of the snapshot in the.ACFS/snaps directory is removed. The command fails if any file within the snapshot is open on any cluster node.

Administrator privileges are required to use this command or you must be a member of the Oracle ASM administrator group.

Examples

The following example deletes a snapshot of the file system mounted on /u01/app/acfsmounts/myacfs.

Example 13-19 Using acfsutil snap delete

$ /sbin/acfsutil snap delete mysnapshot_0900609b /u01/app/acfsmounts/myacfs

acfsutil tune

Purpose

The acfsutil tune command displays the value of a specific tuneable parameter or all Oracle ACFS tuneable parameters, or sets the value of a tuneable in a persistent manner on a particular node.

Syntax and Description


acfsutil [-h]
acfsutil tune [tuneable_name]
acfsutil tune tuneable_name=value

acfsutil tune -h displays help text and exits.

Table 13-24 contains the options available with the acfsutil tune command.

Table 13-24 Options for the acfsutil tune command

Option Description

tuneable_name

Specifies the name of the tuneable parameter.

value

Specifies the value for a tuneable parameter.


The only Oracle ACFS tuneable parameter is the Windows specific AcfsMaxOpenFiles, which limits the number of open Oracle ACFS files on Windows. Normally you do not have to change the value of this tuneable.

Changing a tuneable parameter has an immediate effect and persists across restarts. You must be a root user or the Windows Administrator to change the value of a tuneable.

Examples

The first example prints Oracle ACFS tuneables. The second example changes the value of a tuneable.

Example 13-20 Using acfsutil tune

$ /sbin/acfsutil tune

$ acfsutil tune AcfsMaxOpenFiles=50000

advmutil tune

Purpose

advmutil tune displays the value of a specific Oracle ADVM parameter or sets the value of a specific Oracle ADVM parameter.

Syntax and Description


advmutil [-h ]
advmutil tune parameter [= value]

advmutil tune -h displays help text and exits.

Table 13-25 contains the options available with the advmutil tune command.

Table 13-25 Options for the advmutil tune command

Option Description

parameter

Specifies the parameter for which you want to set or display the value.

value

Optional value provided to set the value of the specified parameter.


If a value is not provided, the advmutil tune command displays the value that is currently assigned to the specified parameter.

The parameters that can be specified with advmutil tune are the maximum kernel memory (max_memory) or the maximum time in minutes for the deadlock timer (deadlock_timer).

The maximum kernel memory (max_memory) specifies the maximum operating system (OS) kernel memory in megabytes that can be consumed by the Oracle ASM Dynamic Volume Manager driver to cache Oracle ASM extent maps.

Note:

The deadlock_timer parameter should be only be set by Oracle Support Services.

Examples

The first example sets the maximum kernel memory. The second example queries the current setting for the maximum kernel memory to be consumed by the Oracle ADVM. The third example changes the maximum time in minutes for the deadlock timer. The fourth example queries the current setting of a parameter.

Example 13-21 Using advmutil tune

$ /sbin/advmutil tune max_memory = 40

$ /sbin/advmutil tune max_memory
  max_memory = 40 (0x28)

$ /sbin/advmutil tune deadlock_timer = 20

$ /sbin/advmutil tune deadlock_timer
  deadlock_timer = 20 (0x14)

advmutil volinfo

Purpose

advmutil volinfo displays information about Oracle ADVM volume devices.

Syntax and Description


advmutil volinfo [-h]
advmutil volinfo [-l] volume_device

advmutil volinfo -h displays help text and exits.

Table 13-26 contains the options available with the advmutil volinfo command.

Table 13-26 Options for the advmutil volinfo command

Option Description

volume_device

Specifies the volume device name.

-l

Optional flag separates the Oracle ADVM volume device information by colons.


advmutil volinfo displays information about the specified Oracle ADVM volume device in a list format by default. The -l option on Linux (/l on Windows) formats the display into a colon-separated string.

Examples

The first example displays information about an Oracle ADVM volume device, using the advmutil volinfo command with the volume device name. The second example displays information about the volume device in a format suitable for scripting, using the -l option with advmutil volinfo.

Example 13-22 Using advmutil volinfo

$ /sbin/advmutil volinfo /dev/asm/volume1-123
Interface Version: 1
Size (MB): 256
Resize Increment (MB): 256
Redundancy: mirror
Stripe Columns: 4
Stripe Width (KB): 128
Disk Group: DATA
Volume: VOLUME1

$ /sbin/advmutil volinfo -l /dev/asm/volume1-228
Interface Version : 1 : Size (MB) : 256 : Resize Increment (MB) : 256 : 
Redundancy : mirror : Stripe Columns : 4 : Stripe Width (KB) : 128 : 
Disk Group : DATA : Volume : VOLUME1