nodetool datapaths¶
Displays the data file directories for the node.
Synopsis¶
nodetool [connection_options] datapaths
Description¶
nodetool datapaths shows the configured data directories for the Cassandra node. These are the filesystem paths where Cassandra stores SSTables and other data files.
Examples¶
Basic Usage¶
nodetool datapaths
Sample Output¶
/var/lib/cassandra/data
Or for multiple data directories:
/mnt/disk1/cassandra/data
/mnt/disk2/cassandra/data
/mnt/disk3/cassandra/data
Configuration¶
Data paths are configured in cassandra.yaml:
# cassandra.yaml
data_file_directories:
- /var/lib/cassandra/data
# Or multiple directories:
data_file_directories:
- /mnt/disk1/cassandra/data
- /mnt/disk2/cassandra/data
Use Cases¶
Verify Configuration¶
# Confirm data directory paths
nodetool datapaths
Disk Space Monitoring¶
# Check space on data directories
for path in $(nodetool datapaths); do
echo "$path: $(df -h $path | tail -1 | awk '{print $4}') free"
done
Troubleshooting¶
# Verify data directories exist and are accessible
nodetool datapaths | xargs -I {} ls -la {}
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¶
| Command | Relationship |
|---|---|
| info | Node information including paths |
| tablestats | Table disk usage |
| status | Cluster overview |