/storage/log
space consumed in Aria Operations.Aria Operations 8.x
It is generally inadvisable to delete log files from a running system, as it can cause issues with file permissions, missing directories, and other unfulfilled expectations of the services writing them. However, space can be reclaimed by marking the files as 0 bytes via the truncate
command.
By combining truncate
with the find
command, you can ensure that only older log files are reduced in size to have their space reclaimed.
root
via SSH or Console, pressing ALT+F1
in a Console to log in.find /storage/log/ -mount -type f -mtime +1 -exec echo {} \; -exec truncate -cs 0 {} \; 2>&1 | tee /tmp/files_truncated.txt
/storage/log/
-mount
-type f
-mtime +1
-exec echo {} \;
-exec truncate -cs 0 {} \;
2>&1 | tee /tmp/files_truncated.txt
/tmp/files_truncated.txt
-iname *log*
to the find command between -mtime
and -exec
to limit the search to only log files. However, this omits other files from being truncated such as heap dumps and gemfire replay data that generally take up more space than the log files do, if they exist.df -i
.