Basic Administration

This page outlines some frequently used utilities and tools available within Xpand.

Load Balancing Xpand

Xpand requires an external TCP load balancer to balance queries across a cluster. Xpand recommends HAProxy as a load balancer. For more information, see Load Balancing Xpand with HAProxy.

Accessing Xpand from the Command Line

To access Xpand from the command line, run MySQL from a command line prompt.       

shell> mysql
sql> SELECT * FROM test.sample ORDER BY birth; 
| name       | birth      | death      | sex |
| Rowinsky   | 1952-08-01 | NULL       | F   |
| Snyder     | 1955-11-26 | 2014-05-17 | M   |
| Thompson   | 1965-03-09 | NULL       | F   |
| Johnson    | 1980-06-11 | NULL       | M   |
4 rows in set (0.00 sec)

Because Xpand is MySQL compatible, many third party tools such as MySQLWorkbench, TOAD, etc. will work seamlessly with Xpand.

Loading Data onto Xpand

Depending on your specific needs, there are numerous options for loading data onto Xpand: 

  • Xpand recommends using clustrix_import if your source database is MySQL or you have a mysqldump file available. This is the fastest method for loading data onto Xpand from another system. 

  • To cut over a production environment from MySQL to Xpand, you can use MySQL replication as outlined in Migrating to Xpand from MySQL.

  • To transfer user accounts and permissions, use clustrix_clone_users as documented in Migrating User Permissions.  

  • Load Data Infile can also be used to import data directly to Xpand from a csv file.

See also Loading Data Onto Xpand.

Web-based Cluster Administration 

Xpand includes XpandGUI Administration UI for cluster administration.

Examining Xpand Server Logs

Xpand’s server logs enable users and Customer Support to understand the queries and events that occur on a Xpand cluster. All the logs created by Xpand are placed, by default, in the /data/clustrix/log directory (this is configurable) and there are a separate set of logs for each node of your cluster. The logs used most frequently are query.log and clustrix.log.

The query.log shows information for SQL statements used within Xpand. From the query.log you can identify slow queries as well as query syntax errors. For information see Query Logging.

The clustrix.log is a chronology of events that occur on your cluster. It includes alerts that are also logged to a separate log file - alert.log. Please see Database Alerts to establish the necessary alerts for your cluster. 

Using CLX - Cluster-Wide Command Line Utility

Xpand includes a general-purpose command line utility called clx for monitoring and managing a cluster. A single clx command is automatically processed in parallel on all nodes of a cluster. It is located in the /opt/clustrix/bin/ directory.

The full list of clx commands and options are outlined in The CLX Command-Line Administration Tool. These commands are likely to be the most useful.   

Useful CLX CommandsDescription

clx status    

Displays the status, IP, and disk utilization of each node in a cluster.

clx cmd

Runs Linux commands in parallel on all nodes of the cluster.

clx logdump Consolidates and filters Xpand logs so database issues can be researched and resolved.
clx dbstopStops Xpand on all nodes.
clx dbstart  Starts Xpand on all nodes.
clx dbrestartRestarts Xpand on all nodes. (Use in lieu of dbstop/dbstart when applicable.)

Xpand’s clx utility also communicates with another critical element of the system called nanny. The nanny is a database cluster process that provides monitoring to ensure that all processes vital to Xpand node functionality are running. It is activated at system startup. If any critical Xpand component fails at any point, for any reason, nanny restarts it automatically.

For a list of the processes that nanny monitors and controls, please refer to this Overview of Nanny.

Monitoring Xpand Using statd

Performance statistics are automatically collected by statd in the clustrix_statd database. The resulting statistics can be assessed by querying the tables directly or by viewing them with the XpandGUI administrative tool.

For a recap of the statistics gathered and some potential ways to analyze them, see Monitoring Your Cluster Using statd.

Upgrading Xpand

Xpand regularly provides both major and minor releases to continuously improve its product's performance, functionality, scalability, and stability. Each release passes a thorough and rigorous quality assurance process before it is released to our customers.

For specifics on how to upgrade Xpand, see Upgrading Xpand.

Expanding/Reducing Your Cluster’s Capacity

Your application and database may experience fluctuating transaction volumes due to seasonal changes. The underlying design of Xpand enables it to easily and uniquely adapt to those changes. To increase your cluster’s capacity, simply add more nodes. Conversely, if transaction volume subsequently declines, removing nodes to decrease costs is equally painless. See Flex Up and Flex Down for specifics.

Parallel Backup and Restore

Xpand includes a fast parallel backup and restore feature. For backups, each Xpand node sends its data directly to the backup target in parallel, allowing for concurrency and for backup performance to scale with cluster size. Similarly, the restore operation is initiated on one node and that node coordinates with all other nodes of the cluster to read from the backup file and restore data throughout the cluster in parallel.

The Xpand database backups contain schema definitions, metadata relative to the backup, compacted row data, and information to ensure data consistency. For more information, see Xpand Fast Backup and Restore