Jump to content

Squid

Community Developer
  • Posts

    28,769
  • Joined

  • Last visited

  • Days Won

    314

Everything posted by Squid

  1. At least the script is done... I just hate HTML.... I don't suppose you'd just let me package user.scripts with this?
  2. EDIT: Added to the GUI built-in support for scheduling turbo mode on or off at certain times of the day Rather than add in a GUI for scheduling of turbo on or off, (which would entail the need to support multiple / expandable schedules), here's a script for user.scripts which will enable / disable turbo mode, and stop / restart this plugin if it was running. It will also handle overlapping schedules when running multiple versions of it via user.scripts and only restart the plugin after all scheduled tasks have completed. There was also an update pumped out to the plugin to display when it is being overriden by this script. We'll address a proper GUI for this instead of leveraging the user.scripts plugin depending upon demand.... Set whatever cron schedule you want for the script. (Anything but array stop / start) At the completion of the script, this plugin will either be restarted, or unRaid's settings for turbo mode will be reactivated if the plugin wasn't running. #!/usr/bin/php <?PHP #description=Script to enable or disable CA auto turbo mode #backgroundOnly=true $enableTurboMode = true; # set to false if you want the schedule to disable turbo mode $duration = 60; # set to number of minutes to keep turbo mode enabled / disabled # ie: how long to disable the auto script for exec("mkdir -p /tmp/ca.tmp/otherPIDs"); $myPID = getmypid(); file_put_contents("/tmp/ca.tmp/otherPIDs/$myPID",$myPID); if ( is_file("/tmp/ca.turbo/PID") ) { $scriptPID = file_get_contents("/tmp/ca.turbo/PID"); posix_kill($scriptPID,SIGKILL); # kill the running auto script unlink("/tmp/ca.turbo/PID"); $runningFlag = true; } $mode = $enableTurboMode ? "1" : "0"; $status['spundown'] = "Unknown"; $status['mode'] = $enableTurboMode ? "turbo" : "normal"; $status['override'] = true; file_put_contents("/tmp/ca.turbo/status.json",json_encode($status, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT)); exec("/usr/local/sbin/mdcmd set md_write_method $mode"); sleep($duration * 60); unlink("/tmp/ca.tmp/otherPIDs/$myPID"); # Check if any other overlapping schedules happen to still be running. # Don't restart ca auto turbo if a schedule is still active # If no other active schedules, either restart CA Auto Turbo or restore unRaid's settings $dirContents = array_diff(@scandir("/tmp/ca.tmp/otherPIDs/"),array(".","..")); if (empty($dirContents) ) { unlink("/tmp/ca.turbo/status.json"); if ( $runningFlag ) { $descriptorspec = array( 0 => array("pipe", "r"), 1 => array("pipe", "w"), 2 => array("file", "/tmp/error-output.txt", "a") ); proc_open("/usr/local/emhttp/plugins/ca.turbo/scripts/auto_turbo.php",$descriptorspec,$pipes); } else { $unRaidSettings = parse_ini_file("/boot/config/disk.cfg"); echo "Restoring unRaid settings"; exec("/usr/local/sbin/mdcmd set md_write_method {$unRaidSettings['md_write_method']}"); } } ?>
  3. not sure. I don't have that problem. Looking in the logs for sonarr might shed a clue...
  4. on both containers it needs to be either /data or /downloads. Nutshell: Sab tells sonarr the file is in /data/folderName/filename Sonarr looks in that folder and doesn't see a file because you've never mapped /data to it. You'd see it in the logs for sonarr. It'll say unable to import /data/whatever
  5. No it won't be, but it also won't hurt with it enabled either...
  6. Edit the container, then edit the path. Under access mode select RW Slave Yah, thats what I mean by the host / container side of things. On the two containers, the container side (say /downloads) and the host side (/mnt/disks/whateverYouHadAbove) must be exactly the same for both containers. See this: Or for @CHBMB's explanation see here: (Personally, I think mine is better )
  7. These folders (/mnt/disks/..) have to be passed through to any docker container with the "slave" option available when you edit the container. 99% of the time problems with imports and renaming is that the volume mapping for the downloads folder within sab and sonarr have to match exactly on both apps -> both the host side and the container side. sonarr http://www.dslreports.com/faq/10705 sonarr should handle it all automatically
  8. Like anything else in the world ymmv though the real key thing to keep in mind is that if you have a situation such as docker apps running without a cache drive is that once the plugin switches to turbo mode it will always stay in turbo mode because writes will be constant and continuous. This week's update will add in scheduling to force turbo on or off at certain times of the day... Sent from my SM-T560NU using Tapatalk
  9. Many BIOS's will list the flash drive in the boot order as both UEFI and as just the name of the drive. Select the non-UEFI version.
  10. Yeah, that'll work. Technically, you only require the first #!/bin/bash though....
  11. lol I would say no because its more work on my part vs something you can easily figure out for yourself. Now, if adding / removing drives was a very common occurrence then I would say OK. It is really nothing to add, but IMO the value is only ever going to get set to be 0-1-2 drives anyways. And if the write requires one of those 2 drives to be spun up to write, then it'll switch into turbo mode anyways. As an aside, the default polling time is 300 seconds. I've set it to be 1 sec during development, and no stuttering or anything happened on my system while playing back. Further FYI, for accuracy, I directly issue the hdparm -C command rather than relying on what unRaid thinks is spinning because it has its own polling time. Further testing notes: While copying a 100g test file, I switched unRaid back and forth from turbo to normal (and vice versa) about 100 times and compared md5's of the source and destination. unRaid handled no problems constant switching of the write mode and didn't corrupt the file at all.
  12. Should work. But you also need to move the mount point. There's an entry in the docker FAQ about containers not being able to see mounts from another machine (although you haven't run into it yet) Sent from my LG-D852 using Tapatalk
  13. You need to make the mount point within /mnt/disks and also use slave mode when assigning the paths in the template. You may also need to modify permissions accordingly Sent from my LG-D852 using Tapatalk
  14. Shouldn't be able to affect it. After the installation starts, the browser has nothing to do with it...
  15. Phoque it. I'm at a loss. I've asked a moderator to split these posts out to a separate posting as nothing here is making any sense, and we need more eyes on it... There aren't any meaningful errors being reported. You said you've reformatted the flash drive. My hail mary question is to ask if when you formatted it you made sure that it was FAT-32, not exFat or NTFS...
  16. Start the array and try it again.... If still no go, then try installing this: And then go to Settings - fix common problems and run a scan and post up what it finds
  17. Just for giggles, can you delete from the flash drive /config/network.cfg, reboot and then try an install again...
  18. If you can't grab diagnostics via the command line, then post up: Output of df Save the syslog to the flash drive and then upload it here cp /var/log/syslog /boot/syslog.txt Output of ls /var/log/plugins
  19. Then the easy solution (albeit extreme) is to stop the array, the on the main tab, click on disk 1, change the format to be XFS and then start the array. A Button will then appear prompting you to format the drive. ( Or follow what @johnnie.black is asking you to do -> he's the resident expert ) BTRFS is required on cache drives if you want to use (or ultimately use) a cache pool. For the array, its recommended to always use XFS. BTRFS seems to be a rock solid filesystem as long as nothing goes wrong. If / when something goes wrong (ie: server crash, power failure, etc) then it seems to be overwhelmingly the absolute worst file system to use as it is very sensitive to abnormalities.
  20. Trial has no size limitations -> only time limitation
×
×
  • Create New...