hello,
I have the issue, that I run out of space on my sd card wit hraspberry. I have 16GB card, it happens after I added smartmeter to read the IR from my smartmeter at home. I put a debug node behind it and didnt deleted. Everything worked so far, but today I wanted to make some adjustments and it says there is no space left. I thought maybe a new start of raspberry will delete the cashe or something, but now my raspberry wont boot and I am afraid to lose all my flows.
Is there a way to boot raspberry with 0kb space left?
Is there a way to recover my flows?
Do debug or to much reading some nodes use space on sd?
Debug nodes do not as a rule store any information anywhere on disk.
If you enable the system console option the it will also output what ever was sent to the node to the Node-RED log. Depending on how you have instaledl and configured Node-RED it is possible that this has driven the disk usage. (It appears that the default journald file size is set to 10% of total disk space, so unlikely)
As for working out what is using the space, your best bet is to mount the card on another linux machine (Unless you install extra drivers I don't beleive you can not read the card directly from Windows, thought you might be able to use WSL).
Once you have mounted the card you should be able to recover the flows/settings/creds from /home/pi/.node-red
Thank you very much so far. I managed to install ubuntu on virtualbox and to read the files stored on the sd. So when I clear some space, raspi should manage to boot again, right? Where can I find node-red log? Can I just delete this log file?
On your ubuntu machine install ncdu sudo apt install ncdu
Than go into the top level directory of the card and run sudo ncdu .
That is a dot on the end. Wait for it to complete (which will probably take a few minutes on an SD card) then it will show you where the large directories are.
Find out exactly what the files are before you delete them. All log files generated by installed apps should rotate so a sequence of files is used and old ones are deleted. If that is not working for something then you need to know what it is in order to fix the problem. Otherwise it will just happen again.
I used this comman ncdu for var/log folder, because for whole card it takes a while. I found out first, that my log files are 10gb huge. The largest file is daemon.log with 4,3gb and the second is syslog.1 with 3,6gb.
Why are they so large, how could I prevent them getting this big?
Mar 13 00:00:02 raspberrypi Node-RED[351]: NEW DATA
Mar 13 00:00:02 raspberrypi Node-RED[351]: CURRENT PROCESS STEP 4 IN CHECKMESSAGE
Mar 13 00:00:02 raspberrypi Node-RED[351]: MATCH-RESULT DATA: "\r\n1-0:0.0.0*255(0273260481404)\r\n1-0:1.8.0*255(00012911.0592
550*kWh)\r\n1-0:21.7.0*255(000093.80*W)\r\n1-0:41.7.0*255(000014.45*W)\r\n1-0:61.7.0*255(000012.70*W)\r\n1-0:1.7.0*255(000120.
95*W)\r\n1-0:96.5.5*255(80)\r\n0" -> null
Mar 13 00:00:02 raspberrypi Node-RED[351]: NEW DATA
Mar 13 00:00:02 raspberrypi Node-RED[351]: CURRENT PROCESS STEP 4 IN CHECKMESSAGE
Mar 13 00:00:02 raspberrypi Node-RED[351]: MATCH-RESULT DATA: "\r\n1-0:0.0.0*255(0273260481404)\r\n1-0:1.8.0*255(00012911.0592
550*kWh)\r\n1-0:21.7.0*255(000093.80*W)\r\n1-0:41.7.0*255(000014.45*W)\r\n1-0:61.7.0*255(000012.70*W)\r\n1-0:1.7.0*255(000120.
95*W)\r\n1-0:96.5.5*255(80)\r\n0-" -> null
I was scrolling for about 30 seconds and still on second 2.
Do you recognise those messages? Are they coming from a debug node which is set to log to the console? If so then it looks as if you may be stuck in a loop in the flow continually hitting that output.
You can see from the sequence of files for daemon.log that it is rotating the files ok, it is just that you are outputing a vast amount of information to it. You can delete those big files then the pi should boot again, then work out why node-red is, apparently, stuck in a loop. If you have trouble getting into node red because it is all clogged up writing that data then stop node-red and start it again using node-red --safe
which will start the editor without starting the flows. You can then edit the flows and they will start when you deploy.
this data I got in daemon.log looks like the date I get from my IR head, that I placed on my smartmeter. It looks like it communicate all the time and store everything in the log files.
I use smartmeter node with 1 sec. poll rate and yes it was shown in the debug node, also I put it on my dashboard.
I didnt noticed, that node red is slow or something. Everything worked fine. Even today when I had zero space, I was able to edit the flows, but I could not deploy, because I had no space.
and is it showing exactly the messages that you see in syslog? The format of the data does not look correct for a debug node. Try disconnecting the wire to the debug node and see if it stops outputting to the file. Is suspect it is not the debug node that is writing that.
Once you have the Pi running again then you can watch the file by running tail -f /var/log/daemon.log
How exactly is the meter being read ? Is it an external app being called that returns a value ? I would guess whatever is reading the data is what is writing to that log file.
I have my pi running again, thank you for your help. I deleted deamon.log and I am diconected from the reader-head now. I will connect tomorrow and check again.
but this is was the returned data I was using from the node:
Have you got anything in your flow that outputs a message like that? Use the menu search feature to search for
CHECKMESSAGE
and see if it finds anything. That will tell you whether it is coming from something explicit in your flows.
Sry Colin, I dont know what I got to see with the link you sent. I'm not norwegian and dont have this smartmeter. I'm in Germany and using Easymeter. Also I dont use any 3rd party software or programms or scripts. Only this node, I've mentioned before.