Jump to content
Squid

[Plugin] CA Auto Turbo Write Mode

99 posts in this topic Last Reply

Recommended Posts

I too love this plugin, get consistent writes of 90MB/s straight to the array, nice!

Sent from my SM-G935F using Tapatalk

Share this post


Link to post

This has never worked for me. I have 20 disks and it always says 16 are spun down even though I have them all spun up. If I manually enable turbo write, it'll disable it because it thinks too many drives are spun down.image.png.6e04dd87a19cd5d04d689115307cf4e3.png

image.png.a15ca889c5a64a7078214cabc584aa9c.png

Edited by tyrindor

Share this post


Link to post

Looks like your log message might have a line feed causing a blank line in the syslog:

Dec  6 05:15:38 MediaServer kernel: mdcmd (167): set md_write_method 0
Dec  6 05:15:38 MediaServer kernel: 

Not a big issue, but adds to the log.  Could you also change the message to 'set turbo write enable/disable' rather than 'set md_write_method 0/1'?

Share this post


Link to post
Looks like your log message might have a line feed causing a blank line in the syslog:
Dec  6 05:15:38 MediaServer kernel: mdcmd (167): set md_write_method 0Dec  6 05:15:38 MediaServer kernel: 

Not a big issue, but adds to the log.  Could you also change the message to 'set turbo write enable/disable' rather than 'set md_write_method 0/1'?

That message and the blank line is logged by the md driver, not the plugin

Sent via telekinesis

Share this post


Link to post
This has never worked for me. I have 20 disks and it always says 16 are spun down even though I have them all spun up. If I manually enable turbo write, it'll disable it because it thinks too many drives are spun down.image.png.6e04dd87a19cd5d04d689115307cf4e3.png
image.png.a15ca889c5a64a7078214cabc584aa9c.png
Enable debug logging and then post diagnostics

Sent via telekinesis

Share this post


Link to post
4 hours ago, Squid said:

That message and the blank line is logged by the md driver, not the plugin

Sent via telekinesis
 

Ok.  I'll post a bug report.

Share this post


Link to post

Hi,

 

I have a similar issue: 4 drives shown as spun down even though the MAIN tab has them spun up.

image.png.d01f5c2f8183a5c9f1b7783dd861cd7b.pngimage.png.e5164684f84f917eac64ee25e9eb4333.png

 

I enabled debug logging and shortened the polling time. I also issued the spin up command to no avail.

Quote

Dec 6 16:07:28 atlas root: Starting Auto Turbo
Dec 6 16:07:28 atlas root: #012/dev/sdb:#012 drive state is: standby
Dec 6 16:07:28 atlas root: #012/dev/sdc:#012 drive state is: standby
Dec 6 16:07:28 atlas root: #012/dev/sde:#012 drive state is: standby
Dec 6 16:07:28 atlas root: #012/dev/sdf:#012 drive state is: standby
Dec 6 16:07:28 atlas root: Total Spundown: 4
Dec 6 16:07:28 atlas root: Entering Normal Mode
Dec 6 16:07:28 atlas kernel: mdcmd (197): set md_write_method 0
Dec 6 16:07:28 atlas kernel: 
Dec 6 16:07:48 atlas root: #012/dev/sdb:#012 drive state is: standby
Dec 6 16:07:48 atlas root: #012/dev/sdc:#012 drive state is: standby
Dec 6 16:07:48 atlas root: #012/dev/sde:#012 drive state is: standby
Dec 6 16:07:48 atlas root: #012/dev/sdf:#012 drive state is: standby
Dec 6 16:07:48 atlas root: Total Spundown: 4
Dec 6 16:07:49 atlas emhttpd: req (37): cmdSpinupAll=true&startState=STARTED&csrf_token=****************
Dec 6 16:07:49 atlas emhttpd: Spinning up all drives...
Dec 6 16:07:49 atlas emhttpd: shcmd (286): /usr/sbin/hdparm -S0 /dev/sdg
Dec 6 16:07:49 atlas kernel: mdcmd (198): spinup 0
Dec 6 16:07:49 atlas kernel: mdcmd (199): spinup 1
Dec 6 16:07:49 atlas kernel: mdcmd (200): spinup 2
Dec 6 16:07:49 atlas kernel: mdcmd (201): spinup 5
Dec 6 16:07:49 atlas kernel: mdcmd (202): spinup 6
Dec 6 16:07:49 atlas root: 
Dec 6 16:07:49 atlas root: /dev/sdg:
Dec 6 16:07:49 atlas root: setting standby to 0 (off)
Dec 6 16:07:49 atlas emhttpd: shcmd (287): /usr/sbin/hdparm -S0 /dev/sdh
Dec 6 16:07:49 atlas root: 
Dec 6 16:07:49 atlas root: /dev/sdh:
Dec 6 16:07:49 atlas root: setting standby to 0 (off)
Dec 6 16:08:08 atlas root: #012/dev/sdb:#012 drive state is: standby
Dec 6 16:08:08 atlas root: #012/dev/sdc:#012 drive state is: standby
Dec 6 16:08:08 atlas root: #012/dev/sde:#012 drive state is: standby
Dec 6 16:08:08 atlas root: #012/dev/sdf:#012 drive state is: standby
Dec 6 16:08:08 atlas root: Total Spundown: 4

 

