Reclaiming the Disk Space by Deleting the Logs of the Docker Con

  • 时间:2020-10-07 14:14:07
  • 分类:网络文摘
  • 阅读:117 次

The Steem Blockchain is huge and currently it has over 47 Million blocks and still growing!

To run a steem witness, you will need at least 16GB RAM and at least 1TB HDD/SSD. The blockchain size is currently over 300GB, and imagine you would need to restore from backup instead of replaying/reindexing the whole blockchain which takes weeks, a large Disk would certainly help.

If your Steem Node (Using the Docker Container: SIAB: Steem-In-A-Box) is running for months, you will have lots of the logs written – which you can truncate and reclaim the lost space.

First, go to the container directory – which is located at /var/lib/docker/containers/.

Then for example, the log is the -json.log file – which you can locate them by find . -name “*.log” -type f -size +100M to list log files that are larger than 100M.

huge-log-file-at-docker-container-folder Reclaiming the Disk Space by Deleting the Logs of the Docker Container blockchain docker SteemIt

Then, we can just truncate the log file (do not simply remove it otherwise the logs will be stopped writing) – However, if you don’t want the logs at all – this is a good way to avoid logs eating your disk space. You can always restart the container to resume the log writing after the log files have been removed.

1
echo "" > log_file-json.log
echo "" > log_file-json.log

–EOF (The Ultimate Computing & Technology Blog) —

推荐阅读:
健康卫视直播-健康卫视在线直播观看「高清」  莲花卫视直播-莲花卫视在线直播观看「高清」  澳亚卫视直播-澳亚卫视在线直播观看「高清」  阳光卫视直播-阳光卫视在线直播观看「高清」  金鹰卡通直播-金鹰卡通在线直播观看「高清」  优漫卡通直播-优漫卡通卫视在线直播「高清」  炫动卡通直播-上海炫动卡通卫视直播「高清」  BTV卡酷少儿直播-北京卡酷动画卫视直播「高清」  嘉佳卡通卫视直播-嘉佳卡通直播在线观看「高清」  浙江少儿频道直播-浙江少儿在线直播观看「高清」 
评论列表
添加评论