I'm developing an embedded linux system running on a SD card.
To protect the SD against corruption I've used a read only root filesystem as well as an extra partition where I mount /home, also in read only mode. It is in /home where the program runs and performs read-write operations.
When the software needs to write some data on the disk, it echoes these two commands and saves the data between them:
mount -o remount,rw /dev/mmcblk0p3 /home
mount -o remount,ro /dev/mmcblk0p3 /home
I'm doing this to ensure maximum prevention agains corruption if power goes down. But, I don't know if the cure may be worse than the disease.
Is it dangerous for the filesystem or the SD card to perform such a frequent partition remounting each time I want to save some data?
Another question. Is it dangerous to remount a partition where a program is running? I mean, not writing data on the disk, just running with the own program variables.