What might help is those 4 disks (1/2/5/6) are on a Dell H310 Perc in IT Mode. The card has never given me trouble otherwise. Here is hdparm and it recognizes my cache drives as being active (on Intel Chipset) but not the drives on the H310:

 

Quote

Linux 4.18.17-unRAID.
Last login: Wed Dec  5 10:48:33 -0800 2018 on /dev/pts/2.
root@atlas:~# hdparm -C /dev/sdb

/dev/sdb:
 drive state is:  standby
root@atlas:~# hdparm -C /dev/sdc

/dev/sdc:
 drive state is:  standby
root@atlas:~# hdparm -C /dev/sde

/dev/sde:
 drive state is:  standby
root@atlas:~# hdparm -C /dev/sdf

/dev/sdf:
 drive state is:  standby
root@atlas:~# hdparm -C /dev/sdg

/dev/sdg:
 drive state is:  active/idle
root@atlas:~# hdparm -C /dev/sdh

/dev/sdh:
 drive state is:  active/idle

 

Think I'm just SOL because of the H310?

Share this post


Link to post
8 hours ago, jelthi said:

Hi,

 

I have a similar issue: 4 drives shown as spun down even though the MAIN tab has them spun up.

image.png.d01f5c2f8183a5c9f1b7783dd861cd7b.pngimage.png.e5164684f84f917eac64ee25e9eb4333.png

 

I enabled debug logging and shortened the polling time. I also issued the spin up command to no avail.

 

What might help is those 4 disks (1/2/5/6) are on a Dell H310 Perc in IT Mode. The card has never given me trouble otherwise. Here is hdparm and it recognizes my cache drives as being active (on Intel Chipset) but not the drives on the H310:

 

 

Think I'm just SOL because of the H310?

Yeah, the plugin doesn't work for me either - and I have a Perc H310. So I think it's the culprit. 

Share this post


Link to post

This plugin doesn't work for me either.  It also is reading that 4 drives are spun down and all 8 of my drives are on the same LSI3008 controller and set to never spin down.

Share this post


Link to post

I was getting ready to try this out but it sounds like it may not work for me either (all my cards are Perc H200s). @Squid Is this a confirmed issue?

Share this post


Link to post
1 hour ago, weirdcrap said:

I was getting ready to try this out but it sounds like it may not work for me either (all my cards are Perc H200s). @Squid Is this a confirmed issue?

I have no problems with my PercH200 (cross flashed to LSI firmware & IT mode) 

Share this post


Link to post
27 minutes ago, Squid said:

I have no problems with my PercH200 (cross flashed to LSI firmware & IT mode) 

Sweet, I'll give it a try then thanks!

