OpenEnergyMonitor Community

EmonPI Drive Space

Can we address the disk space on the current image. once again the / partion has ran out of space.


I have 21G free on /var/opt/emoncms

What are you writing to the root partition? Not data hopefully as that will kill the SD Card.

Do you have something other than emonCMS installed?



sudo du -a / | sort -n -r | head -n 20

to find the largest files.

I have got an open PR on the emonScripts repo that will fix the script install such that it allocates 10GB as the data partition on disks over 16GB.

This will not affect emonSD installs - the root partition is fixed in the image.

nothing else installed. they was a backup file in /opt/openenergymonitor/data

Ah, that has changed (for just this reason) but perhaps not been percolated through in the updates @TrystanLea?

edit the backup config file /opt/emoncms/modules/backup/config.cfg

Mine looks like this

# Emoncms Export and Import scripts config file


# These settings are used for both the export and import scripts.
# To export from one location and import into another
# Used by both PHP and Bash and comments are not ignored

# Change all capitalised placeholders to relevant locations

# user


# Directory location of Emoncms

# Destination location of exported backup .tar.gz - Must be writable

# location of phpfina phpfiwa and phptimeseries databases

# Location of emonhub.conf - leave blank if backup not required

# Location of specimen emonhub config

# Location of compressed backup data to import .tar.gz

you may need to adjust permissions

[email protected]:/opt/emoncms/modules/backup $ ls -la /var/opt/emoncms/
total 21
drwxr-xr-x 7 root     root  1024 Jan 22 17:16 .
drwxr-xr-x 3 root     root  4096 Oct 17  2019 ..
drwxr-xr-x 3 pi       pi    1024 Mar 27 18:36 backup
drwx------ 2 root     root 12288 Oct 17  2019 lost+found
drwxr-xr-x 2 www-data root  1024 Apr 16 06:38 phpfina
drwxr-xr-x 2 www-data root  1024 Oct 17  2019 phpfiwa
drwxr-xr-x 2 www-data root  1024 Oct 17  2019 phptimeseries
[email protected]:/opt/emoncms/modules/backup $ ls -la /var/opt/emoncms/backup
total 9272
drwxr-xr-x 3 pi       pi      1024 Mar 27 18:36 .
drwxr-xr-x 7 root     root    1024 Jan 22 17:16 ..
-rw-r--r-- 1 pi       pi   9433622 Mar 27 18:35 emoncms-backup-2020-03-27.tar.gz
-rw-r--r-- 1 pi       pi     18131 Mar 27 18:35 emoncms.sql
drwxr-xr-x 2 www-data pi      1024 Jan 22 17:16 uploads

I think it relates to the old location and the bug.

I still dont understand why the / cannot be the whole size of the SD card. and yet /var/opt/emoncms can!

Quite a lot of work went into making the SD card life as long as possible.

The data partition is therefore a different format to maximise the life of the card, the emonSD image is designed for use with emonCMS - if you want a multiuse image, install emoncms with the emonScripts but leave out the partition part of the setup.

However, you run the risk of the card failing early.

As I said, there is a modification such that the data partition will be limited to10GB in future.