Friday, November 24, 2017

[Trouble shooting / Linux] The volume "Filesystem root" has only 0 bytes disk space remaining.



  • For my case, used % of /var was 100%. Especially, /var/log/kern.log was almost 20GB and /var/log/syslog was also large.
  • If you type as follows, you can find the log files which are very huge size.
$ ls -lSh /var/log

Solution

$ cd /var/log
$ sudo apt clear
$ sudo  apt autoremove --purge
  • Set rotate number as 1 (e.g.,rotate 4 --> 1)

$ vi /etc/logrotate.conf 
# keep 4 weeks worth of backlogs
(before) rotate 4
(after) rotate 1
  • Delete old backup and log files such as *.log.3.
  • Empty (NOT REMOVE!!!) kern.log and syslog
$ sudo su
$ > kern.log
$ > syslog
$ > (dpkg.log, wtmp, lastlog and so on)
$ exit

No comments:

Post a Comment