Delete a Storage Group from a Database

A storage group goes permanently offline for the following two reasons:

  • The storage group is removed from all archives with no intent of adding it back to any archive.

  • All archives serving the storage group are damaged or lost.

A user-defined storage group that has gone permanently offline must be deleted. Deleting a storage group informs the database that it no longer needs to wait for the storage group to come back online and allows the database to resolve all stranded transactions that have been waiting for the storage group to come online.

To delete a permanently offline storage group from an archive, use the nuocmd delete storage-group command. This command takes the following arguments:

  • The name of the database.

  • The name of the storage group.

Example

To check the state of the storage group, run the nuocmd show storage-groups command. An offline storage group is indicated with state = Unavailable. For example:

nuocmd show storage-groups --db-name db
Storage groups for database: db
  [   1] [name = ALL] [state = Unavailable]
    No Leader Candidates available
  [  10] [name = SG1] [state = Unavailable]
    No Leader Candidates available
  [   2] [name = UNPARTITIONED] [state = Available]
    Leader Candidates:
      [SM] localhost:48006 [start_id = 0] [pid = 39327] [node_id = 1] MONITORED:RUNNING

In this example, the database has one user-defined storage group SG1 with state = Unavailable, indicating that it is offline.

A storage group can only be deleted from the database if it was previously removed from all archives or if the archives serving the storage group were deleted. For more information, see Remove a Storage Group from an Archive.