autopower / thermeq3

Boiler actor device for ELV/EQ-3 MAX! cube
GNU General Public License v3.0
19 stars 13 forks source link

Saving thermeq3.bridge to internal flash #17

Closed bilbolodz closed 7 years ago

bilbolodz commented 7 years ago

Is it a good idea to save thermeq3.bridge file on internal flash? It has "limited" number of writes (probably there is no anti wearing controller on Yun). Maybe it should be a) moved to SD card b) "saved in memory" at from time to time synced to other media (SD card?)

autopower commented 7 years ago

you can simple move it to the SD card, just find out this line in thermeq3.py: self.bridge_file = "/root/" + self.devname + ".bridge" and change to path you need.

bilbolodz commented 7 years ago

Yes I know but I'm talking about "general solution" (without needs to change code after upgrade). Maybe it's enough to make a symbolic link. How long are you running your software on Yun? Have you ever problems with errors on internal flash?

autopower commented 7 years ago

just from the beginning of the project, its about 3 years? Where is the /var/log stored? Logs are heavily modified files, if logs are stored on internal flash, so I don't expect problems with /root directory. Am I wrong?

bilbolodz commented 7 years ago

Are you sure about logs: root@Arduino:~# ls -l /var/log/ -rw-r--r-- 1 root root 0 Dec 11 20:32 lastlog -rw-r--r-- 1 root root 0 Dec 11 20:32 wtmp ? (fresh Yun install just thermeq3 software)

From: https://www.arduino.cc/en/Guide/ArduinoYun

External storage on the Yún You're discouraged from using the Yún's built-in non-volatile memory, because it has a limited number of writes.

bilbolodz commented 7 years ago

Maybe it's better to put it on tmpfs (/tmp) and save "backup" at SD card?

autopower commented 7 years ago

I'm not sure, just brainstorming

bilbolodz commented 7 years ago

I I've made a symlink but it's also possible move whole / filesystem on SD card: https://bitbucket.org/unitn/yuntricks/wiki/Setup%20Overlay%20filesystem