add_subcluster

Adds a new subcluster to an Eon Mode database.

Adds a new subcluster to an Eon Mode database. For details, see Creating subclusters.

Syntax

vcluster add_subcluster options

Required options

--catalog-path string
The absolute path to the catalog directory.
{ -c | --config } string
The path to the configuration file. If a configuration file is present in the default location (automatically generated by create_db), you do not need to specify this option.

Default: /opt/vertica/config/vertica_cluster.yaml

--subcluster string
The name of the new subcluster. This string must conform to the format used for database names.

Options

--ca-cert-file string
The path to the trusted CA certificate file.

Default: /opt/vertica/config/https_certs/rootca.pem

--cert-file string
The absolute path to the certificate file. If you specify this option, you must also specify --key-file. You should only use --cert-file and --key-file if you have configured the Node Management Agent (NMA) to use custom certificates.
--control-set-size int
The number of control nodes in the subcluster.

Default: -1 (All nodes in the subcluster are control nodes)

--create-storage-locations
Indicates whether the sandbox can create its own storage locations.
--data-path string
The absolute path to the data directory. This should be the same for all nodes in the database.
{ -d | --db-name } string
The name of the database. You should only use this option if you want to override the database name in your configuration file. This string must conform to the format used for database names.
--depot-path string
[Eon only] The absolute path to depot directory.
--depot-size string
[Eon only] Size of depot in one of the following formats:
  • integer{K|M|G|T}, where K is kilobytes, M is megabytes, G is gigabytes, and T is terabytes.
  • integer%, which expresses the depot size as a percentage of the total disk size.
--for-upgrade
Indicates whether the sandbox is used for an online upgrade.
--force-removal
Whether to delete any existing database directories in the new hosts before attempting to add them.
{ -h | --help }
Prints help text.
--hosts strings
A comma-separated list of hosts in the database.
--ipv6
Specifies if the hosts use IPv6 addresses.

Default: IPv4

--is-primary
Whether the new subcluster should be a primary subcluster. If this option is omitted, new subclusters are secondary.
--isolate-metadata
Specifies whether to isolate the metadata of the sandboxed subcluster.
--key-file string
Path to the key file. If you specify this option, you must also specify --cert-file. You should only use --cert-file and --key-file if you have configured the Node Management Agent (NMA) to use custom certificates.
--like string
Clones the configuration from an existing subcluster. Cannot be used with --is-primary or --control-set-size.
{ -l | --log-path } string
The absolute path for debug logs.

Default: /opt/vertica/log/vcluster.log

--new-hosts string[,...]
A comma-separated list of hosts or IP addresses to add to the subcluster.
{ -p | --password } string
The database password.
--password-file string
The absolute path to a file containing the database password.

If you pass a dash(-) (that is, `--password-file -`), the password is read from STDIN.

--read-password-from-prompt
Prompts the user to enter the password.
--sandbox string
Name of the sandbox where the subcluster will be added.
--save-restore-point
Indicates whether a restore point should be saved when creating the sandbox.
--skip-rebalance-shards
[Eon only] Whether to skip shard rebalancing.
--tls-mode string
Sets the TLS validation mode. Valid options are enable, verify-ca, verify-full.

Default: enable

--use-password-for-sql-client-only
Use the password for the NMA SQL client only.
--verbose
Shows the details of VCluster run in the console.

Examples

To add a subcluster with a config file:

  vcluster add_subcluster --subcluster sc1 \
    --config /opt/vertica/config/vertica_cluster.yaml \
    --is-primary --control-set-size 1 \
    --password "PASSWORD"

To add a subcluster with user input:

  vcluster add_subcluster --subcluster sc1 --db-name test_db \
    --hosts 192.0.2.0,192.0.2.1,192.0.2.2 \
    --is-primary --control-set-size -1 \
    --password "PASSWORD"

To add a subcluster and new nodes in the subcluster with a config file:

  vcluster add_subcluster --subcluster sc1 \
    --config /opt/vertica/config/vertica_cluster.yaml \
    --is-primary --control-set-size 1 --new-hosts 192.0.2.3 \
    --password "PASSWORD"

To add a subcluster and new nodes in the subcluster with user input:

  vcluster add_subcluster --subcluster sc1 --db-name test_db \
    --hosts 192.0.2.0,192.0.2.1,192.0.2.2 \
    --is-primary --control-set-size -1 --new-hosts 192.0.2.3 \
    --password "PASSWORD"

To clone properties from an existing subcluster (empty to empty):

vcluster add_subcluster --subcluster sc2 --like sc1

To clone properties and add a single node (must match source node count):

cluster add_subcluster --subcluster sc2 --like sc1 --new-hosts 192.0.2.5

To clone properties and add multiple nodes (must match source node count):

vcluster add_subcluster --subcluster sc2 --like sc1 --new-hosts 192.0.2.5,192.0.2.6