Starting and Stopping Subclusters
Subclusters make it convenient to start and stop a group of nodes as needed. You start and stop them using the admintools command line.
Starting a Subcluster
To start a subcluster, use the restart_subcluster
tool:
$ adminTools -t restart_subcluster -h Usage: restart_subcluster [options] Options: -h, --help show this help message and exit -d DB, --database=DB Name of database whose subcluster is to be restarted -c SCNAME, --subcluster=SCNAME Name of subcluster to be restarted -p DBPASSWORD, --password=DBPASSWORD Database password in single quotes --timeout=NONINTERACTIVE_TIMEOUT set a timeout (in seconds) to wait for actions to complete ('never') will wait forever (implicitly sets -i) -i, --noprompts do not stop and wait for user input(default false). Setting this implies a timeout of 20 min. -F, --force Force the nodes in the subcluster to start and auto recover if necessary
This example starts the subcluster named analytics_cluster:
$ adminTools -t restart_subcluster -c analytics_cluster \ -d verticadb -p password *** Restarting subcluster for database verticadb *** Restarting host [10.11.12.192] with catalog [v_verticadb_node0006_catalog] Restarting host [10.11.12.181] with catalog [v_verticadb_node0004_catalog] Restarting host [10.11.12.205] with catalog [v_verticadb_node0005_catalog] Issuing multi-node restart Starting nodes: v_verticadb_node0004 (10.11.12.181) v_verticadb_node0005 (10.11.12.205) v_verticadb_node0006 (10.11.12.192) Starting Vertica on all nodes. Please wait, databases with a large catalog may take a while to initialize. Node Status: v_verticadb_node0002: (UP) v_verticadb_node0004: (DOWN) v_verticadb_node0005: (DOWN) v_verticadb_node0006: (DOWN) Node Status: v_verticadb_node0002: (UP) v_verticadb_node0004: (DOWN) v_verticadb_node0005: (DOWN) v_verticadb_node0006: (DOWN) Node Status: v_verticadb_node0002: (UP) v_verticadb_node0004: (DOWN) v_verticadb_node0005: (DOWN) v_verticadb_node0006: (DOWN) Node Status: v_verticadb_node0002: (UP) v_verticadb_node0004: (DOWN) v_verticadb_node0005: (DOWN) v_verticadb_node0006: (DOWN) Node Status: v_verticadb_node0002: (UP) v_verticadb_node0004: (UP) v_verticadb_node0005: (UP) v_verticadb_node0006: (UP) Communal storage detected: syncing catalog Restart Subcluster result: 1
Stopping a Subcluster
Stopping a subcluster does not warn you if there are active user sessions connected to the subcluster. This behavior is same as the stopping an individual node. Before stopping a subcluster, verify that no users are connected to it.
To stop a subcluster, use the stop_subcluster
tool:
$ adminTools -t stop_subcluster -h Usage: stop_subcluster [options] Options: -h, --help show this help message and exit -d DB, --database=DB Name of database whose subcluster is to be stopped -c SCNAME, --subcluster=SCNAME Name of subcluster to be stopped -p DBPASSWORD, --password=DBPASSWORD Database password in single quotes --timeout=NONINTERACTIVE_TIMEOUT set a timeout (in seconds) to wait for actions to complete ('never') will wait forever (implicitly sets -i) -i, --noprompts do not stop and wait for user input(default false). Setting this implies a timeout of 20 min.
This example stops the subcluster named analytics_cluster:
$ adminTools -t stop_subcluster -c analytics_cluster -d verticadb -p password *** Forcing subcluster shutdown *** Verifying subcluster 'analytics_cluster' Node 'v_verticadb_node0004' will shutdown Node 'v_verticadb_node0005' will shutdown Node 'v_verticadb_node0006' will shutdown Shutdown subcluster command sent to the database
You can also use the SHUTDOWN_SUBCLUSTER function to stop a subcluster. See SHUTDOWN_SUBCLUSTER for details.