ramdisk problem after upgrade to 2020.1

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
insectteam
Posts: 2
Joined: Monday 23 March 2020 17:03
Target OS: -
Domoticz version:
Contact:

ramdisk problem after upgrade to 2020.1

Post by insectteam »

Hello everyone!

Until now, I used ramdisk ( ramdrive)to protect the SD card from quick damage. Today after upgrading to the stable version 4.2020 domoticz started with an "empty" database (luckily I had a backup). Provided to restore the backup but it did not help clean installation of Domoticz and it worked 😄 ... but the joy did not last too long because editing the domoticz.sh file to start the ramdisk again, restart the system and again the lack of database and domoticz says that there is an update available though I just installed it (before trying to make ramdisk)

Here is a great request and question - how to start ramdisk in the new version (4.2020) or how to protect the SD card against a quick "death" due to a large number of records ??? Unfortunately, Rpi is so built-up that I have no space for an SSD drive and I have to do everything on SD.

I forgot to add that I have this situation both on RPi 4 and RPi2 so I know it is not a matter of chance ... in both after a clean installation of Domoticz and restoring the database everything works - adding in /etc/init.d/domoticz.sh :
DAEMON_ARGS = "$ DAEMON_ARGS -log /tmp/log/domoticz.log -loglevel normal"

and

ln -sf /tmp/log/domoticz.db-shm / home / pi / domoticz
ln -sf /tmp/log/domoticz.db-wal / home / pi / domoticz

it breaks everything

Thank you in advance for your help
Daniel
Logread
Posts: 228
Joined: Sunday 28 August 2016 7:48
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: France
Contact:

Re: ramdisk problem after upgrade to 4.2020

Post by Logread »

It seems that recent versions of domoticz no longer allow these symbolic links due to updated sqlite version. Unfortunate but this is it.
insectteam
Posts: 2
Joined: Monday 23 March 2020 17:03
Target OS: -
Domoticz version:
Contact:

Re: ramdisk problem after upgrade to 4.2020

Post by insectteam »

... then is there any effective method to protect the SD card from damage? Until now, ramdisk gave me a sense of security - previously I changed cards every 3-6 months
jake
Posts: 742
Joined: Saturday 30 May 2015 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Contact:

Re: ramdisk problem after upgrade to 4.2020

Post by jake »

Wow, that's a bummer. We can't use a ram drive for extensive logging anymore? That would be a severe degradation of our setup. I quickly read the changes and I didn't see this one being mentioned.
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: ramdisk problem after upgrade to 4.2020

Post by waaren »

jake wrote: Wednesday 25 March 2020 14:30 Wow, that's a bummer. We can't use a ram drive for extensive logging anymore? That would be a severe degradation of our setup. I quickly read the changes and I didn't see this one being mentioned.
You can stil use ram drive but you cannot use symbolic links for sqlite database write ahead log and shared memory files (extension db-wal and db-shm )
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
piotrm
Posts: 7
Joined: Thursday 15 August 2019 22:15
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: ramdisk problem after upgrade to 4.2020

Post by piotrm »

Is there any other way to save both files (db-wal and db-shm) to RAM in the new Domoticz version?
wifiminime
Posts: 4
Joined: Thursday 18 May 2017 22:06
Target OS: Linux
Domoticz version:
Contact:

Re: ramdisk problem after upgrade to 2020.1

Post by wifiminime »

Hi,

Is there already a solution to somehow move domoticz.db-shm and domoticz.db-wal to a ramdrive?
Or is this definitely a no go?? It seems that there is no solution to prevent SD card damage due to these files...
jake
Posts: 742
Joined: Saturday 30 May 2015 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Contact:

Re: ramdisk problem after upgrade to 2020.1

Post by jake »

In another topic about this problem it is described that having the file in RAM has the possibility that the database will be corrupted during a power outage, because not all data is than written to the .db itself.
For myself, I would be happy to see the RAM-disk as an option/parameter within Domoticz and decide for myself to take the risk. Thinking about it, it must always have been an option, because I used to have no RAM-disk before and enabled both the RAM-disk and changed the option to enable the log file and to move it to the RAM-disk, including the write ahead of the database.
zaadstra
Posts: 23
Joined: Saturday 06 September 2014 15:08
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Contact:

Re: ramdisk problem after upgrade to 2020.1

Post by zaadstra »

I'm very interested too! Just wasted a lot of time by a broken SD card.

Would it be an option to use the lower database version again? The suggestion to control it from Domotics is also clever as the domoticz.sh always 'forgets' ramdisk settings at upgrades.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest