Hi,
[warning: this is a bit longer, sorry for that]
I‘m new to Moode and would like to experiment with it. But one important factor is that write operations to the SD card are minimized (read-only in the best case).
Why? I have connected the RPi to the switch that turns the amp on and off and this means that power loss can be sudden and without warning to the RPi.
One answer given quite often is that good-quality SD cards have no problem with sudden power loss. First of all, this is not entirely true. In seldom cases a power loss during write at the exact right moment lets the controller fry parts of the storage or even the whole card. [Off-topic: I once turned off and on an SSD on an RPi every 30 seconds for a week, turned it on again, the RPi started to boot and to write to the SSD. The SSD died after this, even though it was a quality drive (SANDisk)].
Second, even if the hardware survives this, then the last write might be compromised. On a hard disk this is no problem with a modern file system because only the last few blocks are lost, and they most probably will be some log entries. So no big loss, right? Wrong, since the internal organization of an SD card is different from the one presented th the RPi, meaning that depending on the SD card a substantially larger block of memory, e.g., 32K might be lost, that has nothing to do with the last block written, simply because it is in the same internal part. This can be alleviated to some extent by using an SD card that is substantially larger than the space needed for the OS.
Both points make power loss for an SD card or SSD much more problematic than power loss for an HDD.
There are two simple approaches to minimize the probability for this under Raspbian. The first approach (done by PiCorePlayer) is to use a read-only file system. If you want to change something then you have to first remount the file system read-write, change whatever want, and then switch back to read-only mode.
The other approach is to use an Overlay FS. This simply stores changes in RAM and overlays them transparently over the original data. When power is lost the changes are lost as well. But the changes can also be made permanent by writing them to the underlying file system (this naturally should only be done when power can be guaranteed).
[I‘m ignoring some other approaches like writing the overlay to a second SD card…]
Tim Curtis has already pointed out that Moode does not support a „read-only“ mode. But can Moode use an Overlay FS? This would be a good alternative.
Cheers, Joe
[warning: this is a bit longer, sorry for that]
I‘m new to Moode and would like to experiment with it. But one important factor is that write operations to the SD card are minimized (read-only in the best case).
Why? I have connected the RPi to the switch that turns the amp on and off and this means that power loss can be sudden and without warning to the RPi.
One answer given quite often is that good-quality SD cards have no problem with sudden power loss. First of all, this is not entirely true. In seldom cases a power loss during write at the exact right moment lets the controller fry parts of the storage or even the whole card. [Off-topic: I once turned off and on an SSD on an RPi every 30 seconds for a week, turned it on again, the RPi started to boot and to write to the SSD. The SSD died after this, even though it was a quality drive (SANDisk)].
Second, even if the hardware survives this, then the last write might be compromised. On a hard disk this is no problem with a modern file system because only the last few blocks are lost, and they most probably will be some log entries. So no big loss, right? Wrong, since the internal organization of an SD card is different from the one presented th the RPi, meaning that depending on the SD card a substantially larger block of memory, e.g., 32K might be lost, that has nothing to do with the last block written, simply because it is in the same internal part. This can be alleviated to some extent by using an SD card that is substantially larger than the space needed for the OS.
Both points make power loss for an SD card or SSD much more problematic than power loss for an HDD.
There are two simple approaches to minimize the probability for this under Raspbian. The first approach (done by PiCorePlayer) is to use a read-only file system. If you want to change something then you have to first remount the file system read-write, change whatever want, and then switch back to read-only mode.
The other approach is to use an Overlay FS. This simply stores changes in RAM and overlays them transparently over the original data. When power is lost the changes are lost as well. But the changes can also be made permanent by writing them to the underlying file system (this naturally should only be done when power can be guaranteed).
[I‘m ignoring some other approaches like writing the overlay to a second SD card…]
Tim Curtis has already pointed out that Moode does not support a „read-only“ mode. But can Moode use an Overlay FS? This would be a good alternative.
Cheers, Joe