I am looking for a way to turn OMV into some kind of maintenance mode to protect the execution of critical tasks such as SnapRAID Sync or any resilvering.
E.g. the SnapRAID Sync process does not like write operations to data disks while it is running, so it is recommended to either execute it during off-hours or disable network / docker etc. accesses for the time of execution.
I was hoping to find an easy built-in solution for this, but unfortunately I could not find any.
As OMV is based on Debian I thought it could be possible to simply pause certain systemd services. My script to enable the maintenance mode would be like this (btw. I do not use docker or VMs on my NAS):
#!/bin/bash
######################
# Stop Network Shares
######################
# SMB
systemctl stop smbd.service
# NFS
systemctl stop nfs-server.service
#######################
# Stop Scheduled Tasks
#######################
# CRON
systemctl stop cron.service
# SMARTD
systemctl stop smartd.service
Display More
Would you deem this a viable solution or is there something more secure and proven? Especially stopping the cron service is making me nervous.