Merry Xmas to all!
The 2 main services you need to be looking at stopping are emonhub and/or feedwriter, the old commands still work such as
sudo service emonhub stop or the newer commands would be
sudo systemctl stop emonhub.service (swap out “emonhub” for “feedwriter” service). If all your data is coming via emonhub you could just stop that, but other data such as emonesp etc could still post to emoncms so doing both might be prudent. However . . .
I have a cloud server which has data partitions in much the same way as an emonSD and when I do maintenance or backing up of the data partition I simply unmount it, emonhub will then continue sending to emoncms and feedwriter will keep trying, but failing to save to the data partition until such time as you have remounted it and there will be no break in the data as all the data that has built up will get saved at that point. Within reason of course, ie if you don’t take days/weeks to sort it out or reboot.
I’m sure someone will pipe up and say this is not recommended but I have done it so many times now that I consider it as risk free as any “recommended” method. The benefit of this method is that ALL writing to that disk is stopped, by stopping selected services you may miss something, IIRC you will need to unmount to repair anyways.
As far as the main root partition is concerned, there is a command you can add to the end of the /boot/cmdline.txt file that will trigger a file check (&repair) prior to mounting, but IIRC it doesn’t do any other partition, might be worth checking out that option though just in case my memory is out or things have changed recently since this would be a “recommended” and practical solution if available. Otherwise I would just unmount data and crack on, letting the OS and services run and catch up once you remount.
This advice obviously must come with some disclaimers It works for me and I see no reason for it not to work for the emonSD but I do not run emonSD and have not studied the current image in depth so please backup and proceed with caution if you try it, but I’m quietly confident that it should be fine.