Low disk space on MANGO
-
Hello, I have an 8GB MangoES and it's running low on space. This is a picture of the space usage from the putty:
And if I run this command: du -sh /opt/* it gives me this result:
So from this it seems that my files are not so big in the mango folder. Any idea why my disk space is almost full or how I can clear some space?
Thank you!
-
Can you run the same command on the root file system to see other folders taking up space? Is your MangoES running the latest version? There were some issues resolve in the MangoES Configuration Module that stopped system logs from taking up space?
Here are two relevant release notes from the MangoES Configuration Module:
Version 3.3.1
Fixes to prevent /var/mail/mail file from growing, delete that file if present
Version 1.2.1
Fix for inodes filling /var/spool/exim4/input from /etc/cron.d/system-info cron commands -
@joelhaggar Yes, it is an older version.
I checked the /var/mail/mail file and that one was the problem. I deleted the file and now it's ok.
Thank you!
-
We have 6 older mangoES'es (8GB) that we started using a couple of years ago and have been updated to v3.5.6. I noticed that one of them was running out of disk space yesterday and discovered the file /var/mail/mail was about 750MB. I checked this forum and discovered this topic. So I deleted the 'mail' file from all 6 mangoES devices, saving around 750MB on each.
I have checked again today, and the 'mail' files have been recreated and they are already up to 3.3MB on each device I deleted the file from. If this continues, the files will be over 1GB within a year, which is a very large chunk of the 8GB available. I don't want to have to manually delete these files every few months.
Can you please confirm whether there is a permanent fix? -
Hi andrewh,
Can you share the output of
tail -n 50 /var/mail/mail
?Also perhaps can you ensure the /etc/cron.d/system-info cron job is directing its stdout and stderr to /dev/null,
> /dev/null 2>&1
? This should have occurred in updating the MangoESConfiguration module to the versions Joel mentioned (or later versions). -
@phildunlap Hi Phil
Here is the output from one of the older mangoes that DOES exhibit the problem:
mango@mangoES3047:~$sudo tail -n 50 /var/mail/mail
[sudo] password for mango:
Envelope-to: root@mangoes
Delivery-date: Thu, 13 Jun 2019 17:15:02 +0800
Received: from root by mangoES3047 with local (Exim 4.84)
(envelope-from root@mangoes)
id 1hbLp0-0003k9-7R
for root@mangoes; Thu, 13 Jun 2019 17:15:02 +0800
From: root@mangoes (Cron Daemon)
To: root@mangoes
Subject: Cron root@mangoES3047 /usr/sbin/systemInfo/getAll
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/root>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=root>
Message-Id: E1hbLp0-0003k9-7R@mangoES3047
Date: Thu, 13 Jun 2019 17:15:02 +0800- Dir=/opt/info/
- LogFile=systemInfo-new.txt
- Together=/opt/info/systemInfo-new.txt
++ uname -m - arch=armv7l
- [[ armv7l == \a\r\m\v\7\l ]]
++ mount
++ grep 'on / type'
++ awk '{print $1}' - DiskName=/dev/mmcblk0p2
- echo '########DISK##########'
- echo -ne 'Disk Name: '
- echo /dev/mmcblk0p2
- echo -ne 'Disk Total Size: '
- df -m /
- tail -1
- awk '{print $2}'
- echo -ne 'Disk Space Used: '
- df -m /
- tail -1
- awk '{print $3}'
- echo -ne 'Disk Space Left: '
- df -m /
- tail -1
- awk '{print $4}'
- echo -ne 'Disk Percent Used: '
- df -m /
- tail -1
- awk '{print $5}'
/usr/sbin/systemInfo/getAll: line 10: /usr/sbin/systemInfo/timeAlive: No such file or directory
mango@mangoES3047:~$
I tried running this frequently for a minute or so - it looks like an entry is added every 30 seconds.
And here is the output for a new Mango that does NOT exhibit the problem (date is old):
mango@mangoES3546:/etc/rc1.d$sudo tail -n 50 /var/mail/mail
[sudo] password for mango:
Return-path: root@mangoes
Envelope-to: root@mangoes
Delivery-date: Fri, 30 Mar 2018 12:36:32 -0600
Received: from root by mangoes with local (Exim 4.84_2)
(envelope-from root@mangoes)
id 1f1yt6-0004zh-CB
for root@mangoes; Fri, 30 Mar 2018 12:36:32 -0600
From: root@mangoes (Cron Daemon)
To: root@mangoes
Subject: Cron root@mangoes (sleep 30; [ -x /usr/sbin/systemInfo/cronRunner ] & & /usr/sbin/systemInfo/cronRunner);
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/root>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=root>
Message-Id: E1f1yt6-0004zh-CB@mangoes
Date: Fri, 30 Mar 2018 12:36:32 -0600- Dir=/opt/info/
- LogFile=systemInfo-new.txt
- Together=/opt/info/systemInfo-new.txt
++ uname -m - arch=armv7l
- [[ armv7l == \a\r\m\v\7\l ]]
++ mount
++ grep 'on / type'
++ awk '{print $1}' - DiskName=/dev/mmcblk0p2
- echo '########DISK##########'
- echo -ne 'Disk Name: '
- echo /dev/mmcblk0p2
- echo -ne 'Disk Total Size: '
- df -m /
- tail -1
- awk '{print $2}'
- echo -ne 'Disk Space Used: '
- df -m /
- tail -1
- awk '{print $3}'
- echo -ne 'Disk Space Left: '
- df -m /
- tail -1
- awk '{print $4}'
- echo -ne 'Disk Percent Used: '
- df -m /
- tail -1
- awk '{print $5}'
mango@mangoES3546:/etc/rc1.d$tail -n 50 /var/mail/mail
The cron job looks OK:
mango@mangoES3047:/etc/cron.d$more system-info
Regular cron jobs for the system-info package
-
-
-
-
- root [ -x /usr/sbin/systemInfo/cronRunner ] && /usr/sbin/systemInfo/cr
onRunner >/dev/null 2>&1;
- root [ -x /usr/sbin/systemInfo/cronRunner ] && /usr/sbin/systemInfo/cr
-
-
-
-
-
-
-
- root (sleep 30; [ -x /usr/sbin/systemInfo/cronRunner ] && /usr/sbin/sy
stemInfo/cronRunner) >/dev/null 2>&1;
0 0,6,12,18 * * * /usr/sbin/systemInfo/packages;
mango@mangoES3047:/etc/cron.d$
- root (sleep 30; [ -x /usr/sbin/systemInfo/cronRunner ] && /usr/sbin/sy
-
-
-
I compared this to the file on the newer mango, and the only difference I can see is the addition of 'root ' before the path in the last line.
ie, it's "#0 0,6,12,18 * * * root /usr/sbin/systemInfo/packages;Shall I try adding this?
-
Hmm, that looks okay. I wonder if maybe there's another cron definition invoking the script? You could try commenting out the line that tries to invoke
/usr/sbin/systemInfo/timeAlive
in/usr/sbin/systemInfo/getAll
to see if that error is what's getting there, but I have the same line in the device I'm looking at and it doesn't produce/var/mail/mail
contents. That definitely looks a lot like what was happening when the output of the cron job was not being redirected to/dev/null