Tuesday, November 6, 2012

Oracle ACFS Command-line Tools for Linux and UNIX Environments


Oracle ACFS Command-line Tools for Linux and UNIX Environments
Summary of Oracle ACFS commands for Linux and UNIX
Command
Description
Checks and repairs an Oracle ACFS file system.
Creates an Oracle ACFS file system.
Mounts an Oracle ACFS file system.
Dismounts an Oracle ACFS file system.

fsck

Purpose
Checks and repairs an Oracle ACFS file system.
Syntax and Description

fsck -t acfs -h /dev/null
fsck [-a|-f] [-v] [-vv] -t acfs [-n|-y] volume_device

fsck -t acfs -h dev/null displays usage text and exits.
Table contains the options available with the fsck command.
Options for the Linux fsck command
Option
Description
-a
Specifies to automatically repair the file system.
-f
Forces the file system into mountable state without completing a file system check or repair.
-v
Specifies verbose mode. The progress is displayed as the operation occurs.
-vv
Specifies very 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.
Examples
The following example shows how to check and repair an Oracle ACFS file system.
# /sbin/fsck -a -v -y -t acfs /dev/asm/volume1-123

mkfs

Purpose
Creates an Oracle ACFS file system.
Syntax and Description

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

mkfs -t acfs -h displays usage text and exits.
Table below contains the options available with the mkfs command.
Options for the Linux 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 fsreturns 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).
size
Specifies the size that the file system should consume on the named device. The quantity specified can be in units of K (kilobytes), M (megabytes), G (gigabytes), T (terabytes), or P (petabytes). If a unit is not specified, the default is bytes.
If the size specified is not a multiple of the block size, then 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.

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
... 
Next create an Oracle ACFS file system on the volume device file.
$ /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 mount_point
mount

mount -h displays usage text and exits.
Options for the Linux 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-delimited 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 run 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 mkfsdevice is required but can be a dummy value.
mount_point
Specifies the directory where the file system is mounted. This directory must exist before you run the mountcommand.

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 theall option is specified.
# /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.
# /bin/umount /dev/asm/volume1-123
 
# /bin/umount /u01/app/acfsmounts/myacfs

No comments:

Post a Comment