Adding a Storage Group to an Archive

Adding a storage group to an archive means that the storage group will then be in service by the Storage Manager (SM) started with that archive, in addition to any other storage groups associated with that archive. The storage group will be created if the storage group does not already exist in the database.

A storage group is added to an archive using the add storage-group command which associates the storage group with a specific archive. The add storage-group command takes the following arguments:

Before attempting to add a storage group to an archive, run the show archives command. For example:

nuocmd show archives --db-name tpsgtest
[1] server0 : /var/opt/production-archives/tpsgtest @ tpsgtest [journal_path = ] [snapshot_archive_path = ] RUNNING
  [SM] p18/localhost:48008 [start_id = 4] [server_id = server0] [pid = 25183] [node_id = 1] [last_ack =  2.26] MONITORED:RUNNING
[2] server0 : /var/opt/production-archives/tpsgtestsm2 @ tpsgtest [journal_path = ] [snapshot_archive_path = ] PROVISIONED

Note: show archives and add storage-group are issued using NuoDB Command (nuocmd). For more information on NuoDB Command and other command line tools, see Command Line Tools.

After investigating the archives available, use the add storage-group command to add a storage group to an archive.

nuocmd add storage-group --db-name tpsgtest --sg-name SG0 --archive-id 1
nuocmd add storage-group --db-name tpsgtest --sg-name SG1 --archive-id 2

Note: The add storage-group commands documented here adds the storage group SG0 to archive 1 in the tpsgtest database , and storage group SG1 to archive 2 in the same database.

A storage manager does not have to be running using the archive to add a storage group to it.

By default, when no storage groups have been added, only the UNPARTITIONED storage group is available.

You can use the add storage-group command to add a storage group to an archive with a running SM or one that does not have a running SM.