I don't really use a RTC on my boards any more as fake-hwclock and the default config seems to work quite well. But a few people have asked me about RTC on OMV 4. So here are the steps that seem to work well for me.
I am starting with the latest/clean OMV 4 for RPI - from the downloads section of the OMV website.
1. Install the RTC onto the board - I have an old post that shows where it goes
2. Add the following to the end of /boot/config.txt - use a good text editor or just use: sudo nano /boot/config.txt
Before proceeding further, reboot after making this change and check if the RTC has been detected. You should find an entry in the syslog showing that the RTC has been identified/registered. If not, you need to troubleshoot further and it is likely that either the RTC is not installed correctly or wrong driver etc...
Jun 10 08:43:34 RPI kernel: [4.401953] rtc-ds1307 1-0068: registered as rtc0
3. Edit the file /lib/udev/hwclock-set: sudo nano /lib/udev/hwclock-set and comment out the following code - this section of code is near the beginning of the file
#if [ -e /run/systemd/system ] ; then
# exit 0
4. All that is left to do is to stop/disable fake-hwclock. This is really easy now as it runs as a service. so from the cli over ssh.
sudo systemctl status fake-hwclock.service - this will tell you that fake-hwclock service is running
sudo systemctl stop fake-hwclock.service - this will stop the service
sudo systemctl disable fake-hwclock.service - this will disable the service so it will not start the service at system startup.
5. reboot the RPI and from the cli check the following.
sudo hwclock -r - if working this should show the correct time straight after a reboot
sudo timedatectl status - this command produces a similar output but gives more info