Shutdown in case of power loss

Topics about the Hardware of Revolution Pi
Post Reply
Markkeli
Posts: 2
Joined: 05 Dec 2017, 12:25
Answers: 0

Shutdown in case of power loss

Post by Markkeli »

In your online manual it says this: “DON’T pull the power supply plug to turn the device off. If the system is writing data at the time on the eMMC storage, it may lead in rare cases to the eMMC storage’s filing system being destroyed thus even making it impossible to boot the system.”

I was wondering how probable this is in case of a power loss? Is there any workaround to this to avoid the destruction of the whole thing in case of a rare power loss except buying a complete UPS?

Kind regards,
Markus Ovaskainen
User avatar
volker
Posts: 1046
Joined: 09 Nov 2016, 15:41
Answers: 1

Re: Shutdown in case of power loss

Post by volker »

Hi Markus,
this is more a question of liability. KUNBUS does not recomment to use the system without any UPS in a critical use case where the system being bootable and functional is vital. We do not take any responsibility for the system to survive such a case.
This said we can only report our experiences with the eMMC: During 2 years of continuous work of all my collegues with the RevPi Core they have switches off power supply without system shutdown possibly many thouthand times (if not million times) without a single device getting its file system detroyed. So we assume that the chance to destroy your file system by not hsutting the system down before switching the power off is very very small. We have discussed this topic with the developement team of Raspi in Cambridge and they have reported the same: The only cases when this happened were not with CM3 but only with cheap SD cards in a Raspi.
So there might be a risk to do so and if you need to be absolutely sure not to kill your system you should not plug off power without shutting down the system. But there is no reason for panic. The probability seems to be less than 1:100000 that this happens and thus you could take the risk for rare power losses due to accidently shut offs. But we still would recommend to take the time tio shut down the system in a "nice" way when there is no need to be lazy and just plug off the 24 V.
Unser RevPi Motto: Don't just claim it - make it!
Markkeli
Posts: 2
Joined: 05 Dec 2017, 12:25
Answers: 0

Re: Shutdown in case of power loss

Post by Markkeli »

Hi,

Thank you for the answer! Even this estimation of the probability is of great use to use when we analyze this issue from a risk management point of view.
MartinH
Posts: 1
Joined: 08 Jan 2018, 13:26
Answers: 0

Re: Shutdown in case of power loss

Post by MartinH »

Hi,

This is interesting for me as well. I have an application in an environment where I know the users will pull the plug every time the PI is shutdown.
The application is developed for the Raspi 3 but when I found your implementation of the CM this fits my use case better.

For the Raspberry PI I used overlayFS to make the SD-card read only and put the entire root partition to RAM:
https://www.raspberrypi.org/forums/view ... p?t=161416
Is this possible with the Revolution PI Core?
Is it necessary or am I just worrying too much, the eMMC might be much better than the normal SD-card?

BR
Martin
Timo
Posts: 44
Joined: 25 Jan 2017, 10:08
Answers: 0

Re: Shutdown in case of power loss

Post by Timo »

MartinH wrote: 08 Jan 2018, 14:43For the Raspberry PI I used overlayFS to make the SD-card read only and put the entire root partition to RAM:
https://www.raspberrypi.org/forums/view ... p?t=161416
Is this possible with the Revolution PI Core?
The compute module does not have an SD card slot. So making the flash read only will be possible only once. ;) Perhaps you could make the RevPi boot from USB stick, but this would relocate the problem to an USB stick of unknown quality and reliability.

To preserve the flash memory and reduce the possible problems in case of a power failure, you could turn off logging, turn off swap, adding noatime and perhaps other things to the fstab. So the system will only write rarely to the eMMC.

Would be great to have some sort of DIP switch or jumper connection, to make the flash read only - for the paranoid ones like us. ^.^°
User avatar
volker
Posts: 1046
Joined: 09 Nov 2016, 15:41
Answers: 1

Re: Shutdown in case of power loss

Post by volker »

Read only for eMMC might be an option but do not recommend this. A much better way is to reduce any logs and to not install any sw which is constantly writing data to eMMC files (data logger). For applications like data loggers etc. you should simply write to a network drive or to USB drives. If you cannot suppress any log files in var/log: There is an option under the web-based configuration tool for mapping var/log into RAM Disk. But of course this will delete all logs in case of a reboot. We recommend to relax and to view at this topic as you would view on any part which has attrition: You will need to replace it in a proper maintenance interval. So if you need to rely on the functionality of a machine you need to replace e.g. certain bearings every so and so hours of working. For eMMC you could make a calculation based on the average count of writes/deletes to determine when all of the memory cells will be locked by the cell management system. We've done such calculations for a customer who wanted to use the eMMC as data logger with heavy duty data flows (> 1GB/day) and came to the conclusion that such an use case would need RevPi Core replacement (or just the CM) every 3 years to have enough head room for safe functionality. Replacing your car's tires every 5 years is much more expensive...
You need not to be afraid of any unpredictable malfunction because of power loss. The eMMC is much to clever to produce faults. But there is of course a residual risk for the eMMC to be killed by such an event. But this risk is like being killed by a lighning in Europe: 1 to many many millions per life time... Our sw developement team is, constantly shutting off power supply without system shut down, happily taking this risk many times per day :-) So simply join us... no risk no fun...

WE DO RECOMMEND NOT TO BE BRAVE BUT TO SHUT DOWN THE SYSTEM BEFORE UN-POWERING THE DEVICE...
Unser RevPi Motto: Don't just claim it - make it!
Post Reply