如何指定Cassandra数据存储到某些文件系统分区? [英] how to designate Cassandra data storage to certain file-system partition?
问题描述
我使用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.
谢谢!
推荐答案
- 编辑
$ CASSANDRA_HOME / conf / cassandra.yaml
文件(有时是
位于/ etc / cassandra
下,取决于您如何安装
Cassandra) - 更新以下属性
- Edit the
$CASSANDRA_HOME/conf/cassandra.yaml
file (sometimes it is located under/etc/cassandra
also, depending on how you install Cassandra) - Update the following properties
- (仅在Cassandra 3.x 后可用)hints_directory:/ var / lib / cassandra / hints //放入您自己的目录
- > / var / lib / cassandra / data
- (only available since Cassandra 3.x) hints_directory: /var/lib/cassandra/hints // put your own directory here
- data_file_directories: //put a list of directories here
- /var/lib/cassandra/data
这篇关于如何指定Cassandra数据存储到某些文件系统分区?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!