System partition Mageia 3, dangerously full

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

System partition Mageia 3, dangerously full

Postby macxi » Sep 6th, '13, 14:03

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
macxi
 
Posts: 462
Joined: Apr 22nd, '11, 02:54
Location: Portugues of Brazil

Re: System partition Mageia 3, dangerously full

Postby pete910 » Sep 6th, '13, 17:06

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
User avatar
pete910
 
Posts: 357
Joined: Jan 8th, '12, 18:53

Re: System partition Mageia 3, dangerously full

Postby pete910 » Sep 6th, '13, 17:25

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
User avatar
pete910
 
Posts: 357
Joined: Jan 8th, '12, 18:53

Re: System partition Mageia 3, dangerously full

Postby macxi » Sep 6th, '13, 19:46

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 :)
macxi
 
Posts: 462
Joined: Apr 22nd, '11, 02:54
Location: Portugues of Brazil

Re: System partition Mageia 3, dangerously full

Postby doktor5000 » Sep 6th, '13, 20:12

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)
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18070
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: System partition Mageia 3, dangerously full

Postby jkerr82508 » Sep 6th, '13, 20:39

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
jkerr82508
 
Posts: 946
Joined: Mar 26th, '11, 01:34
Location: Fife, Scotland

Re: System partition Mageia 3, dangerously full

Postby jiml8 » Sep 7th, '13, 01:23

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...
jiml8
 
Posts: 1254
Joined: Jul 7th, '13, 18:09

Re: System partition Mageia 3, dangerously full

Postby doktor5000 » Sep 7th, '13, 11:22

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 ...
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18070
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest

cron