1
votes

We are in the process of moving our cassandra cluster ( version 1.1.6 ) from our old DC ( DC2 ) to a new DC ( DC1 - yes the are reversed) one keyspace at a time.

We have 3 keyspaces A, B and C:

A and B have already been successfully moved to the new datacenter and were running with a replication factor of DC1:3;DC2:3. All our applications for these two keyspaces have been updated so that nothing is writing/reading from the old datacenter. We then changed the replication factor to DC1:3;DC2:0 so the data is now actually stale.

I was trying to find a way to delete these keyspaces in the old DC to free up the space i need for Keyspace C, but i haven't found one.

Is there a way of dropping a keyspace from a singe data center, or better work around for removing the data from the old DC?

1
Did you try changing the replication factor to {DC1:3} and there is no DC2? - Nishant
Yes, but the data is not removed, even after a nodetool cleanup A - tnosaj
If the data on DC2 does not matter, and you have already changed the setting so that there will be no communication with DC2 for the data, I think you can just go ahead and delete the keyspace A directory in the data_directory on all the machines in DC2. This should theoretically be fine. - Nishant
@Nishant: you are correct, theoretically it should work. I stopped cassandra (because of the open files), removed the directory and started again, and cassandra as well as our apps had no problems. Thanks! - tnosaj
great. Converting it to an answer. - Nishant

1 Answers

0
votes

Change the replication factor to {DC1:3}. Note that there is no DC2.

If the data on DC2 does not matter, and you have already changed the setting so that there will be no communication with DC2 for the data, I think you can just go ahead and delete the keyspace A directory in the data_directory on all the machines in DC2. This should theoretically be fine.