Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disc Space at 100% #127

Closed
danazc77 opened this issue Dec 23, 2020 · 17 comments
Closed

Disc Space at 100% #127

danazc77 opened this issue Dec 23, 2020 · 17 comments

Comments

@danazc77
Copy link

I installed the base version of Raspberry Pi OS when setting up Inventory-Hunter. I am using a 16gb SD card on a raspberry pi 3. After getting this program set up and updating the OS, I had almost 8 gb of unused space. After running this program for 2 days I am out of space and used 100% of my 16gb. Is there a way to clear the cache or stopping it from using so much disc space? I do a df -h command and I am at all 16gb used in the /dev/root directory. Thoughts??

@bluecow82
Copy link

You're lucky. I have the 32gb card on a Pi 4, and running 6 images, it fills up after about 3 hours. I started being more selective with the links I'm having it check, but I have a feeling it has something to do with the Chromium issue detailed at #120 . Haven't been able to figure out a fix yet, hoping someone comes up with an idea.

@danazc77
Copy link
Author

So how do you clear up space again? I cant imagine I have to reinstall raspberry pi OS every few hours and reinstall docker snd this code. Is there a command to run to delete the stored caching??

@EricJMarti
Copy link
Owner

When you run inventory-hunter, it should create a data and log directory. Can you tell me how large these two directories are? I suspect that something is logging extensively.

@danazc77
Copy link
Author

Log folder is at 22.2 Mb
Data folder is at 2.5 Mb

I have reinstalled the OS 3 times now because after a day it fills up the 16 gb card. On initial set up I usually have around 7-8 gb left after installing OS and Inventory Hunter. Not sure what is getting stored literally in hours to fill up a 16 or 32 gb card. I cant even open a browser window now since there is no storage left. As a side not inventory hunter is literally the only program on the OS as there are all fresh OS installs.

@danazc77
Copy link
Author

danazc77 commented Dec 23, 2020

I noticed outside of inventory hunter in the Proc folder there are thousands of folders. Is this normal??

@danazc77
Copy link
Author

Uploading E0B0005D-7163-4B62-9E14-E2C4E4CD78B5.jpeg…

@bluecow82
Copy link

So how do you clear up space again? I cant imagine I have to reinstall raspberry pi OS every few hours and reinstall docker snd this code. Is there a command to run to delete the stored caching??

Stopping all the docker images appears to get rid of all that temporary data. The I just restart them.

@bluecow82
Copy link

When you run inventory-hunter, it should create a data and log directory. Can you tell me how large these two directories are? I suspect that something is logging extensively.

The files that grow (at least on my end), are located here:

root@raspberrypi:/home/pi# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        27G   27G     0 100% /
devtmpfs        3.8G     0  3.8G   0% /dev
tmpfs           3.9G     0  3.9G   0% /dev/shm
tmpfs           3.9G  394M  3.5G  10% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           3.9G     0  3.9G   0% /sys/fs/cgroup
/dev/mmcblk0p6  253M   54M  199M  22% /boot
tmpfs           788M  4.0K  788M   1% /run/user/1000
overlay          27G   27G     0 100% /var/lib/docker/overlay2/ab433ae4dbf140bd0e8a2976d99881c2b2129975b47b0ecd1df97885034600e4/merged
overlay          27G   27G     0 100% /var/lib/docker/overlay2/ab59418956171e5e3f495312014a039b4d1e80ae20bf864d476298f794f49ecf/merged
overlay          27G   27G     0 100% /var/lib/docker/overlay2/5ee33b15f822cdffc3f53b4f1a2417fc2cc72f9662e2a4e8b54c82083e41258e/merged
overlay          27G   27G     0 100% /var/lib/docker/overlay2/546f6ecbafcae22ef4b663cd61278ff6fdc8bac6ea1d440ad06c325b234e7e5e/merged
overlay          27G   27G     0 100% /var/lib/docker/overlay2/50eca644c55c14fe8ab4b6098434d344cfe2d5047e14e16c38540f0203c10fa7/merged
overlay          27G   27G     0 100% /var/lib/docker/overlay2/211a23b7155312c8ff45a674dbdc6e0fbf3f7cd624580cdb7fc0dbe4da3040fd/merged

@bluecow82
Copy link

It appears I found a way to slow this down dramatically, by disabling the Boot to Desktop function of the Pi.
It also cleared up the Chromium issue (#120), tho the XSERV issue (#126) still persists.
Of course, this is only useful if you can do without the Desktop.

@danazc77
Copy link
Author

How do you turn off boot to desktop. Works for me. I access via ssh anyways.

@bluecow82
Copy link

bluecow82 commented Dec 24, 2020

sudo raspi-config
Option 1, then Option S5. (for me at least)

I still plan on having cron stop all the docker images and restarting them once a day, just in case. Better than having it do it every couple of hours tho

@danazc77
Copy link
Author

@bluecow82 How do you set it up to auto restart the dockers each day so I don't have to do it manually? THanks for all your help by the way.

@bluecow82
Copy link

I created a bash script that runs the processes I want to run and one that stops them. Then I use cron:
$ crontab -e
If you just want a quick restart of the processes, you can do something like:
30 2 * * * ./inventory-stop && ./inventory-start , where inventory-stop and inventory-start are the two bash scripts. This makes all the processes stop and then start, each day at 2:30AM.

@danazc77
Copy link
Author

Ok thanks but that seems to be more complicated than I had hoped for. I will just do it manually. I just did it and yes over 7gb unused for now.

@ShepLT1
Copy link

ShepLT1 commented Dec 28, 2020

Any fixes for this that still allows the use of Desktop? From my log directory txt files it seems like Amazon and Bestbuy containers are the culprit as they are experiencing the chromium error

@EricJMarti
Copy link
Owner

Can you try again with the latest image?

I undid a recent change I made that I think is causing this issue: 121c4c5

@ShepLT1
Copy link

ShepLT1 commented Dec 29, 2020

Can you try again with the latest image?

I undid a recent change I made that I think is causing this issue: 121c4c5

That did the trick! Thanks Eric

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants