NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
JosephAE
Aug 29, 2012Aspirant
Cron.daily Spinning Up Disks
My disks are spinning up after sleeping even though no one was accessing my ReadyNAS Pro.
Looking at the log files I came across the following.
My interpretation of this is that “cron.daily” was called at 06:25:01 by “crontab” and that a file in the “cron.daily” directory caused the disks to wakeup.
So how can I determine what file is being executed in the cron.daily directory causing my disks to spin up? Below are the files in the cron.daily directory:
Thanks for all your help in advance. :)
Looking at the log files I came across the following.
- C:\System_log-nas-AB-12-34-20120829-094628\cron.log (1 hits)
Line 9806: Aug 28 06:25:01 nas-AB-12-34 /USR/SBIN/CRON[4138]: (root) CMD (test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ))
C:\System_log-nas-AB-12-34-20120829-094628\daemon.log (1 hits)
Line 7086: Aug 28 06:25:09 nas-AB-12-34 noflushd[2042]: Disks spinning up after 576 minutes.
C:\System_log-nas-AB-12-34-20120829-094628\system.log (1 hits)
Line 10000: Aug 28 06:25:09 nas-AB-12-34 noflushd[2042]: Disks spinning up after 576 minutes.
C:\System_log-nas-AB-12-34-20120829-094628\auth.log (1 hits)
Line 9998: Aug 28 06:25:01 nas-AB-12-34 CRON[4137]: (pam_unix) session opened for user root by (uid=0)
My interpretation of this is that “cron.daily” was called at 06:25:01 by “crontab” and that a file in the “cron.daily” directory caused the disks to wakeup.
So how can I determine what file is being executed in the cron.daily directory causing my disks to spin up? Below are the files in the cron.daily directory:
- block list
check_disk_usage
check-trans
clean_recycle_bins
logrotat
logtruncate
Thanks for all your help in advance. :)
4 Replies
Replies have been turned off for this discussion
- carpiiTutor
JosephAE wrote:
My interpretation of this is that “cron.daily” was called at 06:25:01 by “crontab” and that a file in the “cron.daily” directory caused the disks to wakeup.
So how can I determine what file is being executed in the cron.daily directory causing my disks to spin up?
Check /var/log/cron.log, which logs each cronjob (and each 'step' of system cronjobs like cron.daily)
But I think all of those steps you posted would spin up the disks.
These jobs are launched from the system cron, in /etc/crontab (this is not the same as the root users crontab)
You could edit this file as root, and change the times they are due to run.
Just be careful to keep everything else the same as they syntax differs slightly from the normal user crontab. - maxblackAspirantThere are lotsa things that spin-up disks; I damn near went crazy trying to figure this out, finally giving up.
I'd say 576mins is darn good, I was getting "spinning up after 0 minutes" i.e. had problems w/spin-down and turned it off when I couldn't get this to stop happening. Hard on the disks! It's probably better on the RN Pro than my elderly NV+ though too. - JosephAEAspirantTo find which process was waking my disks I was thinking about adding a file between each of the files in the “cron.daily” directory. Each new file would have the same commands but the file names would be such that they would be executed following each of the existing files in the “cron.daily” directory.
The contents of this new file would have the following command:smartctl -i -n standby /dev/sda
This would tell be whether the drive was sleeping or spinning prior to and after each process in the “cron.daily” directory.
The problem I still have is how to send this information out to one of the many log file on the ReadyNAS.
How would you send the results of “smartctl” to a log file so that it could be reviewed later?
Again thanks for your help.
Edit: Could the “logger” command somehow be used with "smartctl"? - carpiiTutor
JosephAE wrote:
How would you send the results of “smartctl” to a log file so that it could be reviewed later?
Create a file somewhere, and then set it to executable (chmod 755 <filename>)
Then in cron.daily create a symlink to your file
#!/bin/sh
smartctl smartctl -i -n standby /dev/sda >> /var/log/smartctl.log
But I dont think this is worthwhile.
I imagine as soon as you try writing to a log file, its going to spin the disks up anyway, so the log will contain nothing useful.
Have you thought of just using Frontview to schedule your NAS to shut down each night?
If you dont want the disks spinning at night, then it cant be doing much useful anyway
Related Content
NETGEAR Academy
Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!