Question

I just setup a fresh windows server with a fresh datastax installation including cassandra 1.2 and opscenter 2.1.3. I've tried finding solutions to these questions on cassandra wikis and datastax website, but I can only find unix specific information or datastax API information.

Cassandra is defaulted to using C: drive (I was never asked to select a drive for cassandra during install).

  • In the same cassandra instance, can I have keyspaces on separate disks?
  • If not, how do I migrate the existing keyspace to the new drive? (just reconfiguring cassandra.yaml to use a new directory would lose my opscenter data and may even break opscenter).
  • If yes, how can I create a new keyspace on a separate drive? cassandra.yaml seems to only have configuration options for a single store location.
  • Should I be creating a new cluster to store my data in? If I start adding new nodes to the default cluster, that will mean the datastax opscenter data will be getting replicated - that seems like a bad idea.

If there is good documentation on this somewhere, please point me there.

Thanks, Adam

Était-ce utile?

La solution

You cannot get cassandra to split the keyspaces and store them in different directories. They are all stored under a common data directory that is specified in the cassandra.yaml file.

However, you can set this up and use NTFS to mount different drives under the data directory on your server but this will not be simple or expandable.

If you want to move where the data is stored on cassandra, then stop the cassandra daemon/service, change the cassandra.yaml file to store the data at a new location, then copy/move the entirety of the data directory to this new location. THEN start cassandra back up and it will work fine with the data in the new location. I have done this quite a few times now and cassandra comes back up without incident and no lost data (if you do not move the data, then it will lose it all and recreate the directory structure under the new location).

Data getting replicated is not a bad thing - it is what cassandra was designed for. I don't know what replication factor opscenter uses, but it does not store a massive amount of data so replication is not a problem.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top