Since the Raspberry Pi based products such as the S2, G3, and Pi systems use the micro SD card, this posts apply to them. I am sharing this because I was lucky, with the help of HS Support, to recovery from an SD card corruption. The issues that very likely are related to corruptions of the SD card are: Backup issues, Events File disappearing, among others. The SD card is probably the least reliable hardware component in the central controller system. My SD card was the only hardware failure I have had in the 5+ years of using the Pi based HS S2 system.
So what are the most likely causes of SD card corruption? While there are likely multiple reasons an SD card can become corrupted, most do not mean the SD card has failed but rather the system created a corrupted file. I have come to believe that the most likely reason for the system related corruptions is sudden power disruptions either caused by utility company power flickers, which we see often, or by unplugging power to the Pi based system while it is running. To reduce these issues, I moved my system to a small battery powered backup like those battery packs used to recharge a cell phones to keep my S2 fully powered during a power flicker. The important thing is to select backup power unit that puts out a regulated 5-5.1volts and is rated for at least 3 amps and had the correct plug connector to fit the jack. This will run all the Pi based controllers. (note-the Pi4 uses the newer USB C style connector. The second reason for power interruptions is me. I am now constantly reminding myself to first perform a full shutdown of the HS system which performs an orderly shutdown of both the HS application, and the Linux operating system. This done from the tools menus in HS4 or HS3 by selecting the Shut Down System choice.
It should be noted that the controller will often survive power fails and come back up without any issues, but not always. I mentioned a backup corruption and the loss of the Events file as two issues that are most likely reasons for SD card corruptions. These two files heavily exercise the SD card when they are running. The backup corruption would most likely happen when a power interruption occurs during a backup. A corruption that causes a loss of the events file is likely because the events file is among the most active files being used in the system so it is first in line to get corrupted by a power loss event.
In my case when I lost my events file and went to restore it, I discovered that my backups had stopped working 8 months back and that file was corrupted and permanently corrupted every controller it was restore into requiring a re-flash of the SD card to correct the corrupted system. Fortunately with the help of HS support I did not to have to recreate and reenter the more then 180 events with about 750 total lines of programming to recover my system. So as I said I was lucky. I am also going to create a post about the backup and the SD cards role in that.
So what are the most likely causes of SD card corruption? While there are likely multiple reasons an SD card can become corrupted, most do not mean the SD card has failed but rather the system created a corrupted file. I have come to believe that the most likely reason for the system related corruptions is sudden power disruptions either caused by utility company power flickers, which we see often, or by unplugging power to the Pi based system while it is running. To reduce these issues, I moved my system to a small battery powered backup like those battery packs used to recharge a cell phones to keep my S2 fully powered during a power flicker. The important thing is to select backup power unit that puts out a regulated 5-5.1volts and is rated for at least 3 amps and had the correct plug connector to fit the jack. This will run all the Pi based controllers. (note-the Pi4 uses the newer USB C style connector. The second reason for power interruptions is me. I am now constantly reminding myself to first perform a full shutdown of the HS system which performs an orderly shutdown of both the HS application, and the Linux operating system. This done from the tools menus in HS4 or HS3 by selecting the Shut Down System choice.
It should be noted that the controller will often survive power fails and come back up without any issues, but not always. I mentioned a backup corruption and the loss of the Events file as two issues that are most likely reasons for SD card corruptions. These two files heavily exercise the SD card when they are running. The backup corruption would most likely happen when a power interruption occurs during a backup. A corruption that causes a loss of the events file is likely because the events file is among the most active files being used in the system so it is first in line to get corrupted by a power loss event.
In my case when I lost my events file and went to restore it, I discovered that my backups had stopped working 8 months back and that file was corrupted and permanently corrupted every controller it was restore into requiring a re-flash of the SD card to correct the corrupted system. Fortunately with the help of HS support I did not to have to recreate and reenter the more then 180 events with about 750 total lines of programming to recover my system. So as I said I was lucky. I am also going to create a post about the backup and the SD cards role in that.
Comment