JimmyN wrote:There is no difference between initiating a reset and cutting the power, neither performs any shutdown procedures.
Of course, without a clean shutdown there is always the risk of losing data that was unsaved or very recently saved, along with introducing errors or inconsistencies into files (especially databases) that were being written at the time. However, I think this thread was more about filesystem corruption, and there is reason to believe that resetting might be safer than powering down in that respect.
When you pull the power, the 3.3V supply to the SD card collapses, while the card may have been in the middle of a flash write or erase, or moving data around for wear levelling or to maintain its pool of pre-erased blocks. If the card's records become out of date or corrupt, reads from the affected blocks will return the wrong data. There may also be some caching of writes in the controller's RAM. Unlikely an SSD, there is no room for a large capacitor to store the energy to write this back.
The RUN line does not connect to the SD card at all. When you reset the board, all that happens is the SoC stops talking. The card ought to be able to handle that gracefully. Even if it was in middle of a write operation, it should be able to detect a CRC error from the host, and abort. Even if it actually does write incomplete data, it has no excuse for writing it in the wrong place. If it was filesystem metadata that was being written, the kernel will have made a journal entry about it, and should be able to recover on the next boot.
"'if using a hard reset is safe..." it's not, and no different than just pulling the power plug and then powering back up.
I have still not tested it. To be honest I have had no issues with filesystem corruption except for one card that failed completely, so I am not very motivated to worry. But I do suspect that reset may be safer than pulling power.