srvctl
The
Server Control command line utility (srvctl)
provides the DBA a method to manage all aspects
of RAC and ASM database instances including
their associated services. The srvctl utility is
run as a command line invocation as shown here:
$ srvctl command object
[options]
Only certain combinations of
srvctl commands and objects are valid. The most
common use case scenarios include:
|
Command
|
Object
|
|
Enable
|
Database
|
|
Disable
|
Instance
|
|
Start
|
Service
|
|
Stop
|
NodeApps
|
|
Status
|
ASM
|
|
Relocate
|
Listener
|
The options then depend upon
the command and object type combination. For
example, to start the entire RAC database (all
instances on all nodes), then the command syntax
is as follows:
$ srvctl start database
–d db_name –o open_options
To start a specific RAC
database instance or instances, the command is:
$ srvctl start database
–d db_name –o open_options –i
instance[,instance…]
To
start the
RAC node’s node apps (e.g. CRS and RAC
infrastructure – including ASM and listener),
the command is:
$ srvctl start nodeapps
–n node_name
ocfs2console
When
using the Oracle Cluster File System version 2
(OCFS2) for the Linux RAC environments’ shared
storage, Oracle provides a series of command
line utilities for managing OCFS. The first,
ocfs2console,
launches a simple GUI screen (Figure 4.5) to
perform key fundamental OCFS administrative
tasks. It must be run as root.
Figure 4.5:
GUI Screen in
OCFS2 Console
Besides the obvious mount and
unmount available on the main menu’s toolbar,
ocfs2console supports the following five key
OCFS2 administrative tasks:
1.
Cluster->Configure Nodes:
screen for defining the nodes, names, IP
addresses and ports for the nodes in the
cluster, which results in the population of the
OCFS2 configuration file:
/etc/ocfs2/cluster.conf.
2.
Cluster->Propagate
Configuration: utility to copy the OCFS2
configuration file to all the nodes defined for
that cluster.
3.
Tools->Format: utility to
format an unmounted device to contain an OCFS2
file system.
4.
Tools->Check: utility to
verify a mounted volume as containing a valid,
i.e. undamaged, OCFS2 file system.
5.
Tools->Repair: utility to
attempt repairs on unmounted OCFS2 volume.
mkfs.ocfs2
The mkfs.ocfs2 command is
used to create an OCFS2 file system on a device.
The command syntax is as follows:
mkfs.ocfs2 [options]
/device blocks-count
Where the options are:
|
-b
|
--block-size
|
Block Size
|
|
-C
|
--cluster-size
|
Cluster Size
|
|
-F
|
--force
|
Force Formatting
|
|
-J
|
--journal-options
|
Journal Options
|
|
-L
|
--label
|
Volume Label
|
|
-M
|
--mount
|
Mount
Type
|
|
-N
|
--node-slots
|
Number of Node Slots
|
|
-T
|
|
File System Type
|
|
-q
|
--quiet
|
Quiet
|
|
-v
|
--verbose
|
Verbose
|
|
-V
|
--version
|
Version
|
|
|
--no-backup-super
|
Do not backup super
block
|
tunefs.ocfs2
The tunefs.ocfs2 command is used to adjust OCFS2
file system parameters on disk. The command
syntax is as follows:
tunefs.ocfs2 [options]
/device blocks-count
Where the options are:
|
-J
|
--journal-options
|
Journal Options
|
|
-L
|
--label
|
Volume Label
|
|
-M
|
--mount
|
Mount
Type
|
|
-N
|
--node-slots
|
Number of Node Slots
|
|
-S
|
--volume-size
|
Extend the size
|
|
-Q
|
--query
|
Query
B
Block size in
bytes
T
Cluster size in
bytes
N
Number of node
slots
R
Root directory
block number
Y
System directory
block number
P
First cluster
group block number
V
Volume label
U
Volume uuid
M
Compat flags
H
Incompat flags
O
RO Compat flags
|
|
-q
|
--quiet
|
Quiet
|
|
-U
|
--uuid-reset
|
Change the volume
UUID
|
|
-v
|
--verbose
|
Verbose
|
|
-V
|
--version
|
Version
|
|
|
--backup-super
|
Backup super block
|
fsck.ocfs2
The
fsck.ocfs2
command is used to check an OCFS2 file system.
The command syntax is as follows:
fsck.ocfs2 [options]
/device
Where the options are:
|
-b
|
|
Super Block offset to
read
|
|
-B
|
|
Block Size
|
|
-f
|
|
Force
|
|
-F
|
|
Skips cluster service
check
|
|
-G
|
|
Ask if mismatched
inodes unused
|
|
-n
|
|
No answer to all fsck
questions
|
|
-r
|
|
Recover using backup
# from 1-6
|
|
-y
|
|
Yes answer to all
fsck questions
|
|
-v
|
|
Verbose
|
|
-V
|
|
Version
|
mounted.ocfs2
The
mounted.ocfs2
command detects all OCFS2 volumes on a system.
The command syntax is as follows:
mounted.ocfs2 [options]
/device
Where the options are:
|
-d
|
|
List volumes, labels
and UUID’s
|
|
-f
|
|
List volumes and
nodes mounted
|
 |
Fo r more details on Oracle utilities, see the book "Advanced
Oracle Utilities" by Bert Scalzo, Donald K. Burleson, and Steve Callan.
You can buy it direct from the publisher for 30% off directly from
Rampant TechPress.
|