Beaglebone Black eventually fills disk

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
akamediasystem
 
Posts: 79
Joined: Tue Apr 30, 2013 1:38 pm

Beaglebone Black eventually fills disk

Post by akamediasystem »

Hi, I've been working with BBB for awhile now but this has me stumped:

I'm running ordinary stuff on a BBB (tornado, redis, no external hardware, beefy 5V 4A power supply). After a month or two of fine performance, redis stopped allowing connections. I ran

Code: Select all

df -h
and saw this:

Code: Select all

root@curriculum:/opt/scripts/tools# df -h
Filesystem      Size  Used Avail Use% Mounted on
rootfs          7.3G  7.2G     0 100% /
udev             10M     0   10M   0% /dev
tmpfs           100M  9.6M   90M  10% /run
/dev/mmcblk0p2  7.3G  7.2G     0 100% /
tmpfs           249M     0  249M   0% /dev/shm
tmpfs           249M     0  249M   0% /sys/fs/cgroup
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           100M     0  100M   0% /run/user
/dev/mmcblk0p1   96M   81M   16M  84% /boot/uboot
...so I googled around to figure out how to see the largest files, and got this:

Code: Select all

root@curriculum:/opt/scripts/tools# du -a /var | sort -n -r | head -n 10
205900	/var
100160	/var/lib
66528	/var/cache
60168	/var/cache/apt
38136	/var/log
35164	/var/lib/apt
35100	/var/lib/apt/lists
33408	/var/lib/dpkg
30080	/var/cache/apt/srcpkgcache.bin
30076	/var/cache/apt/pkgcache.bin
...so it seems like logging and my apt cache are getting too big. However, I tried deleting some stuff (log files that were old, gzipped log files, running apt-get autoclean) and saw virtually *no* change in the disk usage. I'm a little confused as to how to manage this, and would love help with the following questions:

* why does only this BBB have this issue? I'm running 4 other BBBs in very similar setups and only this one has filled up (the only special thing about this one is that it's the only BBB i have ever gotten wifi working on, despite literally 20-odd hours trying to get it to work on others)
* what is the best way to solve my problem so it won't recur?
* Why are my deletions not appearing to change the output of

Code: Select all

df -h
?

Any tips or help would be much appreciated!

AKA

PS, running

Code: Select all

uname -a
on my machine yields:

Code: Select all

Linux curriculum 3.8.13-bone71 #1 SMP Tue Mar 17 18:07:44 UTC 2015 armv7l GNU/Linux

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Beaglebone Black eventually fills disk

Post by adafruit_support_mike »

The files shown in the listing are only about 30 meg, so removing them wouldn't have much effect on the overall storage.

Try this combination:

Code: Select all

sudo du -am / >sizes
sort -rn sizes >sizes2
less sizes2
The first line returns file sizes in megabytes and writes them to a file. The second line sorts that file numerically, putting the largest items at the top. The last one displays the sorted file so you can scan up and down through it. If you aren't familir with `less`, the spacebar scrolls forward one page, the 'b' key scrolls back one page, and 'q' exits the program.

That will give you a complete view of the filesystem, not just the /var file tree.

User avatar
akamediasystem
 
Posts: 79
Joined: Tue Apr 30, 2013 1:38 pm

Re: Beaglebone Black eventually fills disk

Post by akamediasystem »

My apologies for the delayed reply - thanks so much for your response!

I tried the steps you suggested and ended up seeing a million little ~1MB git/object files - this is really weird to me because I've been deploying all my stuff with git for a year now and haven't had this issue.

I think I'm going to just wipe the BBB and start over (yay git for making this easy!). If I continue to run into this issue, I'll update here with any other info (in case others are having this problem)

Thanks again for your help!

AKA

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Beaglebone Black eventually fills disk

Post by adafruit_support_mike »

Ah..

Yeah, git can be a disk hog. All the deltas and branch files rack up pretty fast.

Locked
Please be positive and constructive with your questions and comments.

Return to “Beagle Bone & Adafruit Beagle Bone products”