Cache drive not automatically spinning down?


Recommended Posts

I am running the latest 5.0 rc14 build and have noticed that the cache drive never spins down on it's own. In addition, I cannot edit the field for spin-up groups (which I'm not sure if I ever was able to do); but is there some reason why the cache drive is not spinning down on it's own?

Link to comment

I thought it had been only me, when i initially set it up the default option didn't work for me either if I remember right. Im on rc12a, so i just set it to 1 hour and problem solved. In my newbieness I thought that maybe it was normal that the defaut = never because its meant to reduce access time or something.

Link to comment

I have also the problem, that the cache drive does not spin down - it can be done manually, but it doesn't do it with the default value set in GUI.

have you rebooted since setting the timeout on the cache drive?

I have rebooted several times, also when I changed that setting.

However, the cache drive DOES spin down itself, if I manually do a

hdparm -S 3 /dev/sdX

I will later test, if that setting survives a reboot - if yes, I am fine with that :-)

Link to comment

Also, cache can't be part of a "spinup group" so yes, I probably should remove that from webGui even though it's always greyed out.

Huh, if the cache drive shares an IDE controller (master/slave) with another disk in the array it should be able to be in the same spinup group.      I think you must enable it for entry,  and not remove it.  Otherwise, media playback will pause when you go to write to the array  (and the disk controller spins up the cache drive for writing)

 

As far as the initial hdparm entry to set the spin-down delay on the cache drive. 

  Is it set?

    A. only once when starting the array

    B. Only once when first assigning the cache drive

    C every time the unRAID is booted

    D every time the array is started.

    E. Only when changed from the default via the settings screen for the cache disk.

 

Most people complaining their cache drive will not spin down are actively using it via some add-on.  It may be time to include the inotifywatch package, to make it easier for them to identify what is accessing the disk without having to install it as an add-on.

 

Joe L.

Link to comment

Also, cache can't be part of a "spinup group" so yes, I probably should remove that from webGui even though it's always greyed out.

Huh, if the cache drive shares an IDE controller (master/slave) with another disk in the array it should be able to be in the same spinup group.      I think you must enable it for entry,  and not remove it.  Otherwise, media playback will pause when you go to write to the array  (and the disk controller spins up the cache drive for writing)

Right ideally that's how should work.  But the spinup group feature is implemented in the unraid-driver.  What the driver does is check if each I/O request is going to cause a spin-up, and if so, checks if the target disk is in a spin-up group, and if so, sends spin-ups to all the disks in the group, except the target disk, to which it just sends the command (which will cause the disk to spin up).  But the cache disk is outside the array and I/O goes directly to the disk driver.  So limitation of cache disk in IDE setups is that it should be only device on cable, or possibly put the thing on a sata port.

 

As far as the initial hdparm entry to set the spin-down delay on the cache drive. 

  Is it set?

    A. only once when starting the array

    B. Only once when first assigning the cache drive

    C every time the unRAID is booted

    D every time the array is started.

    E. Only when changed from the default via the settings screen for the cache disk.

unraid does not use the in-drive spin-down delay feature of the hard drives.  The s/w monitors I/O and spins down drives when necessary.  I don't see an issue in this logic, should work even if external code spins the drive up.

 

Most people complaining their cache drive will not spin down are actively using it via some add-on.  It may be time to include the inotifywatch package, to make it easier for them to identify what is accessing the disk without having to install it as an add-on.

I'll ponder that one.

Link to comment

 

unraid does not use the in-drive spin-down delay feature of the hard drives.  The s/w monitors I/O and spins down drives when necessary.  I don't see an issue in this logic, should work even if external code spins the drive up.

I know that is the case for drives assigned to the protected array, but I'm sure I've seen hdparm used on the cache drive.

(Don't remember when I've lase seen a syslog setting the disk's spin-down-timer.  But I think I have seen one recently.  I might be wrong)    I was thinking you use hdparm to set the cache drive's internal spin-down timer.

 

In any case, some people are accessing directly at /mnt/cache, others through /mnt/user/dir_marked_as_cache_only

Not sure, but the first does not go through unRAID cdriver code at all, and the second only through the snfs file system.

 

Joe L.

 

Link to comment

 

unraid does not use the in-drive spin-down delay feature of the hard drives.  The s/w monitors I/O and spins down drives when necessary.  I don't see an issue in this logic, should work even if external code spins the drive up.

I know that is the case for drives assigned to the protected array, but I'm sure I've seen hdparm used on the cache drive.

(Don't remember when I've lase seen a syslog setting the disk's spin-down-timer.  But I think I have seen one recently.  I might be wrong)    I was thinking you use hdparm to set the cache drive's internal spin-down timer.

 

In any case, some people are accessing directly at /mnt/cache, others through /mnt/user/dir_marked_as_cache_only

Not sure, but the first does not go through unRAID cdriver code at all, and the second only through the snfs file system.

 

Joe L.

"hdparm -y" is used to spin-down.

"hdparm -S0" is used to spin-up.

 

A "cache-only" share is nothing more than any top-level directory on the cache disk that does not appear on one or more of the data disks.

Link to comment

 

hdparm -S 3 /dev/sdX

I will later test, if that setting survives a reboot - if yes, I am fine with that :-)

Just to give the feedback - it DID survive a warm reboot - so once I set it with command above all is fine. I forgot to test cold boot - but actually it is now working fine, so I can live with it like that - worst case would be to add the manual setting to go script ...

Link to comment

 

hdparm -S 3 /dev/sdX

I will later test, if that setting survives a reboot - if yes, I am fine with that :-)

Just to give the feedback - it DID survive a warm reboot - so once I set it with command above all is fine. I forgot to test cold boot - but actually it is now working fine, so I can live with it like that - worst case would be to add the manual setting to go script ...

Don't use the in-drive spindown timers for any array disk or cache disk.  unraid uses "hdparm -S0" to spin-up drives so it will get overridden.  unraid manages all drive spinup/spindown and the in-drive timers are not used.

Link to comment

I had a problem with the cache drive not spinning down when I upgraded from 4.7 to 5.0rc back in January.  I started to investigate, but when I changed the cache drive spin down delay it started working and I let it be.

 

I just now looked at my back-up of the 4.7 disk.cfg file and it appears the cache spin down delay is specified with

diskSpindownDelay.21=-1

In my current 5.0rc12a disk.cfg, the cache spin down delay is specified with

cacheSpindownDelay=-1

 

Perhaps the old 4.7 cache spindown delay is unrecognized by 5.0rc and it doesn't work until a new setting is applied.

Link to comment

I had a problem with the cache drive not spinning down when I upgraded from 4.7 to 5.0rc back in January.  I started to investigate, but when I changed the cache drive spin down delay it started working and I let it be.

 

I just now looked at my back-up of the 4.7 disk.cfg file and it appears the cache spin down delay is specified with

diskSpindownDelay.21=-1

In my current 5.0rc12a disk.cfg, the cache spin down delay is specified with

cacheSpindownDelay=-1

 

Perhaps the old 4.7 cache spindown delay is unrecognized by 5.0rc and it doesn't work until a new setting is applied.

I can confirm this.  In 4.7 the name of the parameter for the spin-down-delay of the cache drive is different.

 

Joe L.

Link to comment