Page 1 of 1

System partition Mageia 3, dangerously full

PostPosted: Sep 6th, '13, 14:03
by macxi
Hi,

My system partition Mageia 3, with 14GB, is almost full.nearly full. The partition have 300MB of free space. I already removed all programs that are not essential, I e deleted all old kernel files (and their dependencies), but this has not been enough

A Partition system with 14 GB has always been enough to install all programs and still always remain 3 to 4GB free space. But now in Mageia 3 is not so.

I think the reason this little space is due to change in the system log, which is now the journal.

      Release Notes Mageia 3
      Journalctl
      Journalctl is now used as default. You can still install rsyslog if you want logs on tty12 or syslog/user/access/messages logs. draklog has not been modified to deal with journalctl so you will need to have rsyslog installed to use it.

The folder /var/log/journal of Mageia 3 is currently occupying 2.3GB.

The folder /var/log/journal is a log folder. Does anyone know if there is any problem deleting the contents of the /var/log/journal?

Is there any way to limit the space occupied by files in the folder /var/log/journal?

There is another way to free up space on the system partition?

Note: the same topic in Mageia do Brasil Fórum

Re: System partition Mageia 3, dangerously full

PostPosted: Sep 6th, '13, 17:06
by pete910
Seems a lot that, have you checked the tmp folder. Mine with 32bit/64bit dev packages + compilers and what not is only pushing 10

To see what's the biggest 10 files do this in a root console


Code: Select all
find . -type f -print0 | xargs -0 du | sort -n | tail -10 | cut -f2 | xargs -I{} du -sh {}


For directory do this

Code: Select all
find . -type d -print0 | xargs -0 du | sort -n | tail -10 | cut -f2 | xargs -I{} du -sh {}


Should give you an indication as to what's been a hog :)

edit: them commands look from the current dir down. so to do the top level cd to top level. however you might be better off cd-ing to /usr and /var directory's then running the above

Pete

Re: System partition Mageia 3, dangerously full

PostPosted: Sep 6th, '13, 17:25
by pete910
Just run
Code: Select all
 journalctl --disk-usage
and its showing mine at 1.2g. :shock:

Might be time to set a limit in
Code: Select all
/etc/systemd/journald.conf
to 100 or so.

Just uncommented
Code: Select all
SystemMaxUse=
in
Code: Select all
/etc/systemd/journald.conf
and have and set it too 100. see if that works on mine .

to remove old logs do this as root

Code: Select all
find /var/log/journal -name "*.journal~" -exec rm {} \;


My usage is now at 416m , its a bit better....

Pete

Re: System partition Mageia 3, dangerously full

PostPosted: Sep 6th, '13, 19:46
by macxi
pete910,

There is already a bug about it: Bug 9921 - Should set SystemMaxUse to a sane default in /etc/systemd/journald.conf to prevent huge hd usage

I followed your tip:

Code: Select all
[root@localhost /]# cd var
[root@localhost var]# find . -type d -print0 | xargs -0 du | sort -n | tail -10 | cut -f2 | xargs -I{} du -sh {}
100M    ./lib/rpm
132M    ./lib/clamav
189M    ./log/security
384M    ./tmp/kdecache-m3solar
398M    ./lib
403M    ./tmp
2,3G    ./log/journal/c7f4c057aa054c09818e886001e142e7
2,3G    ./log/journal
4,4G    ./log
5,2G    .
[root@localhost var]#


Code: Select all
[root@localhost var]# find /var/log/journal -name "*.journal~" -exec rm {} \;

Code: Select all
[root@localhost /]# cd var
[root@localhost var]# find . -type d -print0 | xargs -0 du | sort -n | tail -10 | cut -f2 | xargs -I{} du -sh {}
100M    ./lib/rpm
132M    ./lib/clamav
189M    ./log/security
218M    ./log/journal/c7f4c057aa054c09818e886001e142e7
218M    ./log/journal
384M    ./tmp/kdecache-m3solar
398M    ./lib
403M    ./tmp
2,4G    ./log
3,2G    .
[root@localhost var]#


I deleted the files from the folder /var/log/journal and now there are 2.3 GB of free space on my HD.

I added a limit to the size of this folder in file /etc/systemd/journald.conf:

Code: Select all
SystemMaxUse=700Mb


Thank you :)

Re: System partition Mageia 3, dangerously full

PostPosted: Sep 6th, '13, 20:12
by doktor5000
pete910 wrote:To see what's the biggest 10 files do this in a root console
Code: Select all
find . -type f -print0 | xargs -0 du | sort -n | tail -10 | cut -f2 | xargs -I{} du -sh {}


For directory do this
Code: Select all
find . -type d -print0 | xargs -0 du | sort -n | tail -10 | cut -f2 | xargs -I{} du -sh {}



Quite a lot to type. You can achieve both with much less characters and complexity:

Code: Select all
du -m / | sort -rn | head -25

will show you the 25 largest files and directories in the / filesystem and their size in MB (-x will avoid crossing filesystem boundaries)

Re: System partition Mageia 3, dangerously full

PostPosted: Sep 6th, '13, 20:39
by jkerr82508
For those of us (like me) who have trouble memorizing commands, ncdu (in the repo) is a useful utility for finding out directory and file sizes. For example:
Code: Select all
# ncdu -x /
produces a navigable display of the directories in /

Jim

Re: System partition Mageia 3, dangerously full

PostPosted: Sep 7th, '13, 01:23
by jiml8
Wow! I had not seen this before. Mine is up to 4.7 Gb!!!

I'm old school; I always use /var/log/messages. I think I will turn journal off, if I can figure out how...

Re: System partition Mageia 3, dangerously full

PostPosted: Sep 7th, '13, 11:22
by doktor5000
jiml8 wrote:I'm old school; I always use /var/log/messages. I think I will turn journal off, if I can figure out how...

Check viewtopic.php?f=7&t=5249
You can install rsyslog and have old behaviour side-by-side. But as journald is the default now, may need some more work ...