Add Storage Group

This is a NuoDB Manager command. See NuoDB Manager.

Description

Add a storage group to a specified SM. The storage group will then be in service in addition to any other storage groups assigned to that SM. The storage group will be created by this command if the storage group does not already exist in the database. The following must be true for adding a storage group:

  1. The storage group is being added to a storage manager, not a transaction engine.
  2. The storage group is not already being serviced by the SM.
  3. The SM is not currently syncing.
  4. The SM is neither quiescing nor quiesced.
  5. The user is not trying to add ALL storage groups to the SM.
  6. Another nuodbmgr client is not adding a storage group at the same time.

Syntax

add storageGroup 
    name storageGroupName 
    host SMhost 
    pid pid

Parameters

Interactive Example

Use the show storageGroups command to see what storage groups the database is currently servicing.

nuodb [domain] > show storageGroups
Database: test
  [id=2] UNPARTITIONED Available
    Serviced by:
    [SM] ip-172-31-14-56/52.25.88.188:48005 (us-west-2) [ pid = 13274 ] [ nodeId = 1 ] RUNNING
    [SM] ip-172-31-14-171/52.24.143.83:48006 (us-west-2) [ pid = 6535 ] [ nodeId = 3 ] RUNNING
 
  [id=1] ALL Available
    Serviced by:
 

Add a storage group called SG1 to one of the two SMs:

nuodb [domain] > add storageGroup
Storage group name: sg1
Host: 52.25.88.188
Process ID: 13274
Success
nuodb [domain] > show storageGroups
Database: test
  [id=2] UNPARTITIONED Available
    Serviced by:
    [SM] ip-172-31-14-56/52.25.88.188:48005 (us-west-2) [ pid = 13274 ] [ nodeId = 1 ] RUNNING
    [SM] ip-172-31-14-171/52.24.143.83:48006 (us-west-2) [ pid = 6535 ] [ nodeId = 3 ] RUNNING
 
  [id=10] SG1 Available
    Serviced by:
    [SM] ip-172-31-14-56/52.25.88.188:48005 (us-west-2) [ pid = 13274 ] [ nodeId = 1 ] RUNNING
 
  [id=1] ALL Available
    Serviced by:

Scripting Example

The same add storageGroup command can be executed with --command as follows:

$ nuodbmgr --broker host --password password --command \
    "add storageGroup name sg1 host 52.25.88.188 pid 13274"