Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started

 

question

suujana.naga16_165607 avatar image
suujana.naga16_165607 asked suujana.naga16_165607 commented

How do I place commitlogs and data directory on different volumes?

I have installed DSE 5.1.15 on one AWS t2.large instance using Datastax Installer with root permissions. I have specified different directory location for data alone and left rest of the directory locations as default. Upon start up I could see data directory in the specified path with all system keyspaces in it. And I have created a keyspace in cqlsh and it got created. However, directory structure for that keyspace did not get created under data directory. Not sure in which location it got stored and what exactly happened here!

configuration
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered suujana.naga16_165607 commented

You need to create filesystems on Linux on 2 separate volumes then create the respective directories on the mount points.

For example, assuming you have the following filesystems:

/volume1/path/to/commitlog
/volume2/path/to/data

You would configure the following in cassandra.yaml:

commitlog_directory: /volume1/path/to/commitlog
data_file_directories:
     - /volume2/path/to/data

Note that this requires a restart of DSE for the change to take effect. Cheers!

3 comments Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

I have followed below steps to seperate commitlogs and data directory where it has data in it. Please let me know if this is the correct procedure to follow in real time production environment where it has existing data in it?


1 created two volumes and mounted them to new data and commitlog directories.

2. stopped dse service

3. Made changes in yaml file like suggested above.

4. Took a snapshot backup of my main keyspace alone but not for system keyspaces. ( let me know if i need to take backup of system keyspaces as well)

5. started dse service.

6. observed all commilogs in the new directory and all system keyspaces in new data directory except the application keyspace ( keyspace - mykeys, table -table1)

7. logged into cqlsh and created keyspace and table schema again with same naming conventions.

8. directory structure got created under new data directory for ks- mykeys

9. Manually copied snapshot contents to new data directory and restored data in new data directory using nodetool refresh.


0 Likes 0 ·
Erick Ramirez avatar image Erick Ramirez ♦♦ suujana.naga16_165607 ·

There's something wrong with your configuration for the data to be missing from the data directory.

I'm limited in what I can do in a Q&A forum so my recommendation is for you to log a ticket with DataStax Support so one of our engineers can assist you. Cheers!

0 Likes 0 ·

Hi Erick,

I have n't done any advanced configurations. Just few basic conf like cluster name , seed name, vnodes, listen and rpc address and its a single ec2 instance that i have tried this on..! Am i missing on any basics here?


0 Likes 0 ·