nodetool datapaths
Cassandra 4.1+
This command is available in Cassandra 4.1 and later.
Displays the data file directories for the node.
Synopsis
Section titled “Synopsis”nodetool [connection_options] datapaths [options] [--] [<keyspace.table> | <keyspace>]See connection options for connection options.
Description
Section titled “Description”nodetool datapaths shows the data file paths for tables on the Cassandra node. The output is organized by keyspace and table, showing where each table's SSTables are stored.
Options
Section titled “Options”| Option | Description |
|---|---|
-F, --format <format> | Output format (json or yaml) |
Examples
Section titled “Examples”Basic Usage
Section titled “Basic Usage”nodetool datapathsSample Output
Section titled “Sample Output”Keyspace: my_keyspace Table: users /var/lib/cassandra/data/my_keyspace/users-abc123 Table: orders /var/lib/cassandra/data/my_keyspace/orders-def456Keyspace: system Table: local /var/lib/cassandra/data/system/local-xyz789...Filter by Keyspace or Table
Section titled “Filter by Keyspace or Table”# Show paths for specific tablenodetool datapaths my_keyspace.users
# Show paths for all tables in a keyspacenodetool datapaths my_keyspaceConfiguration
Section titled “Configuration”Data paths are configured in cassandra.yaml:
data_file_directories: - /var/lib/cassandra/data
# Or multiple directories:data_file_directories: - /mnt/disk1/cassandra/data - /mnt/disk2/cassandra/dataUse Cases
Section titled “Use Cases”Verify Configuration
Section titled “Verify Configuration”# Confirm data directory pathsnodetool datapathsDisk Space Monitoring
Section titled “Disk Space Monitoring”# Check disk space on data directories using tablestatsnodetool tablestats my_keyspace | grep "Space used"JSON Output
Section titled “JSON Output”# Get paths in JSON format for scriptingnodetool datapaths -F json my_keyspaceBest Practices
Section titled “Best Practices”Data Path Guidelines
- Dedicated disks - Use separate disks for data
- Monitor space - Track disk usage per path
- Fast storage - SSDs recommended for data paths
- JBOD configuration - Multiple paths for JBOD setups
Related Commands
Section titled “Related Commands”| Command | Relationship |
|---|---|
| info | Node information including paths |
| tablestats | Table disk usage |
| status | Cluster overview |