I'm running a few CentOS servers on EC2. We're working to run them all from one image and mount all the variant configuration files from persistent storage.
We just started mounting cron directories from persistent storage, and I'm finding that the cron jobs are no longer running. Can cron configuration files be mounted? Is there something else that I should be keeping an eye on here?
They're getting mounted with -obind. After they're mounted, the result of the mount command returns:
/mnt/persistent/conf/cron/cron on /var/spool/cron type none (rw,bind)
/mnt/persistent/conf/cron/cron.daily on /etc/cron.daily type none (rw,bind)
/mnt/persistent/conf/cron/cron.monthly on /etc/cron.monthly type none (rw,bind)
/mnt/persistent/conf/cron/cron.weekly on /etc/cron.weekly type none (rw,bind)
/mnt/persistent/conf/cron/cron.hourly on /etc/cron.hourly type none (rw,bind)
Edited to answer questions
Latest contents of /var/log/cron show that normal functioning stopped on the 13th, when this new configuration took over.
Jun 13 02:01:01 ip-10-70-153-178 crond[11389]: (root) CMD (run-parts /etc/cron.hourly)
Jun 13 02:10:01 ip-10-70-153-178 crond[11502]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Jun 13 02:20:01 ip-10-70-153-178 crond[11504]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Jun 13 02:30:01 ip-10-70-153-178 crond[11530]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Jun 13 02:40:01 ip-10-70-153-178 crond[11532]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Jun 13 02:50:01 ip-10-70-153-178 crond[11534]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Jun 13 03:00:01 ip-10-70-153-178 crond[11536]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Jun 13 03:01:01 ip-10-70-153-178 crond[11538]: (root) CMD (run-parts /etc/cron.hourly)
Jun 13 03:02:01 ip-10-70-153-178 crond[1740]: (CRON) STAT FAILED (cron)
Jun 15 17:54:11 ip-10-70-153-178 crontab[18321]: (root) LIST (root)
Jun 15 17:57:47 ip-10-70-153-178 crontab[18322]: (root) BEGIN EDIT (root)
Jun 15 17:57:49 ip-10-70-153-178 crontab[18322]: (root) REPLACE (root)
Jun 15 17:57:49 ip-10-70-153-178 crontab[18322]: (root) END EDIT (root)
Jun 17 06:49:32 ip-10-70-153-178 crontab[24613]: (root) LIST (root)
Jun 17 06:50:05 ip-10-70-153-178 crontab[24643]: (root) LIST (root)