[SOLVED] RasPBX out of storage

So I have a Raspberry Pi that runs our phone system comprising of about 6 phones. It is constantly giving me an error that it runs out of storage making me re-install the whole thing. Can I clear files so it can go back to functioning correctly. (Ex clearing call logs etc…) I have to reinstall the img. every 2 weeks. Does anyone know of a fix?

How big is your sd card?

Possible solutions
get a bigger sd card
Arrange for logrotate the asterisk logs daily and only retain 1 day.
Arrange that /var/log/ directory is placed in shared memory (shm)
install and configure logwatch , you will be informed when the disk is getting full
Use an external ssd usb drive

SD card is 8gb, how would I go about setting it up to clear the logs daily?

man logrotate

1 Like

That is way too small an SD card to use - Make your life easier - at least 32G for any size install of FreePBX - We have standardized on 64G for both our Virtual installs and Physical SSD installs - less than that and eventually you will be running out of space.

But seriously, on a raspi, writing anything to the sd card will kill your sd card sooner rather than later, and the biggest culprit is log files, write all logs to /dev/shm and you are better off but loose some post mortem diagnostics, see any raspi forum for the howto’s especially the raspbx one.

Boy, you know it - Nerd Alert - my FERVENT fantasy as far as RasPi is that they add two SATA connectors to the board - that would be PERFECT as a basic SoHo PBX - I got very excited, set up a Pi as server and within a month, it crashed because the SD card was worn out from all the logging - of course, we were pounding on it to test, so that didn’t help either.

There is a way to move all of the logging/etc off to USB but it is a little fiddly - but it is doable if you are determined.

Man, a Pi with two SATA Ports would be SO FREAKIN USEFUL!

There are many ‘competitors’ to the raspi , some with what you want, I use for a couple bucks extra a lattepanda

$89 from some places, emmc memory , a full amd64 processor and an on board arduino for integration with your ‘smart home’ , how about plex or kodi PLUS a FreePBX server screen popups of callerID on your TV?

For a less nerdy replacement ,

and just boot it with a FreePBX ‘distro’ ?

Those are both nice - it’s my cheap-soul that looks at a RasPi under $40 and says “If only…”

I will check both of those out.

Upside < $40 + a case + heat sinks + an SD card = probably closer to $80

Downside , 1G ARM, no Commercial Modules (even sysadmin), need to boot to an external SSD (USB’s have the same probs as SD’s)

I will definitely get a new card, however for now, clearing logs once a week or when needed should be fine.

That’s exactly what logrotate does, just set it up as you want and it will clear the logs for you.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.