Can I delete data/system directory in Cassandra?

Viewed 65

I don`t know whether delete or leave this folder in Cassandra. My cassandra system has a data folder. In data folder has a lot of folder. especially, system folder use a much space in disk.(about 20% of entire disk) I think if this folder is unusable so i delete this folder to have a free space in disk.

this system folder location is this. /cassandra_installation_location/data/system

Can I delete this folder without any problem or trouble?

thank you.

** update

Thank you @Erick Ramirez, I appreciate your answer to my question. As you say, I attach some images include directory structure and size of each folders in directories.

I am sorry because I haven`t 10 reputation in this site, so I cannot embed images my article. I have to upload and add to link include image in my article.

This image show the volume of entire system. This image is a volume of entire system.

And this image show the size of data folder. This image is a size of data folder

And this image show the sizes of subdirectories in my data folder. this image show the sizes of subdirectories in my data folder.

Last, this image show the sizes of subdirectories in data/system folder. this image show the sizes of subdirectories in data/system folder

Thank you for your answer.

1 Answers

The quick answer is no, you should never manually delete any files or subdirectories on a node's data/ directory or you risk (a) losing data, or (b) corrupt the node preventing it from working.

The data/system/ directory in particular contains all the metadata that is essential for a Cassandra node's normal operation. The metadata is local to the node and is typically not replicated to other nodes so you risk losing it forever if you delete it.

The only exception for cleaning up the data/ directory is removing snapshots (backups) you no longer require.

You need to first determine which table in data/system is taking up the most space before you can take the necessary action. If you update your original post with details of which (1) table subdirectory is using a lot of disk space, and (2) the contents of the subdirectory, I'd be happy to review them and update my answer. Cheers!

Related