Preventing HDD spindown

Discussion about hard drive spin down (standby) feature of NAS.

Preventing HDD spindown

Postby NismoC32 » Sun Apr 18, 2010 1:11 am

I see most of the questions here is about getting the disks to spin down, I have the exact opposite problem.
I have a TS-659 Pro. I have turned off the "hardisk standby mode" in System - Hardware.
But the disk still spins down after a while of inactivity.
NismoC32
First post
 
Posts: 1
Joined: Tue Apr 06, 2010 3:53 pm
NAS Model: TS-459 Pro

Re: Preventing HDD spindown

Postby m0x » Sun Apr 18, 2010 1:17 pm

Sounds familiar. I couldn't keep the drives (4x Samsung HD154UI) in my TS-459 from spinning down either, at least not with the web interface. I ended up applying the shellcommand
Code: Select all
hdparm -s0 /dev/sdx (x = driveletter)
to each HDD and things have been spinning happily ever since. I would still be interested to know how this can be done from the webif -- it looks like a bug to me.
m0x
New here
 
Posts: 2
Joined: Thu Mar 18, 2010 5:03 am
NAS Model: TS-259 Pro

Re: Preventing HDD spindown

Postby scalvin » Sun Apr 25, 2010 6:02 pm

Hi!

Not sure if hdparm -s0 /dev/sdX is the right command here:
From the hdpam man page (see below) the capitalized S should be it.
However, for me (on the 859) it does not work. I want it to spin endlessly, because otherwise the drives will die in no time (as it is, even with the 1hour standby setting the clock up more than one load cycle per hour (!) as seen in the SMART settings). Also there is the annoying 10s lag as the disks spin up.

