I noticed that all of my inodes were used up and after some digging around I found that nearly all of them are used by the syncthin database:
pi@raspberrypi-syncthing:~/.config/syncthing $ echo "Detailed Inode usage: $(pwd)" ; for d in `find -maxdepth 1 -type d |cut -d\/ -f2 |grep -xv . |sort`; do c=$(find $d |wc -l) ; printf "$c\t\t- $d\n" ; done ; printf "Total: \t\t$(find $(pwd) | wc -l)\n" Detailed Inode usage: /home/pi/.config/syncthing 1778389 - index-v0.14.0.db Total: 1778397
As a sidenote I have an external drive connected to the pi where I store the synced data. The config directory for syncthing however still lies on the SD-card for simplicity reasons.
My syncthing configuration directory looks like this:
pi@raspberrypi-syncthing:~/.config/syncthing $ ls -lh total 51M -rw-r--r-- 1 pi pi 615 Feb 10 2018 cert.pem -rw------- 1 pi pi 14K Oct 13 13:56 config.xml -rw------- 1 pi pi 825 Oct 13 12:30 csrftokens.txt -rw-r--r-- 1 pi pi 1.1K Feb 10 2018 https-cert.pem -rw------- 1 pi pi 1.7K Feb 10 2018 https-key.pem drwxr-xr-x 2 pi pi 51M Oct 13 22:49 index-v0.14.0.db -rw------- 1 pi pi 288 Feb 10 2018 key.pem -rw-r--r-- 1 pi pi 94K Oct 7 04:08 panic-20191007-040808.reported.log
panic-20191007-040808.reported.log seems to have come after I updated syncthing to
v1.3.0 and it started to run out of memory (I increased the swapsize to fix this). Paste of the log can be found here.
Is there a way to reduce the inode usage again or should I just scrap the database and rebuild it?