Share this post


Link to post

Ok so I installed the plugin and even after spinning up all drives it detects one drive as spundown. I ran hdparm on each disk and one of the disks on the H200 is reporting a status of "Unknown". The offending disk is /dev/sdg and it is a Seagate NAS HDD. I have another one of the same disk model installed and it reported it's status fine (sdf).

 

EDIT: weird after spinning SDG down and back up it is now detecting correctly.

EDIT2: Spoke to soon, left it for a minute or so and now SDG is back to unknown. It seems to snap out of it once I start copying data. 

 

root@Node:/home/chris# hdparm -C /dev/sdh

/dev/sdh:
 drive state is:  active/idle
root@Node:/home/chris# hdparm -C /dev/sde

/dev/sde:
 drive state is:  active/idle
root@Node:/home/chris# hdparm -C /dev/sdj

/dev/sdj:
 drive state is:  active/idle
root@Node:/home/chris# hdparm -C /dev/sdk

/dev/sdk:
 drive state is:  active/idle
root@Node:/home/chris# hdparm -C /dev/sdl

/dev/sdl:
 drive state is:  active/idle
root@Node:/home/chris# hdparm -C /dev/sdb

/dev/sdb:
 drive state is:  active/idle
root@Node:/home/chris# hdparm -C /dev/sdf

/dev/sdf:
 drive state is:  active/idle

root@Node:/home/chris# hdparm -C /dev/sdg

/dev/sdg:
 drive state is:  unknown
root@Node:/home/chris# hdparm -C /dev/sdg

/dev/sdg:
 drive state is:  unknown
root@Node:/home/chris# hdparm -C /dev/sdi

/dev/sdi:
 drive state is:  active/idle
root@Node:/home/chris# hdparm -C /dev/sdd

/dev/sdd:
 drive state is:  active/idle

 

Edited by weirdcrap

Share this post


Link to post

I dont spin my drives down and this plugin detects that all 6 of my data drives are spun down.  Bit I guess for me it's not a big deal because since I dont spin my drives down I can just set turbo write as the default.

Share this post


Link to post

Same here. The number does not reflect the number of spun down drives as the dashboard report. Crossflashed IBM M1015.

 

 

Capture_ServerMain_-_Google_Chrome_2019-02-27_15-30-48_66643264.png

Capture_ServerTurbo_-_Google_Chrome_2019-02-27_15-30-35_78407071.png

Edited by Niklas

Share this post


Link to post

The dashboard isn't real time when in doubt about the status of the drivers enable the logging in the plugin and you'll see what the drive reports

Sent via telekinesis

Share this post


Link to post
On 2/27/2019 at 3:46 PM, Squid said:

The dashboard isn't real time when in doubt about the status of the drivers enable the logging in the plugin and you'll see what the drive reports

Sent via telekinesis
 


Ok, thanks. Will look in to it.
Never seen 0 spun down. Always at least 1.

Edit:

Quote

Feb 27 18:37:36 Server root: #012/dev/sdg:#012 drive state is: unknown
Feb 27 18:37:36 Server root: #012/dev/sdf:#012 drive state is: standby
Feb 27 18:37:36 Server root: #012/dev/sde:#012 drive state is: standby
Feb 27 18:37:36 Server root: Total Spundown: 3

hm, sdg is spun up.


smartctl -i -n standby /dev/sdg seems to work better. Nothing "unknown" with smartctl.

Quote

