Dropping a table does not reduce disk usage. Why?

I’m trying to free up disk space, but when I drop a table, it does not reduce the storage used by ScyllaDB. What’s happening?

What is happening is that ScyllaDB, by default, creates a snapshot of a table just before it is dropped, as a safety measure. This can be configured in scylla.yaml - there is an auto_snapshot parameter. When it is true (which it is by default), the snapshot is created before dropping the table.

The snapshot itself is in the snapshots directory, under the table SSTable. For example, for dropped table users in keyspace mykeyspace:

/var/lib/scylla/data/mykeyspace/users-bdba4e60f6d511e7a2ab000000000000/snapshots/1515678531438-users

As the snapshot takes the same space as the dropped table, the disk usage remains the same, which is what you are seeing. You can clean snapshots by using nodetool clearsnapshot. Read more on snapshot and clearsnapshot.

Learn more about Data Modeling in this ScyllaDB University course and database administration and configuration options in the ScyllaDB Operations course.