[root@garey1 default.conf]# service cassandra stop
Shutdown Cassandra: OK
[root@garey1 default.conf]# cd /usr/local/
[root@garey1 local]# mkdir cassandra
[root@garey1 local]# mkdir cassandra/data
[root@garey1 local]# cp -r /var/lib/cassandra/data/* /usr/local/cassandra/data/
[root@garey1 local]# ls -lah /usr/local/cassandra/data/
total 36K
drwxr-xr-x. 9 root root 4.0K Apr 29 07:50 .
drwxr-xr-x. 3 root root 4.0K Apr 29 07:50 ..
drwxr-xr-x. 6 root root 4.0K Apr 29 07:50 demo
drwxr-xr-x. 3 root root 4.0K Apr 29 07:50 experiments
drwxr-xr-x. 24 root root 4.0K Apr 29 07:50 system
drwxr-xr-x. 6 root root 4.0K Apr 29 07:50 system_auth
drwxr-xr-x. 5 root root 4.0K Apr 29 07:50 system_distributed
drwxr-xr-x. 12 root root 4.0K Apr 29 07:50 system_schema
drwxr-xr-x. 4 root root 4.0K Apr 29 07:50 system_traces
[root@garey1 local]# chown -R cassandra:cassandra /usr/local/cassandra/data
[root@garey1 local]# ls -lah /usr/local/cassandra/data/
total 36K
drwxr-xr-x. 9 cassandra cassandra 4.0K Apr 29 07:50 .
drwxr-xr-x. 3 root root 4.0K Apr 29 07:50 ..
drwxr-xr-x. 6 cassandra cassandra 4.0K Apr 29 07:50 demo
drwxr-xr-x. 3 cassandra cassandra 4.0K Apr 29 07:50 experiments
drwxr-xr-x. 24 cassandra cassandra 4.0K Apr 29 07:50 system
drwxr-xr-x. 6 cassandra cassandra 4.0K Apr 29 07:50 system_auth
drwxr-xr-x. 5 cassandra cassandra 4.0K Apr 29 07:50 system_distributed
drwxr-xr-x. 12 cassandra cassandra 4.0K Apr 29 07:50 system_schema
drwxr-xr-x. 4 cassandra cassandra 4.0K Apr 29 07:50 system_traces
[root@garey1 local]# vim /etc/cassandra/default.conf/cassandra.yaml
find the key data_file_directories
data_file_directories:
- /var/lib/cassandra/data
and set to
data_file_directories:
- /usr/local/cassandra/data
[root@garey1 local]# service cassandra start
No comments:
Post a Comment