The configuration interface settings with regard to standby only effect the last four drives (of my eight). The others will go into standby after the time set in the config interface (although standby is turned off). This must be a bug.
Does anyone know how the standby is internally managed. It does not seem to be user settable using hdparm. Maybe a cron process will re-set it regularly to whatever the config interface thinks should be right. I filed a bug report, but nobody replied. :-(

Max

-s Enable/disable the power-on in standby feature, if supported by the drive. VERY DANGEROUS. Do not use unless you are absolutely certain that both the system BIOS
(or firmware) and the operating system kernel (Linux >= 2.6.22) support probing for drives that use this feature. When enabled, the drive is powered-up in the
standby mode to allow the controller to sequence the spin-up of devices, reducing the instantaneous current draw burden when many drives share a power supply. Pri-
marily for use in large RAID setups. This feature is usually disabled and the drive is powered-up in the active mode (see -C above). Note that a drive may also
allow enabling this feature by a jumper. Some SATA drives support the control of this feature by pin 11 of the SATA power connector. In these cases, this command
may be unsupported or may have no effect.

-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 dis-
abled": 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.
scalvin
New here
 
Posts: 8
Joined: Sun Apr 25, 2010 5:53 pm
NAS Model: TS-659 Pro

Re: Preventing HDD spindown

Postby Briain » Sun Apr 25, 2010 8:26 pm

Hi

Me too; I certainly do not wish my disks cycled like this either!

I've just bought a TS-659 and it seems to be a fabulous product (though there are a couple of issues with Twonky; posts elsewhere) but this continuous disk cycling is a major problem. I have temporarily set it up with a single Samsung HE103UJ and am expecting another 3 disks on Monday; the plan being to go for a 4 disk RAID 6 system. I currently have firmware TS-659_3.2.4_Build0315 on the system, and even though I have selected not to enable disk standby mode, it spins the disk down anyway.

I don't wish to have the disks continually cycling up and down and need to find a way to stop this. Looking at the SMART statistics, it cycled it about 50 times in the 24 hours I've had it switched on which will significantly reduce their life expectancy (50,000 power cycles).

I too have filed a bug report on this (and that Twonky 5.1.4 doesn't work) and will be calling Qnap early next week if I don't hear anything about how to stop it. So plus one here requesting anyone who might know how to access the power management and tweak it. If not, I'll maybe have to write something to read from the disks every 5 minutes; just to keep them continuously spinning.

Kind regards
Bri
User avatar
Briain
Been there, done that
 
Posts: 779
Joined: Tue Apr 20, 2010 11:56 pm
Location: Edinburgh (Scotland)
NAS Model: TS-459 Pro

Re: Preventing HDD spindown

Postby Briain » Mon Apr 26, 2010 12:31 am

Hmmm

I just checked the SMART settings and in the space of about 10 minutes it had clocked up 4 restarts. I doubt it's done quite that many and thus suspect the SMART stats are maybe not telling the whole truth. Nevertheless, it definitely is spinning them up and down regularly no matter what the spin down is set to in the web interface. I'm now up to 75 restarts in 48 hours (and I've been accessing it and thus keeping it active; if left totally idle, the real situation could be even worse) if these stats are correct, the situation is really pretty grim.

Bri
Last edited by Briain on Mon Apr 26, 2010 3:14 pm, edited 1 time in total.
User avatar
Briain
Been there, done that
 
Posts: 779
Joined: Tue Apr 20, 2010 11:56 pm
Location: Edinburgh (Scotland)
NAS Model: TS-459 Pro

Re: Preventing HDD spindown

Postby Briain » Mon Apr 26, 2010 2:55 am

Enabling spin down and also enabling more of the Twonky mediafusion feeds (photos etc) seems to stop it hibernating; cool.

I'll see how it runs overnight and report back tomorrow morning, but it looks to be a potential interim solution.

Bri

Update: That didn't work; the disk wasn't spinning this morning, but it seems not have cycled overnight so at least it's settling down a bit. If you try to disable drive spin down, it only keeps spinning for a few minutes. It then not only spins them up periodically, but obviously it has to spin up the disk every time it's accessed too; not good.
Last edited by Briain on Mon Apr 26, 2010 3:25 pm, edited 1 time in total.
User avatar
Briain
Been there, done that
 
Posts: 779
Joined: Tue Apr 20, 2010 11:56 pm
Location: Edinburgh (Scotland)
NAS Model: TS-459 Pro

Re: Preventing HDD spindown

Postby scalvin » Mon Apr 26, 2010 3:02 am

Maybe SMART inflates the restart numbers slightly, but the last four disks in my TS-859, which correctly respect the config-interface settings definitely do not clock up any restarts in the SMART records.

Another flaw I discovered in the TS-859 is the following: When you set SMART to run a short daily check on the disks (I have set it to 6:00 a.m.), then all disks will do it correctly, except for disk number 8. Looks like an off-by-one error to me. This however is something I can live with more easily than the unable-to-turn-off-disk-standby-for-first-four-disks bug.

I will start a new "known issues with TS-859 firmware 3.2.5 Build 0410T" thread. Maybe QNAP will take notice and fix these annoying little things.

Except for this stuff, by the way, the TS-859 is a great little box. We use it as a backup array (with 8x Hitachi 2TB disks in RAID5) on NFS (using rsync and cron on the servers) for a bunch of linux servers.

Max
scalvin
New here
 
Posts: 8
Joined: Sun Apr 25, 2010 5:53 pm
NAS Model: TS-659 Pro

Re: Preventing HDD spindown

Postby Briain » Mon Apr 26, 2010 3:38 am

Hi Max

I seem to have a problem with disk 8 position too (I only have 6 slots in my TS-659) :)

SMART is odd; I’m still waiting for the rest of my disks and am running it on only the one disk just now. I’ve noticed that when looking at the SMART stats, if I select disk 2 (which doesn’t exist in my system; I’m doing this to force a refresh of SMART) then revert to disk 1, it always increments the start/stop count by one; most odd and maybe also indicative of ambiguous SMART info?

As to the general opinion of the NAS, me too; I think it's a fabulous NAS apart from the two minor problems (the one we have discussed here and Twonky 5.1.4 not working). I'm starting to wonder if it should be renamed as a 'Qnapper' due to its soporific disk tendencies though. I have actually been a ReadyNAS user for years and have migrated for three main reasons - power efficiency, native Twonky support and RAID 6 capability – and apart from these odd bugs we’ve mentioned, I’m delighted with the NAS

Interesting that you've tried 3.2.5; do you use Twonky at all (I'm guessing maybe not if it's primary function is for backup)? I've found that it doesn't pick up any of my FLAC files and have thus reverted to the previous build (with Twonky 5.1.3). Oddly, others I know (from the Linn Products forum) seem to be using TS-401's with Twonky 5.1.4 so it looks to be a problem specific to the x86 ones like ours.

Let me know if you start a thread and I'll add my findings; I wonder if it would be best to call it something like the Qnap TS-X59 bugs thread (or something like that) as I'd guess the problems might be generic to the entire Intel Atom range of X59's.

Bri
User avatar
Briain
Been there, done that
 
Posts: 779
Joined: Tue Apr 20, 2010 11:56 pm
Location: Edinburgh (Scotland)
NAS Model: TS-459 Pro

Re: Preventing HDD spindown

Postby scalvin » Mon Apr 26, 2010 4:55 pm

I have now received an email (from the German QNAP dept.) confirming the reported bug as a new problem, which they will now relay to their Taiwan engineers to confirm and then possibly fix in the next firmware. Let's see how fast that goes.

In the meantime I have found that although the disks seem to ignore the prudent hdparm -S0 /dev/sdx commands (which may be a disk idiosyncracy, see page 225 in the "Deskstar 7K2000 & Ultrastar A7K2000 Specification v1.0" pdf at http://www.hitachigst.com/tech/techlib. ... tar_7K2000 ), they respond to hdparm -S251 (setting the standby time to 5hours30), which is good enough for now.

Max
scalvin
New here
 
Posts: 8
Joined: Sun Apr 25, 2010 5:53 pm
NAS Model: TS-659 Pro

Re: Preventing HDD spindown

Postby Briain » Mon Apr 26, 2010 5:23 pm

Hi Max

Thank you very mucn for the update (and the info; that's a useful document). It's very good timing as well as all my other disks just arrived a few minutes ago.

I'm on Samsung HE103UJ (enterprise) drives so I'll see if they actually respond to the zero setting first (below shows a screen dump from PuTTY):

[~] # hdparm -S0 /dev/sda

/dev/sda:
setting standby to 0 (off)
[~] #

I'll let you know if it actually changes anything with the disk itself. If not, I'll try 251

Bri :)
User avatar
Briain
Been there, done that
 
Posts: 779
Joined: Tue Apr 20, 2010 11:56 pm
Location: Edinburgh (Scotland)
NAS Model: TS-459 Pro

Re: Preventing HDD spindown

Postby Briain » Tue Apr 27, 2010 3:43 am

Hi

It seems that the issue is much worse if you turn hibernation off; the SMART stats indicate that it has now hibernated 110 times in this weekend (and it's been switched off for part of of that time) so the results are pretty horrendous. I think it must be very short glitches as I've not heard it spinning, but there's definitely something up though; I'm currently syncing the RAID and the SMART count has not incremented the counter over the past hour.

Setting hdparm on the Samsungs (either to 0 or a fixed duration) doesn't seem to help. I'm not sure how you view the current setting for that parameter (to see if it’s even recognised it).

Interestingly, I noticed that a post here which states 'My SS-439 (running beta 3.2.0-1107T) won't spin down its drives, apparently because the Samba nmbd daemon is writing /share/MD0_DATA/.locks/wins.dat regularly. I have the NAS configured to be the browse master (Network Services->Microsoft Networking->Domain master).' I'll try setting that up to see if it stops this cycling issue.

Bri
Last edited by Briain on Thu Apr 29, 2010 5:02 pm, edited 1 time in total.
User avatar
Briain
Been there, done that
 
Posts: 779
Joined: Tue Apr 20, 2010 11:56 pm
Location: Edinburgh (Scotland)
NAS Model: TS-459 Pro

Re: Preventing HDD spindown

Postby scalvin » Tue Apr 27, 2010 4:34 pm

There is no way to use hdparm to read out the standby timeout setting from the drive. When you set it, hdparm will tell you what the value means (i.e. setting -S0, it thinks it is turning off the standby). However, as I pointed out from the Hitachi documentation, -S0 does not necessarily turn off the timer and thus the drive has its own interpretation of these values. (The Hitachi documentation for my disks is somehow vague about this, in my view.)

Anyway, there are other ways the QNAP system daemons could potentially change settings or force immediate standby and so on, interfering with the raw drive settings.

I have for now simply set a long timeout -S251 for now (5:30h) for the first four drives, which the QNAP system somehow respects and which means that in our scenario the drives hardly ever sleep. The cycle counter does not increase much anymore now and maybe QNAP will issue a firmware fix soon (as far as I can see they have issued monthly firmware updates, roughly, so far.

BTW, the HDS722020ALA330 are rated for 300000 load cycles, *half* of which, at a worst 1/hour standby rate, would be reached only in about 17 years. Something else will fail before that is reached...

Max
scalvin
New here
 
Posts: 8
Joined: Sun Apr 25, 2010 5:53 pm
NAS Model: TS-659 Pro

Re: Preventing HDD spindown

Postby Briain » Tue Apr 27, 2010 6:09 pm

Hi Max

Yes, I have been looking and it seems there is no way to see the settings (as you have indeed said). I think that it wasn’t actually spinning the disks completely down (just a brief toggle) so it was likely less stress on the system than a full spin-down cycle. I noted the SMART start-stop count incrementing several counts in one minute but didn’t hear it spin down/up. The Samsung start-stop spec is only 50,000 so at over 50 a day, that’s less than 3 years.

I have some very good news though. Now that more disks have arrived, I performed a fresh installation of the system and set it up in a RAID 1 configuration. I then updated it to TS-659_3.2.4_Build0315.img and enabled Twonkymedia. I then set the NAS to spin-down the disks at the maximum time (1 hour) and it has sat with its disks spinning overnight (the SMART count start-stop has not changed and the disks are still spinning) so it's now doing exactly what I wish it to. FYI All other services (apart from Twonkymedia) like download station and multimedia station are currently switched off.

So the differences are as follows:

1. I have migrated from the default build to 3.2.4 as opposed to 3.2.5 then back to 3.2.4.
2. I now have 2 disks in the NAS as opposed to a single one (and it’s now RAID 1).

It looks like either issue 1 or issue 2 have resolved this hibernation hysteresis. Maybe the build has not been tested with a single disk (I guess a single disk installation would be an unusual configuration for a TS-X59 series), or if it's issue 2, maybe something left over from 3.2.5 has been causing the problems.

Anyhow, it's exactly where I want it so I'll leave it in service and see how it runs. I'm currently offloading all my music from a ReadyNAS NV+ to a Duo such that I can use the NV+ disks to move the Qnap to a RAID 6 set (the two NV+ ones have 10,000 hours on them so that'll give me a better spread of ages (2 new disks and 2 older ones) in my RAID set.

Bri
Last edited by Briain on Wed Apr 28, 2010 5:19 pm, edited 1 time in total.
User avatar
Briain
Been there, done that
 
Posts: 779
Joined: Tue Apr 20, 2010 11:56 pm
Location: Edinburgh (Scotland)
NAS Model: TS-459 Pro

Re: Preventing HDD spindown

Postby Briain » Wed Apr 28, 2010 5:13 pm

Well it lasted a few hours then it hibernated. I tried turning hibernation off and then the SMART Start_Stop_Count immediately started incrementing. I've set it to hibernate again to see if I can stop it going nuts; I think it's maybe also time to phone Qnap.

Bri
User avatar
Briain
Been there, done that
 
Posts: 779
Joined: Tue Apr 20, 2010 11:56 pm
Location: Edinburgh (Scotland)
NAS Model: TS-459 Pro

Re: Preventing HDD spindown

Postby QNAPJason » Wed May 19, 2010 3:42 pm

Hi all,
We have tested a TS-639 Pro and disabled the HDD standby function. It would not enter hibernation after 2 hours.
Please provide remote access for us so we can check it further.

Thanks

Jason
User avatar
QNAPJason
QNAP Staff
 
Posts: 4657
Joined: Thu May 21, 2009 2:14 pm
Location: Taipei
NAS Model: TS-x19P II

Next

Return to HDD Spin Down (HDD Standby)

Who is online

Users browsing this forum: No registered users and 5 guests