New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

Why is /dev/sda1 full?

Got problems with your B2 or B3? Share and get helped!
Post Reply
ahoff
Posts: 105
Joined: 01 Apr 2008, 20:50
Location: Swe

Why is /dev/sda1 full?

Post by ahoff »

ahoff@b3:~$ df -h
Filsystem Storlek Anvnt Tillg Anv% Monterat på
/dev/sda1 9,9G 4,1G 5,3G 44% /
tmpfs 252M 0 252M 0% /lib/init/rw
udev 10M 148K 9,9M 2% /dev
tmpfs 252M 4,0K 252M 1% /dev/shm
/dev/mapper/bubba-storage
907G 357G 504G 42% /home

ahoff@b3:~$ df -i
Filsystem Inoder IAnv IFria IAnv% Monterat på
/dev/sda1 655360 655360 0 100% /
tmpfs 64379 6 64373 1% /lib/init/rw
udev 64379 456 63923 1% /dev
tmpfs 64379 3 64376 1% /dev/shm
/dev/mapper/bubba-storage
60334080 919909 59414171 2% /home
ahoff@b3:~$


ahoff@b3:~$ mc
Kan inte skapa temporär katalog /tmp/mc-ahoff: Enheten är full (28)
Åke Hoff
Örskogen
Sweden
Gordon
Posts: 1461
Joined: 10 Aug 2011, 03:18

Re: Why is /dev/sda1 full?

Post by Gordon »

What is the number returned from this command?

Code: Select all

find /root/Mail | wc -l
ahoff
Posts: 105
Joined: 01 Apr 2008, 20:50
Location: Swe

Re: Why is /dev/sda1 full?

Post by ahoff »

root@b3:~# find /root/Mail | wc -l
596048
root@b3:~#
Åke Hoff
Örskogen
Sweden
nobody
Posts: 226
Joined: 10 Mar 2012, 14:46

Re: Why is /dev/sda1 full?

Post by nobody »

This is a known annoyance. To make things more complex you cannot delete 500000 with a simple 'rm -f /root/Mail'

The rpblem is you have a process that keeps on emailing you because something went wrong. You need to find out what that process is or else you'll see the same issue again next month

If you type

Code: Select all

mail
you go to roots mailbox and you can read which process is misbehaving.

To remove all e mails, imo the simplest solution is

Code: Select all

cd /root
mv Mail Mail-ori
mkdir Mail
rm -rf /root/Mail-ori
You wont throw awat any important emails
ahoff
Posts: 105
Joined: 01 Apr 2008, 20:50
Location: Swe

Re: Why is /dev/sda1 full?

Post by ahoff »

root@b3:~# mail
temporary mail message file: Enheten är full


mv Mail Mail-ori
root@b3:~# ls
bubba-horde bubba-notify Mail-orig
root@b3:~# rm -rf /root/Mail-ori

root@b3:~# mkdir Mail
mkdir: kan inte skapa katalog "Mail": Enheten är full

I seam to be in som kind of catch-22
Åke Hoff
Örskogen
Sweden
ahoff
Posts: 105
Joined: 01 Apr 2008, 20:50
Location: Swe

Re: Why is /dev/sda1 full? [Solved]

Post by ahoff »

I remove them litle by litle...

root@b3:~/Mail-orig/new# rm -f 134189544*
root@b3:~/Mail-orig/new# rm -f 13471554*
root@b3:~/Mail-orig/new# rm -f 134715*
root@b3:~/Mail-orig/new# rm -f 13471*
root@b3:~/Mail-orig/new# rm -f 1347*
root@b3:~/Mail-orig/new# rm -f 134*

Thank you :-)
Åke Hoff
Örskogen
Sweden
nobody
Posts: 226
Joined: 10 Mar 2012, 14:46

Re: Why is /dev/sda1 full?

Post by nobody »

It did not work because you made a typo between orig and ori. But good that you cleaned up. Now find out what is causing this misery :D
Gordon
Posts: 1461
Joined: 10 Aug 2011, 03:18

Re: Why is /dev/sda1 full?

Post by Gordon »

I don't know if the Excito guys fixed this, but running `mail` command says there's no mail on my B3. This is because the MAIL environment setting is wrong (it's pointing at /var/mail/root). To run mail you should enter the following command:

Code: Select all

MAIL=/root/MAIL/  mail
Obviously with 500.000+ emails you won't like what you'll see and it will be very hard to figure out what is important. With that many emails you can be assured however that the offending process will keep on sending these messages and it will be safe enough to delete all the old messages without reading them.

If you want an easier way to read/sort/organize the emails I recommend that you add an alias for root to admin. You can then use your preferred email application to log on to admin's mailbox (I use Thunderbird myself but many others will also allow you to configure multiple mailboxes). An added bonus is that the Storage partition where admin's home folder is located is less vulnerable to the issue.
ahoff
Posts: 105
Joined: 01 Apr 2008, 20:50
Location: Swe

Re: Why is /dev/sda1 full?

Post by ahoff »

I had 3 cronjobs runing that coused the whole thing. It's been taken care of by adding >/dev/null 2>&1 in crontab like this:

Code: Select all

# m h  dom mon dow   command
*/2.5 * * * *           /home/ahoff/bin/get_temp.sh >/dev/null 2>&1
*/2.5 * * * *           export LANG=sv_SE.utf8 && /home/ahoff/bin/graph_temp.pl >/dev/null 2>&1
*/2.5 * * * *           /home/ahoff/bin/graph_el.sh >/dev/null 2>&1
Now no more mail :P .
If you want an easier way to read/sort/organize the emails I recommend that you add an alias for root to admin. You can then use your preferred email application to log on to admin's mailbox (I use Thunderbird myself but many others will also allow you to configure multiple mailboxes). An added bonus is that the Storage partition where admin's home folder is located is less vulnerable to the issue.
Tanks for the tip.
Åke Hoff
Örskogen
Sweden
toukie
Posts: 115
Joined: 13 Jan 2012, 12:22

Re: Why is /dev/sda1 full?

Post by toukie »

I wouldn't threaten with tanks for such good piece of advice! :mrgreen:
Post Reply