Well, it seems I am my own best teacher tonight.
I gave the necessary permissions to the script file and the cronjob attempts to run, but it issues an error, "/root/scripts/disk_spindown.sh: line 10: hdparm: command not found"
Here is the script:
Code:
#! /bin/bash# Check for idle disks and spin them down
# Create a file on the ramdisk and cycle it to test for activity
( if [ ! -f /dev/shm/1 ] ; then touch /dev/shm/1 /dev/shm/2; fi ; mv /dev/shm/1 /dev/shm/2; cat /proc/dis$
# Loop through all array disks and spin down idle disks. Disks can also be written as {b..k}
for disk in {a b e f}
do
if [ "$(diff /dev/shm/1 /dev/shm/2 | grep sd$disk )" = "" ] ; then hdparm -Y /dev/sd{abef}; fi
done
I'm guessing something is wrong with the syntax of the portion I bolded, but I'm not sure. Anyone got any ideas.
I hate to go the self pity route, but it should be obvious that I'm really working hard to fix this and could really use some help.
Bookmarks