Tuesday, November 6, 2012

Oracle RAC Background Processes


Oracle RAC Background Processes
The GCS and GES processes, and the GRD collaborate to enable Cache Fusion. The Oracle RAC processes and their identifiers are as follows:
  • ACMS: Atomic Controlfile to Memory Service (ACMS)
In an Oracle RAC environment, the ACMS per-instance process is an agent that contributes to ensuring a distributed SGA memory update is either globally committed on success or globally aborted if a failure occurs.
  • GTX0-j: Global Transaction Process
The GTX0-j process provides transparent support for XA global transactions in an Oracle RAC environment. The database autotunes the number of these processes based on the workload of XA global transactions.
  • LMON: Global Enqueue Service Monitor
The LMON process monitors global enqueues and resources across the cluster and performs global enqueue recovery operations.
  • LMD: Global Enqueue Service Daemon
The LMD process manages incoming remote resource requests within each instance.
  • LMS: Global Cache Service Process
The LMS process maintains records of the data file statuses and each cached block by recording information in a Global Resource Directory (GRD). TheLMS process also controls the flow of messages to remote instances and manages global data block access and transmits block images between the buffer caches of different instances. This processing is part of the Cache Fusion feature.
  • LCK0: Instance Enqueue Process
The LCK0 process manages non-Cache Fusion resource requests such as library and row cache requests.
  • RMSn: Oracle RAC Management Processes (RMSn)
The RMSn processes perform manageability tasks for Oracle RAC. Tasks accomplished by an RMSn process include creation of resources related to Oracle RAC when new instances are added to the clusters.
  • RSMN: Remote Slave Monitor manages background slave process creation and communication on remote instances. These background slave processes perform tasks on behalf of a coordinating process running in another instance.

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

ASMCMD Volume Management Commands


ASMCMD Volume Management Commands
Summary of ASMCMD volume management commands
Command
Description
volcreate
Creates an Oracle ADVM volume in the specified disk group.
voldelete
Deletes an Oracle ADVM volume.
voldisable
Disables Oracle ADVM volumes in mounted disk groups.
volenable
Enables Oracle ADVM volumes in mounted disk groups.
volinfo
Displays information about Oracle ADVM volumes.
volresize
Resizes an Oracle ADVM volume.
volset
Sets attributes of an Oracle ADVM volume in mounted disk groups.
volstat
Reports volume I/O statistics.


volcreate
Purpose
Creates an Oracle ADVM volume in the specified disk group.
Syntax and Description

volcreate -G diskgroup -s size
    [ --column number ] [ --width stripe_width ]
     [--redundancy {high|mirror|unprotected} ]
     [--primary {hot|cold}] [--secondary {hot|cold}] volume
Options for the volcreate command
Option
Description
-G diskgroup
Name of the disk group containing the volume.
-s size
Size of the volume to be created in units of K, M, G, or T. The unit designation must be appended to the number specified. No space is allowed. For example: 200M or 20G
--column number
Number of columns in a stripe set. Values range from 1 to 8. The default value is 4.
--width stripe
Stripe width of a volume. The value can range from 4 KB to 1 MB, at power-of-two intervals, with a default of 128 KB.
--redundancy {high|mirror|unprotected}
Redundancy of the Oracle ADVM volume which can be specified for normal redundancy disk groups. The range of values is as follows: unprotected for non-mirrored redundancy, mirror for double-mirrored redundancy, or high for triple-mirrored redundancy. If redundancy is not specified, the setting defaults to the redundancy level of the disk group.
--primary {hot|cold}
Intelligent Data Placement specification for primary extents, either hot or cold region.
--secondary {hot|cold}
Intelligent Data Placement specification for secondary extents, either hot or cold region.
volume
Name of the volume. Only alphanumeric characters are allowed; hyphens are not allowed. The first character must be alphabetic.

Examples
The following is an example of the volcreate command that creates volume1 in the data disk group with the size set to 10 gigabytes.
Example Using the ASMCMD volcreate command
ASMCMD [+] >  volcreate -G data -s 10G --width 64K --column 8 volume1

ASMCMD [+] > volinfo -G data volume1
Diskgroup Name: DATA

         Volume Name: VOLUME1
         Volume Device: /dev/asm/volume1-123
         State: ENABLED
         Size (MB): 10240
         Resize Unit (MB): 64
         Redundancy: MIRROR
         Stripe Columns: 8
         Stripe Width (K): 64
         Usage:
         Mountpath:


voldelete
Purpose
Deletes an Oracle ADVM volume.
Syntax and Description

voldelete -G diskgroup volume
Options for the voldelete command
Option
Description
-G diskgroup
Name of the disk group containing the volume.
volume
Name of the volume.

Using the ASMCMD voldelete command
ASMCMD [+] > voldelete -G data volume1

voldisable
Purpose
Disables Oracle ADVM volumes in mounted disk groups and removes the volume device on the local node.
Syntax and Description

