Corrupt SD card...again!

Discussions about Z-Way software and Z-Wave technology in general
insiorc
Posts: 43
Joined: 01 Apr 2019 21:55

Corrupt SD card...again!

Post by insiorc »

Hi folks,

I've not been able to log into my system via the IP address, find.z-wave.me or even via SSH/Putty for the past couple of weeks, as reported here https://forum.z-wave.me/viewtopic.php?f=3419&t=34125 The system was working so I left it as I had to go away for over a week for work. Now back home, yesterday I couldn't login to soft shutdown so I had to remove the power, after this it would not boot again.

What I've found strange is that I was able to take an image of the SD card (thankfully as it was a year since last done - lesson to myself to do more frequent images) but I was then unable to format the card using windows 10 disk management tool although it was recognised and I was able to open some files on the fat32 partition, I could not write anything to the card using Win32 Image Writer or the RaspberryPi Imager so I am thinking the SD card is ruined? This is not the first SD card which after using with ZWay it cannot be used again, I typically use Samsung Evo Plus or standard Evo SD cards, has anyone had bad experience with these cards as I thought they'd be reasonable quality? I am now planning running ZWay off a USB stick in the hope of better reliability, is this the correct thing to do?

When my ZWay was running I typically get about a week before the system slows down, at times lights can turn on almost instantaneously when triggered by PIR but then it can go through a period where a delay of up to about 20 seconds before the light comes on. After a reboot it works fine for some time before the delays start again. I have the Philips Hue app which when viewing Top I see the CPU go to around 50% when updating from Hue, then drop back to around 3% so I was thinking this may be the cause of the delays, but it's strange how it works fast for about a week. Any idea's?

Thanks
Rpi4 2Gb, Z-Way 3.2.2, UZB 5.39
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Re: Corrupt SD card...again!

Post by PoltoS »

We suggest to use fast and robust SD cards. We use quite a lot of them and no issues so far. Slow and inexpensive cards are usually unreliable.

As for the slow down, I would suggest to see the queue log. May be there are routes that are dead after some time. Do network reorganization and disable the polling.
micky1500
Posts: 298
Joined: 07 Feb 2016 16:29
Location: England

Re: Corrupt SD card...again!

Post by micky1500 »

Very vague answer. fast and robust SD cards.
I have used SanDisk Devices, They fail within a year.
Samsung Evo seem to be a better choice.
External 240Gb usb3 I have on my router is failing at same rate as the SanDisk drives.
Raspi 4 - (Buster - 32 Bit) Zwave Version 4.1.1, Raz 7 Pro, Serial API Version: 07.38
insiorc
Posts: 43
Joined: 01 Apr 2019 21:55

Re: Corrupt SD card...again!

Post by insiorc »

Thanks for your replies

The job queue is clear other than a battery update request I had done, which is waiting on the deivces to report in. It normally sits empty. I have done the network reorganisation and disabled both the Periodical Selected Switch Polling and Battery Polling apps - are these what was meant?

I now have a small collection of SanDisk SD cards which no longer work which is why I tried the Samsung Evo and Evo Plus. Unfortunately it's the SanDisk Ultra USB3 stick I have ordered and waiting on post, It had good reviews, I guess I'll try it and keep taking regular images incase of failure.
I do have another Rpi4 running off 240Gb SSD which mostly sits idle, although has Plex and Minecraft (for kids) servers running, would this be too busy to add ZWay to?
Rpi4 2Gb, Z-Way 3.2.2, UZB 5.39
insiorc
Posts: 43
Joined: 01 Apr 2019 21:55

Re: Corrupt SD card...again!

Post by insiorc »

I've not noticed significant delays for the past days so hopefully it is now all sorted. I'll wait a few more days and try enabling the polling and see how things go. Thanks again.

Also that's the ZWay now running off the 64Gb Sandisk Utra USB stick, will see how reliability goes. I've setup a cronjob to do a weekly image clone to a second Sandisk Ultra USB stick so hopefully my images will all be fairly recent, I can do a manual image clone if any major changes are made.
Rpi4 2Gb, Z-Way 3.2.2, UZB 5.39
micky1500
Posts: 298
Joined: 07 Feb 2016 16:29
Location: England

Re: Corrupt SD card...again!

Post by micky1500 »

I found the SD card was failing when logrotate ran at 6.00am. (Might be midnight on latest build)
z-way would restart, maybe due to delays and Monit detecting a freeze.
The OS log files also showed errors reading the SD card.
But still working with issues.

That was a couple of times with Sandisk cards. A year between.
Samsung Evo SD Card has been running for a lot longer and still working. (Fingers crossed)
When it fails, I normally go for the latest Buster image and latest build, and restore my newest backup.

I like the idea of making a weekly image :)
What app do you use to do that ?
Raspi 4 - (Buster - 32 Bit) Zwave Version 4.1.1, Raz 7 Pro, Serial API Version: 07.38
insiorc
Posts: 43
Joined: 01 Apr 2019 21:55

Re: Corrupt SD card...again!

Post by insiorc »

Up till now I've also started from scratch with the latest Rpi and ZWay versions then restored a backup, but I'd made quite a few changes and hadn't done a backup so I was quite relieved to be able to take an image of the SD card and then use it. Also it was for a quick fix with nothing working aswell as lazyness.

I used rpi-clone for the SD card to USB clone so I've just setup a cronjob to automate it for the USB to USB, I'll find out if it worked on Monday.
Rpi4 2Gb, Z-Way 3.2.2, UZB 5.39
Franz Winchester
Posts: 52
Joined: 01 Dec 2019 23:08

Re: Corrupt SD card...again!

Post by Franz Winchester »

You should switch to a SSD. Mine's running on the cheapest SSD with 3D NAND (Verbatim) in a cheap USB case. 31 €, and the issues with the SD-cards are gone. It`s even running faster than from SD. No extra power supply needed, if you use the original or a similar power adapter.
xurg
Posts: 52
Joined: 17 Aug 2020 22:38

Re: Corrupt SD card...again!

Post by xurg »

Even if there is the workaround of switching to an SSD, it would be nice if zwave would be more SDCard friendly in terms of offering an explicit way to limit and locate those files which are constantly written to to a dedicated storage, ideally a tmpfs if there is enough RAM.
Raspberry Pi 3 Model B Rev 1.2
Raspbian GNU/Linux 10 (buster)
RaZberry ZW0500 1024/2 SDK: 6.82.01 API: 05.39
Z-Way version v4.1.0
insiorc
Posts: 43
Joined: 01 Apr 2019 21:55

Re: Corrupt SD card...again!

Post by insiorc »

Franz Winchester wrote:
12 Feb 2021 17:04
It`s even running faster than from SD.
To what extend would SD, USB or SSD drives affect the ZWay performance on an Rpi4? If drive performance will make a difference to how ZWay operates then an SSD would be something to consider, and if doing this then would a faster SSD be advantageous?
I chose my USB3 drive largely on price, but it got a reasonable reliability score which was a big factor athough it's performance was reviewed as poor.
As that Rpi4 is dedicated to ZWay, with only additional software being ddclient and now rpi-clone running then I thought 64Gb big enough especially as it's much easier storing backup images.
Rpi4 2Gb, Z-Way 3.2.2, UZB 5.39
Post Reply