root@Server:~# smartctl -i -n standby /dev/sdg (up)
smartctl 7.0 2018-12-30 r4883 [x86_64-linux-4.19.24-Unraid] (local build)
Copyright (C) 2002-18, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Seagate IronWolf
Device Model:     ST4000VN008-2DR166
Serial Number:    
LU WWN Device Id: 5 000c50 0b29c58c1
Firmware Version: SC60
User Capacity:    4,000,787,030,016 bytes [4.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    5980 rpm
Form Factor:      3.5 inches
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ACS-3 T13/2161-D revision 5
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Wed Feb 27 18:49:33 2019 CET
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
Power mode was:   IDLE_B
 

root@Server:~# smartctl -i -n standby /dev/sdf (down)
smartctl 7.0 2018-12-30 r4883 [x86_64-linux-4.19.24-Unraid] (local build)
Copyright (C) 2002-18, Bruce Allen, Christian Franke, www.smartmontools.org

Device is in STANDBY mode, exit(2)

root@Server:~# smartctl -i -n standby /dev/sde (down)
smartctl 7.0 2018-12-30 r4883 [x86_64-linux-4.19.24-Unraid] (local build)
Copyright (C) 2002-18, Bruce Allen, Christian Franke, www.smartmontools.org

Device is in STANDBY mode, exit(2)

Same with hdparm:
 

hdparm -C /dev/sdg (up)

/dev/sdg:
 drive state is:  unknown

(counted as spun down in the code, when actually spun up)

 

hdparm -C /dev/sdf (down)
/dev/sdf:
 drive state is:  standby
 

hdparm -C /dev/sde (down)

/dev/sde:
 drive state is:  standby
 


Edit again
https://www.smartmontools.org/wiki/Powermode

Replace in /usr/local/emhttp/plugins/ca.turbo/scripts/auto_turbo.php, set "Enable Automatic Turbo Mode" to no and then yes. Try. :)

Line 80:

$result = shell_exec("smartctl -i -n standby /dev/{$disk['device']} | awk 'NR==4'");

Line 84:

if ( strpos($result,"STANDBY") || strpos($result,"SLEEP") ) { 

gives me good result. 

 

Also changed the logging to be more clear for people like me (a bit stupid, lol)

logger("Total Data Drives Spun Down: $totalSpunDown/" . count($validDisks));

= "Feb 27 19:55:36 Server root: Total Data Drives Spun Down: 2/3"
 

with hdparm and "if ( ! strpos($result,"active") ) {" the code counts unknown as spun down because it can't find "active".

I guess it won't work good with devices or hba's without smart support? Could fall back to hdparm if so.

Edited by Niklas

Share this post


Link to post

Small update. The change gives me very consistent result. :)

Share this post


Link to post

I find these in my syslog:

Mar 12 18:37:46 SUN kernel: mdcmd (53): set md_write_method 1
Mar 12 18:37:51 SUN kernel: mdcmd (54): set md_write_method 0
Mar 12 18:47:09 SUN kernel: mdcmd (55): set md_write_method 1
Mar 12 18:47:14 SUN kernel: mdcmd (56): set md_write_method 0

 

I actually had this written in my GO file. md_write_method 1. This I assume turns on turbo mode, right? I did REM out that statement when I installed this plugin, but may just uninstall the plugin and put back the command since I never spin down any of my drives....ever. What would be my best most efficient method to keep turbo mode turned on? Keep this command  "set md_write_method 1" in my GO file? And that would keep turbo mode on all the time, correct?

Also the plugin is indicating I have 2 spun down drives, but all my drives spun up and none of them never spin down so I would rather uninstall the utility but want to make sure I have the correct syntax and placement of the command in the GO file. Thanks.

Share this post


Link to post

No need to do it in the go file. Go to Settings -> Disk settings and change "Tunable (md_write_method)" from "Auto" to "reconstruct write".

Share this post


Link to post
16 minutes ago, Niklas said:

No need to do it in the go file. Go to Settings -> Disk settings and change "Tunable (md_write_method)" from "Auto" to "reconstruct write".

Damn, so many options and settings all over I miss them easily. Thanks for pointing that out. After I work on my media player read speed tests for a bit I'll make that change and be done with it. :)

 

Thanks!

Share this post


Link to post
On 3/1/2019 at 2:33 PM, Niklas said:

Small update. The change gives me very consistent result. :)

took over your changes and i can confirm with these changes the script actually detects how many drives are spun up correctly. (I'm using a Broadcom SAS 9305-24i HBA for the drives)

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.