SD card seems to be full

Back again sorry. For some reason there is only 80 meg left on the SD card. No idea why. I am not running a camera although I did have the timelapse active. There were no files in the timelapse. I cleared out old print files. Can anyone point me to what might be taking up all of the space. Thank you!
No description
37 Replies
fair-rose
fair-roseOP14mo ago
Not sure if this helps. As it's printing the availability of memory is going down steadily but no idea why.
Oskait
Oskait14mo ago
you could plug the sd card into you PC to check, or use something like MobaXterm that gives you an ssh session into your pi along with a file browser, so you can click through. Also you could Try to reset the logs, however I doubt that they take up 50 gigs
fair-rose
fair-roseOP14mo ago
Ok. Ill give it a shot.
blacksmithforlife
Ssh into the pi and run du -sh /* that will tell you where in the beginning of the filesystem is taking so much space. Print out the output here so we can help more
fair-rose
fair-roseOP14mo ago
Okay. I will see if I can recall how to do that! I am not that good with that kind of thing but I think I have some software. Its one of those irregular tasks. Hopefully I did not do something dumb like change the password on the Pi
fair-rose
fair-roseOP14mo ago
No description
fair-rose
fair-roseOP14mo ago
When I tried the first command I got some strange messages I then just used du -sh * and got the listed files Nothing seems to be very big tho
blacksmithforlife
That's because you are in your home directory. You need to cd / first then run du -sh *
fair-rose
fair-roseOP14mo ago
I did the command cd / and then ran it and it say permission denied
blacksmithforlife
You need to run as sudo sudo du -sh *
fair-rose
fair-roseOP14mo ago
I ran that but its still saying the same read thing I tried this du -f sorry it was df -h It shows /dev/root as used 56g Sudo du -sh just says du: cannot access Sorry for being dim. I really appreciate your help it will let me cd to dev using cd dev/ but there is nothing in there. It won't let me then cd root/
fair-rose
fair-roseOP14mo ago
No description
blacksmithforlife
No, just cd / /dev/root is the filesystem Show us a screenshot of sudo not working
fair-rose
fair-roseOP14mo ago
No description
fair-rose
fair-roseOP14mo ago
It behaved different this time I presume its 50G var?
fair-rose
fair-roseOP14mo ago
Just be this
No description
blacksmithforlife
Yes, so now go into var and run the du command again Keep doing that until you find the file(s) that are causing the space issue
fair-rose
fair-roseOP14mo ago
I did that its this file called log
fair-rose
fair-roseOP14mo ago
No description
fair-rose
fair-roseOP14mo ago
I think Sorry Forgot the Sudo
fair-rose
fair-roseOP14mo ago
No description
fair-rose
fair-roseOP14mo ago
Its this log file. 49G.... so the question is.... please Sir.. how does one a) clear this file and then b) prevent it from getting to be this massive in the first place?
blacksmithforlife
You sure log isn't a directory?
Oskait
Oskait14mo ago
/var/log/ certainly is a directory (on my system) run it in the log directory again?
fair-rose
fair-roseOP14mo ago
I will check. Just had to run out to grab my kids. I'm not sure of any of this lol. So cd log/ then sudo du -sh* again. Thanks for sticking with me!
fair-rose
fair-roseOP14mo ago
Okay
No description
fair-rose
fair-roseOP14mo ago
Looks to be twin culprits... 1) kern.log and 2) syslog When I first started using the machine I was trying to configure a timeplapse which I did but in the end I stopped using it and removed the camera. I have a feeling that this is somehow linked to all this. Okay! So I am at least learning something with this mystery... I found this command via google. sudo tail /var/log/messages
fair-rose
fair-roseOP14mo ago
No description
fair-rose
fair-roseOP14mo ago
Is it by any change continually trying to start a timelapse, failing and then logging this is the system file?
fair-rose
fair-roseOP14mo ago
No description
fair-rose
fair-roseOP14mo ago
This is from the other two Corrupted directory does not sound good I have backed up my config file. Is there anything else you recommend me do. I have a feeling that my SD card might be on the way out if this is the case. I can presumably clear or delete these files but they will just return correct? [include timelapse.cfg] #Test to see if the timelapse is enabled? If I comment out this will it disable any timelapse stuff?
blacksmithforlife
Correct. You might be able to buy some more time if you format the SD card as that will mark the bad sectors and work around them. But ultimately SD cards are a consumable and will need to be replaced
fair-rose
fair-roseOP14mo ago
Okay. I have no problem buying a new SD card. Is there a way to clear the logs to keep using the printer in the meantime. It might be a while before I can schedule time to do a complete do over. Is it just the config file that I need to save or should I be saving anything else?
blacksmithforlife
clearing the logs: * run sudo rm /var/log/kern.log * run sudo rm /var/log/syslog what is needed to save: * your printer.cfg for sure * any other files you modified or added Optional: * some people really like the stats and such from mailsail, so you can export them and import then into your next install if you want (don't ask me how, I haven't done it. But if you search on this discord I think some have)
fair-rose
fair-roseOP14mo ago
Thank you. I would have been pulling my hair out if not for your kindness. I am not sure how I can repay you but I will for sure pass it forward and do my best to help others where I can. Once I am done I will put a summary of what happened here and what I did so that it can be found if anyone else runs into this.
blacksmithforlife
glad I could help - paying it forward is the best we can do (it is how I have learned all of this)
Want results from more Discord servers?
Add your server