February 27, 201214 yr I am running 4.7 and have 8 data drives, a parity drive and a cache drive. I also have a single hot spare that is mounted but not in use. I have been keeping that hot spare spun down using the info provided in this post: http://lime-technology.com/forum/index.php?topic=1006 Because of the problem of not knowing with certainty which device name was going to be attached to the drive, I have not automated this process in a script. Rather, after the system boots, I find out the proper dev name and then issue the following two commands: hdparm -S0 /dev/sdx then hdparm -S2 /dev/sdx Until today this has always worked. Yesterday, I had occasion to reboot the system. This morning I entered the above hdparm commands but nothing seemed to happen. I don't recall if these commands appeared in the syslog before but they are not appearing now (I don't know if that is relevant). I'm attaching a syslog in case that is relevant, an image of mymain that shows the drive (sdh) as spun up, as well as a screen grab of the putty session where the commands were invoked. Can anyone help me diagnose why this is suddenly not working, and if so, what I should be doing instead. Thanks for any help. syslog-2012-02-27.zip
February 27, 201214 yr I think the -S2 is too low. -S Put the drive into idle (low-power) mode, and also set the standby (spindown) timeout for the drive. This timeout value is used by the drive to determine how long to wait (with no disk activity) before turning off the spindle motor to save power. Under such circumstances, the drive may take as long as 30 seconds to respond to a subsequent disk access, though most drives are much quicker. The encoding of the timeout value is somewhat peculiar. A value of zero means "timeouts are disabled": the device will not automatically enter standby mode. Values from 1 to 240 specify multiples of 5 seconds, yielding timeouts from 5 seconds to 20 minutes. Values from 241 to 251 specify from 1 to 11 units of 30 minutes, yielding timeouts from 30 minutes to 5.5 hours. A value of 252 signifies a timeout of 21 minutes. A value of 253 sets a vendor-defined timeout period between 8 and 12 hours, and the value 254 is reserved. 255 is interpreted as 21 minutes plus 15 seconds. Note that some older drives may have very different interpretations of these values. I would choose 10-20 minutes. or I would use -y to do it now! Actually I would do -S241 first. Then issue a -y a second or two later to put it into standby immediately -y Force an IDE drive to immediately enter the low power consumption standby mode, usually causing it to spin down. The current power mode status can be checked using the -C flag. The process of exploring the standby can also cause the drive to spin up. In addition I would automate this via script by using the /dev/disk/by-id/ path which will not shift since it's named tot he model & serial number of the drive.
February 27, 201214 yr Author Actually I would do -S241 first. Then issue a -y a second or two later to put it into standby immediately That did it. Thanks. In addition I would automate this via script by using the /dev/disk/by-id/ path which will not shift since it's named tot he model & serial number of the drive. I've never written a script before but I'm willing to try. A few questions first if you don't mind answering: 1. I navigated to the directory /dev/disk/by-id/ and there I indeed find all my drives listed by their serial numbers, but I see two entries for each drive, e.g. scsi-SATA_Hitachi_HDS5C30_ML2220F32S55BE@ scsi-SATA_Hitachi_HDS5C30_ML2220F32S55BE-part1@ which of these do I use and does the name include the exact name shown, only the actual serial number, or some variant of the total line. 2. Would I add this to one of the existing scripts (I see references all the time to the "go" script but not sure what it does, how to modify it and whether that's the right place to put it. Or would I create an additional script and if so, how would I get it executed. (sorry if my ignorance of linux is showing here) 3. I presume except for the exact nature of the name to be used the commands I'd add would look like the following: hdparm -S241 /dev/disk/by-id/xxxxxxx hdparm -y /dev/disk/by-id/xxxxxxx is that correct? Thanks again.
Archived
This topic is now archived and is closed to further replies.