Feature request: halt command


 

Steve_M

TVWBB Guru
It looks like both of my HM units had a bit of filesystem corruption, most likely due to the power being yanked without giving the OS time to flush whatever it needed to the SD card.

Would it be possible to add a "halt" option to the button menu? This should allow a safe halting of the rPi before pulling the power.
 
Man, I've pulled the power on my HM a zillion times and never corrupted the file system? The only times I've had a problem is after I dropped the unit and the SD card rattled a bit loose, other than that it's been pretty solid...
 
Ralph is not the only one whom has pulled the SD card a gazillion times, I have also have never had a problem

Unplugging a filesystem which is undergoing changes could corrupt it but for the most part, HeaterMeter uses a ramdisk to store all of its data. There's a very low chance of unplugging during an uncommitted file system write. It's never happened to me and I plug and unplug this thing a lot more than a normal user would.

However, even if the filesystem does get blasted, you can just reimage it and it will restore your configuration so there's really not anything to lose other than a couple minutes.
 
I've been using 8 gig cause the price is just about the same as 4 these days, I've been really happy with these SD cards...
 
I've also gone through dozens / hundreds of power cycles without an issue, but all it takes is one time for it to happen.
 
I've got dozens of them. The 2 that corrupted most recently are a Lexar and a Transcend.

Flash media of any kind doesn't take kindly to having the power yanked in the middle of a write event.

I've experienced this in the past on my other raspberry pi's during power flickers and such. It's not an issue that isolated to the heatermeter by any stretch of the imagination.
 
I've got dozens of them. The 2 that corrupted most recently are a Lexar and a Transcend.

Flash media of any kind doesn't take kindly to having the power yanked in the middle of a write event.

I've experienced this in the past on my other raspberry pi's during power flickers and such. It's not an issue that isolated to the heatermeter by any stretch of the imagination.


They are not written to on a regular basis during operation. The only time you may need to be careful is when you are saving a graph to the SD card. The Heatermeter uses a Ramdisk.

I do think its the SD cards themselves that have the problem of becoming corrupt. I have a Lexar that may have developed a problem and I have yet reformatted because my other Sandisk have never had a problem, since the Heatermeter started using a Pi.
 
The linkmeterd does do the running database autobackup every 5 minutes or whatever the interval is, which you could theoretically catch and somehow corrupt things that way. The filesystem is mounted with the sync option so all operations shouldn't cause filesystem corruption unless you happen to pull the plug the exact instant the copy takes place.

All the problems I've seen with FS corruption have been caused by the Pi actually messing up the SPI operation and erroring out, which can't be fixed by changing shutdown procedures I'm afraid.

Also with regards to the original question. I don't really want to add anything to the HeaterMeter menu because HeaterMeter doesn't really know about the Pi being attached, it runs all on its own... so I guess I could make it halt the microcontroller and send out a final message that linkmeter could use to shutdown? But the HeaterMeter wouldn't know when the Pi is halted so the HM display would go out before the actual operation is complete which might cause more harm than good.
 

 

Back
Top