[root@node2 zookeeper]# du -h --max-dept=1 294G ./version-2 294G .
使用自带的zkCleanup进行清理
1 2 3 4 5 6
./zkCleanup.sh Usage: PurgeTxnLog dataLogDir [snapDir] -n count dataLogDir -- path to the txn log directory snapDir -- path to the snapshot directory count -- the number of old snaps/logs you want to keep, value should be greater than or equal to 3
# The number of snapshots to retain in dataDir autopurge.snapRetainCount=3 # Purge task interval in hours # Set to "0" to disable auto purge feature autopurge.purgeInterval=1