我们如何减少 aerospike .dat 文件的文件大小?我们当前的配置是
namespace test {
memory-size 20G # Maximum memory allocation for data and
# primary and secondary indexes.
storage-engine device { # Configure the storage-engine to use
file /opt/aerospike/test.dat # Location of data file on server.
filesize 100G # Max size of each file in GiB.
}
}
如果 test.dat 为 par 90GB,则当前文件大小ls -ltrh
。但在 AMC ui 上显示使用了 50GB。
我想将文件大小减小到 80GB。我试着按照这个文档
减小 文件大小 通过 Aerospike 服务重新启动来减小文件大小可能最终会删除随机数据,这可能会由于截断而导致 Aerospike 集群上出现意外行为,甚至可能会降低节点上的可用百分比。因此,您需要删除文件本身并让数据从集群中的其他节点迁移。
- 停止 Aerospike 服务器。
- 删除文件并使用新文件大小更新配置。
- 启动 Aerospike 服务器。
但是当我启动服务器发布数据删除时,启动失败并出现错误
Jan 20 2022 03:44:50 GMT: WARNING (drv_ssd): (drv_ssd.c:3784) unable to open file /opt/aerospike/test.dat: No such file or directory
我对此有几个问题
- 有没有办法在没有初始数据的情况下重新启动进程并让它从集群中的其他节点获取数据?
- 如果我想将大小从 100G 减小到 95G,我还需要做同样的事情吗?考虑到当前文件大小仅为 90GB。是否仍有丢失数据的风险?