voldisable { -a | -G diskgroup -a | -G diskgroup volume }
Options for the voldisable command
Option
Description
-a
When used without a disk group name, specifies all volumes within all disk groups.
When used with a disk group name (-G diskgroup -a), specifies all volumes within that disk group.
-G diskgroup
Name of the disk group containing the volume.
volume
Name of the volume.

Using the ASMCMD voldisable command
ASMCMD [+] > voldisable -G data volume1

volenable
Purpose
Enables Oracle ADVM volumes in mounted disk groups.
Syntax and Description

volenable { -a | -G diskgroup -a | -G diskgroup volume }
Options for the volenable command
Option
Description
-a
When used without a disk group name, specifies all volumes within all disk groups.
When used with a disk group name (-G diskgroup -a), specifies all volumes within that disk group.
-G diskgroup
Name of the disk group containing the volume.
volume
Name of the volume.

Using the ASMCMD volenable command
ASMCMD [+] > volenable -G data volume1

volinfo
Purpose
Displays information about Oracle ADVM volumes.
Syntax and Description

volinfo { -a | -G diskgroup -a | -G diskgroup volume }
volinfo {--show_diskgroup |--show_volume} volumedevice
Options for the volinfo command
Option
Description
-a
When used without a disk group name, specifies all volumes within all disk groups.
When used with a disk group name (-G diskgroup -a), specifies all volumes within that disk group.
-G diskgroup
Name of the disk group containing the volume.
volume
Name of the volume.
--show_diskgroup
Returns only the disk group name. A volume device name is required.
--show_volume
Returns only the volume name. A volume device name is required.
volumedevice
Name of the volume device.
Using the ASMCMD volinfo command
ASMCMD [+] > volinfo -G data volume1
Diskgroup Name: DATA
         Volume Name: VOLUME1
         Volume Device: /dev/asm/volume1-123
         State: ENABLED
         Size (MB): 10240
         Resize Unit (MB): 64
         Redundancy: MIRROR
         Stripe Columns: 8
         Stripe Width (K): 64
         Usage: ACFS
         Mountpath: /u01/app/acfsmounts/acfs1
 
ASMCMD [+] > volinfo -G data -a
Diskgroup Name: DATA
         Volume Name: VOLUME1
         Volume Device: \\.\asm-volume1-311
         State: ENABLED
         Size (MB): 1024
         Resize Unit (MB): 32
         Redundancy: MIRROR
         Stripe Columns: 4
         Stripe Width (K): 128
         Usage: ACFS
         Mountpath: C:\oracle\acfsmounts\acfs1

volresize
Purpose
Resizes an Oracle ADVM volume.
Syntax and Description

volresize -G diskgroup -s size [ -f ] volume
Options for the volresize command
Option
Description
-G diskgroup
Name of the disk group containing the volume.
-f
Forces the shrinking of a volume that is not an Oracle ACFS volume and suppresses any warning message.
volume
Name of the volume.
-s size
New size of the volume in units of K, M, G, or T.

Using the ASMCMD volresize command
ASMCMD [+] > volresize -G data -s 20G volume1

volset
Purpose
Sets attributes of an Oracle ADVM volume in mounted disk groups.
Syntax and Description

volset -G diskgroup [ --usagestring string]
        [--mountpath mount_path ]
        [--primary {hot|cold}] [--secondary {hot|cold}] volume
Options for the volset command
Option
Description
-G diskgroup
Name of the disk group containing the volume.
--usagestring string
Optional usage string to tag a volume which can be up to 30 characters. This string is set to ACFS when the volume is attached to an Oracle ACFS file system and should not be changed.
--mountpath mount_path
Optional string to tag a volume with its mount path string which can be up to 1024 characters. This string is set when the file system is mounted and should not be changed.
--primary {hot|cold}
Intelligent Data Placement specification for primary extents, either hot or cold region.
--secondary {hot|cold}
Intelligent Data Placement specification for secondary extents, either hot or cold region.
volume
Name of the volume.

Using the ASMCMD volset command
ASMCMD [+] > volset -G data --usagestring 'no file system created' volume1

volstat
Purpose
Reports I/O statistics for Oracle ADVM volumes.
Syntax and Description

volstat [-G diskgroup] [volume]

Options for the volstat command
Option
Description
-G diskgroup
Name of the mounted disk group containing the volume.
volume
Name of the volume.

The following apply when using the volstat command.
  • If the disk group is not specified and the volume name is specified, all mounted disk groups are searched for the specified volume name.
  • If the disk group name is specified and the volume name is omitted, all volumes are displayed for the named disk group.
  • If both the disk group name and the volume name are omitted, all volumes on all disk groups are displayed.
Using the ASMCMD volstat command
ASMCMD [+] > volstat -G data
DISKGROUP NUMBER / NAME:  1 / DATA
---------------------------------------
  VOLUME_NAME
     READS           BYTES_READ      READ_TIME       READ_ERRS 
     WRITES          BYTES_WRITTEN   WRITE_TIME      WRITE_ERRS
  -------------------------------------------------------------
  VOLUME1
     10085           2290573312      22923           0
     1382            5309440         1482            0