将存储组添加到存档

将存储组添加到归档意味着除任何与该存档关联的任何其他存储组外,存储管理管理器如果数据库中尚不存在,将创建存储组。

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:

  • 数据库的名称

  • 存储组的名称

  • 存档的ID。

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
show archives and add storage-group are issued using NuoDB Command (nuocmd). For more information on NuoDB Command and other command line tools, see 命令行工具.

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
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.

存储管理器不必使用存档运行以将存储组添加到它。

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.