You may also want to add storage space to existing nodes if there is
unused disk space on the nodes or when you add disk capacity. For information
on the recommended data device size, see Specifying Device Size

To add storage space to nodes, use the hadbm set command
to increase data device size.

Changing the data device size for a database in a FaultTolerant or
higher state upgrades the system without loss of data or availability. The
database remains in operational during the reconfiguration. Changing device
size on a system that is not FaultTolerant or better causes
loss of data. For more information about database states, see Database States.

Example 3–12 Example of setting data device size

The following command is an example of setting data device size:

hadbm set DataDeviceSize=1024

Adding Machines

You may want to add machines if HADB requires more processing or storage
capacity. To add a new machine on which to run HADB, install HADB packages
with or without the Enterprise Serveras described in Chapter 2, Installing and Setting Up High Availability Database. For an explanation
of node topology alternatives, see the Selecting a Topology chapter in Sun
GlassFish Enterprise Server 2.1 Deployment Planning guide on docs.sun.com.

The dbname operand specifies the database
name. The default is hadb. The database must be in HAFaultTolerant or FaultTolerant state. For more information
about database states, see Database States.

If you do not specify the --devicepath and --historypath options, the new nodes will have the same device path and use the
same history files as the existing database.

Adding nodes performs a refragmentation and redistribution of the existing
data to include the new nodes in the system. Online refragmenting requires
that the disks for the HADB nodes have enough space to contain the old data
and the new data simultaneously until refragmenting is finished, that is,
the user data size must not exceed 50% of the space available for user data.
For details, see Getting Device Information

Note –

The best time to add nodes is when the system is lightly loaded.

Example 3–13 Example of adding nodes

For example:

hadbm addnodes -adminpassword=password --hosts n6,n7,n8,n9

The following table describes the special hadbm addnodes command
options. See General Options for a description
of other options.

Table 3–13 hadbm addnodes
Options

Option

Description

Default

--no-refragment

-r

Do not refragment the database during node creation; In this case, refragment
the database later using the hadbm refragment command to
use the new nodes. For details about refragmentation, see Refragmenting the Database

Windows: C:\Sun\AppServer\SUNWhadb\vers,
where vers is the HADB version number.

--hosts= hostlist

-H

Comma-separated list of new host names for the new nodes in the database.
One node is created for each comma-separated item in the list. The number
of nodes must be even. IP addresses of HADB hosts must be IPv4 addresses.

Using duplicate host names creates multiple nodes on the same machine
with different port numbers. Make sure that nodes on the same machine are
not mirror nodes.

Odd numbered nodes are in one DRU, even numbered nodes in the other.
If --spares is used, new spare nodes are those with the
highest numbers.

The dbname operand specifies the database
name. The default is hadb. The database must be in HAFaultTolerant or FaultTolerant state. For more information
about database states, see Getting the Status of HADB.

Online refragmentation requires that the disks for the HADB nodes have
enough space to contain the old data and the new data simultaneously until
refragmenting is finished, that is, the user data size must not exceed 50%
of the space available for user data. For details, see Getting Device Information

Note –

The best time to refragment the database is when the system is
lightly loaded.

Example 3–14 Example of refragmenting the database

For example:

hadbm refragment

Adding Nodes by Recreating the Database

If online refragmentation fails persistently when you add new nodes
(either due to lack of data device space or other reasons), recreate the database
with new nodes. This will lead to the loss of existing user data and schema
data.

To add nodes by recreating the database

This procedure enables you to maintain HADB availability throughout
the process.

For each Enterprise Server instance:

Disable the Enterprise Server instance in the load balancer.

Disable session persistence.

Restart the Enterprise Server instance.

Re-enable the Enterprise Server instance in the load balancer.

If you do not need to maintain availability, you can disable and re-enable
all the server instances at once in the load balancer. This saves time and
prevents failover of outdated session data.