如何指定Cassandra数据存储到某些文件系统分区? [英] how to designate Cassandra data storage to certain file-system partition?

查看:309
本文介绍了如何指定Cassandra数据存储到某些文件系统分区?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Cassandra存储我的数据。我使用Centos。
数据似乎总是存储在根分区中,这太小了。
我的文件系统分区如

I used Cassandra to store my data. I use Centos. The data seems always to be stored in the root partition, which is too small. My file system partitions like

Filesystem               Size  Used Avail Use% Mounted on 
/dev/mapper/centos-root   50G   25G   26G  49% /
devtmpfs                 7.8G     0  7.8G   0% /dev
tmpfs                    7.8G     0  7.8G   0% /dev/shm
tmpfs                    7.8G   17M  7.8G   1% /run
tmpfs                    7.8G     0  7.8G   0% /sys/fs/cgroup
/dev/sda2                494M  177M  318M  36% /boot
/dev/sda1                200M  9.8M  191M   5% /boot/efi
/dev/mapper/centos-home  873G   66G  807G   8% /home
tmpfs                    1.6G     0  1.6G   0% /run/user/1001

很明显,根分区(50 GB)远远小于家庭(873GB)。
有一种方法,我改变一个设置来强制执行数据存储使用
分区/ dev / mapper / centos-home?

Obviously the root partition (50 GB) is much smaller than one at home (873GB). Is there a way that I change a setup to enforce data storage using the partition "/dev/mapper/centos-home" ?

我需要使用命令sudo service cassandra start来激活Cassandra。
如果没有sudo,我的权限不允许我激活Cassandra。

I need to use the command "sudo service cassandra start" to activate Cassandra. If without sudo, my authority doesn't allow me to activate Cassandra.

谢谢!

推荐答案


  1. 编辑 $ CASSANDRA_HOME / conf / cassandra.yaml 文件(有时是
    位于 / etc / cassandra 下,取决于您如何安装
    Cassandra)

  2. 更新以下属性

  1. Edit the $CASSANDRA_HOME/conf/cassandra.yaml file (sometimes it is located under /etc/cassandra also, depending on how you install Cassandra)
  2. Update the following properties

  1. 仅在Cassandra 3.x 后可用)hints_directory:/ var / lib / cassandra / hints //放入您自己的目录


    • > / var / lib / cassandra / data

  1. (only available since Cassandra 3.x) hints_directory: /var/lib/cassandra/hints // put your own directory here
  2. data_file_directories: //put a list of directories here
    • /var/lib/cassandra/data


这篇关于如何指定Cassandra数据存储到某些文件系统分区?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