Tendis存储版 磁盘满如何处理?
当Tendis存储版
在使用过程中,磁盘空间满了,整个实例会处于readonly状态,无法进行任何写入操作。
127.0.0.1:8903> set a b
(error) ERR:3,msg:IO error: No space left on deviceWhile appending to file: ./db/5/000084.sst: No space left on device
可以通过info rocksdbbgerror
来查看错误原因
127.0.0.1:8903> info rocksdbBgError
# RocksdbBgError
rocksdb2:bgerror=IO error: No space left on deviceWhile appending to file: ./db/2/000093.sst: No space left on device,reason=Compaction,count=1
rocksdb4:bgerror=IO error: No space left on deviceWhile appending to file: ./db/4/000092.sst: No space left on device,reason=Compaction,count=1
rocksdb5:bgerror=IO error: No space left on deviceWhile appending to file: ./db/5/000089.sst: No space left on device,reason=Compaction,count=1
rocksdb6:bgerror=IO error: No space left on deviceWhile appending to file: ./db/6/000086.sst: No space left on device,reason=Compaction,count=1
当磁盘空间清理后,并且通过tendisadmin recovery
进行恢复,同时也可以通过重启进程恢复。
127.0.0.1:8903> set a b
(error) ERR:3,msg:IO error: No space left on device While appending to file: ./db/5/000084.sst: No space left on device
127.0.0.1:8903> tendisadmin recovery
OK
127.0.0.1:8903> set a b
OK