[solved] I found that my hard drives ate not spinning down anymore


Recommended Posts

 

I might need some help. Before way past in build 6.5.4 my drives were working great.

 

Not I'm on 6.7.0 and upgraded all the way through the past updates. My drives are just won't spin down, even if I'm not using them. I kept hoping for an update to grt that fixed, but maybe the problem is something in my setup.

 

Can someone help me or direct me where to look up? I have attached my logs

 

http://cloud.tapatalk.com/s/5ce1adad3c3eb/tower-diagnostics-20190519-1924.zip

 

Sent from my Pixel 2 XL using Tapatalk

 

 

 

tower-diagnostics-20190519-1924.zip

Edited by gacpac
Link to comment

No particularly obvious reason.  The only way to diagnose this is:

 

  • After a manual spindown, do they spin back up?
  • If they do, then some app you've got installed is accessing them.  unRaid doesn't spin up drives unless an access happens.
  • Now you have to begin shutting down apps to see what is going on, and which one is accessing them (one initial culprit may be cache.dirs)
Link to comment
No particularly obvious reason.  The only way to diagnose this is:
 
  • After a manual spindown, do they spin back up?
  • If they do, then some app you've got installed is accessing them.  unRaid doesn't spin up drives unless an access happens.
  • Now you have to begin shutting down apps to see what is going on, and which one is accessing them (one initial culprit may be cache.dirs)
When they are spinning. I get temperature stats and green icon next to the hard drive.

When I spin down, they stay green, but they don't give me temperature status. And after while then they give me the temperature again.

Let me start with the cache dirs disable and see. Could plex be doing this too?



Sent from my Pixel 2 XL using Tapatalk

Link to comment
Sure.  If it's continually scanning the media (Along with Windows -> especially if you've mapped a drive to the share)
I do have shares mapped in my pc and plex to automatically scan when movies are added. But as of today I haven't used my computer and no new movies or tv shows either.

I think this is going to be a chase down a rabbit hole.

Sent from my Pixel 2 XL using Tapatalk

Link to comment

I found specific files preventing my disks to spin down.

Nextcloud has one specific file and my transmission docker has some other file.

How can I map only specific files to the cache? I say this because I want nextcloud to keep saving my files to the array. I don't care much for the nextcloud.log



Sent from my Pixel 2 XL using Tapatalk

Link to comment
11 hours ago, OOmatrixOO said:

I have the same problem with the nextcloud.log. Every 15 minutes does nextcloud write to this file and the hard drive can not spin down. 

Yep. And also other folders that are located in the Share for apps that nextcloud uses. :s

Link to comment
Any news? Could you solve this problem? 
For nextcloud. This was my solution. I'm still having problems with the torrent client but i already asked in the specific forum.

Nextcloud commands

Monday, May 6, 2019
7:45 PM

Move the nextcloud.log from Share to var/logs

www-data probably has not enough permissions to create the file itself.
sudo touch /var/log/nextcloud.log
sudo chown abc /var/log/nextcloud.log

From


Log configuration


Parameters
Logging levels range from DEBUG, which logs all activity, to FATAL, which logs only fatal errors.
• 0: DEBUG: All activity; the most detailed logging.
• 1: INFO: Activity such as user logins and file activities, plus warnings, errors, and fatal errors.
• 2: WARN: Operations succeed, but with warnings of potential problems, plus errors and fatal errors.
• 3: ERROR: An operation fails, but other services and operations continue, plus fatal errors.
• 4: FATAL: The server stops.

From



I have added the links for reference. I changed my log to 1. It was on 0

Sent from my Pixel 2 XL using Tapatalk

Link to comment

Thanks Everyone for your ideas. 

 

I found the problem was clearly the nextcloud logs going to a share instead of the cache. Also, the transmission docker container constantly reading the transmission.log and blocklist.bin from the array.

 

The solution was to move the /data from transmission to the cache by mapping. Also checking with krusader that the files were properly in cache nothing left in the array. As for the nextcloud I had to recreate the nextcloud.log using the console of the docker container. 

 

I added the log to the /var directory, but I believe it can be created somewhere else. Anyhow, the commands are

 

sudo touch /var/log/nextcloud.log 
sudo chown abc /var/log/nextcloud.log

 

I explained that in the link 

 

 

Link to comment
  • 2 years later...

I have found that Nextcloud keeps the data share spun up all the time, if I spin it down it spins it right back up a few seconds later. The fact that nextcloud is designed to be run off cache and not the array is not known or spoken about in alot of these forums. I just want to say that my nextcloud is installed as it should be and my drives do not spin up and the reason is that I used the mover to move all the data and I have 118 GB only right now to the cache drives "three 1TB NVME" drives. Nextcloud data must be saved to the cache drives or this is normal for your disk or disks to be spun up due to smart check which runs almost continiously in this situation. I was able to move my data easily with the mover, just selected prefer cache and it took a few moments and then the hard drives spun down 15 min later and stayed down. In fact, speaking on the topic Appdata, docker, domains, isos share and system are all set to prefer systemfiles, "systemfiles is a particular name I granted to a 512GB m.2 that I use for all my data. The unraid is running off a usb, all the apps and docker run off their own 512gb ssd. I intentionally set things like this because I do not like the program running my discs, it makes me pretty peeved when they run for no reason. I have zero system errors in fix common problems but it took alot of investigation as to how things should be configured and one thing I will say is that you can do yourself a favour by having lots of cache i mean lots at least 3 tb and a 4th ssd for the system files to run on. I do not allow anything but stored data to save to my spinning discs. I will not tolerate them spinning for no reason with their great expense at $700 a drive. that is unnaceptable, I reinstalled unraid many times before I learned what I was doing wrong, it can be a real bear to troubleshoot. But I will say this, if your discs are staying spun up it is not from mapped drives available on your desktop, just mapping the shares will not make the discs spin constantly unless your antivirus is set to scan network shares, I switched this off and I scan these manually as needed. If your drives are spinning constantly then guaranteed your shares are not set properly and you have apps installed to the array, don't intall any apps to the array, the only things you should select a share that saves to the array for is when your selecting data container location for installations. This is the location a program like "jellyfin", where it would find your data and movie files. Nextcloud is the only app that keeps hard drives spun up continiously and the solution is here how to solve it, don't look for that log file thats not a true way to fix it, they dont know what they are talking about and I do. The only reasons your discs spin constantly is improperly planned installations and where your shares are saved, selecting prefer seems to be the best option over only it gives no error messages and all the data is moved eventually to the location you prefer. so select places there is an ssd. its quite simple to stop all the discs from spinning, again, alot of people need to simply delete the docker file, select the check mark and press delete, before you do that uninstall all your apps then delete the docker file and select the designated ssd for it thats the proper way to setup unraid docker. ssds are essential for it to run properly, without ssd all your drives will spin constantly wearing them out and p*ssing u off. Most of the stuff i read on the forums is crap and garbage and you should take it with a grain of salt there are alot of mor*ons on here making posts not naming anyone in particular but they just dont know how to configue anything properly to get the desired outcome. Read my typing when you see it and don't mess up your system following bad posts like I did in my learning process.

 

Best of luck to everyone and don't be upset these corrections only take a few moments, most of the problems people are having is just a few simple changes and its going to be running like a beautiful blonde on the beach.

Edited by RYZEN5000
Link to comment
  • 3 weeks later...

Further to update from my last post I have found a way to allow nextcloud to be located on the array while reducing disk spin, in fact they do not spin unless accessed.

This is due to the file Nextcloud.log which nextcloud writes to regularly and it gets installed in the same place as the data container. This can be corrected with a very simple

command into the nextcloud console and discs will  spin down and stay down. I call it the logging fix Here is: 

 

occ config:app:set admin_audit logfile --value=/var/log/nextcloud/audit.logocc config:app:set admin_audit logfile --value=/var/log/nextcloud/audit.log

 

paste this command into the console and it will correct the disk spinning annoyance. The Nextcloud.log will not be moved, it writes to a different log file instead. You don't need to worry about it anymore.

 

I will do another topic on how to setup nextcloud properly so it gets average 40 mbs -70-80 mbs peak upload speed, next time I come on here. I will talk about how to configure a reverse proxy.

I figured that one out the hard way, Nextcloud is super fast and efficient and its the best cloud storage I have ever seen when its configured properly. All the things I love about Unraid; Nextcloud is now one of them, but it took many weeks to figure out how to do it right. You need at least 3 other apps installed to do this setup. Total 4 apps to run Nextcloud, if you have only Nextcloud then no wonder you have poor performance. Nextcloud is faster than lightening when its fully set up right.

 

I repeat, you can not get good performance out of Nextcloud with only Nextcloud installed, you need to install 3 other specific apps from the community.

These complete the Nextcloud installation. I'll talk more about this later.

Edited by RYZEN5000
Link to comment
2 hours ago, RYZEN5000 said:

This can be corrected with a very simple

command into the nextcloud console and discs will  spin down and stay down. I call it the logging fix Here is: 

 

occ config:app:set admin_audit logfile --value=/var/log/nextcloud/audit.logocc config:app:set admin_audit logfile --value=/var/log/nextcloud/audit.log

 

paste this command into the console and it will correct the disk spinning annoyance. The Nextcloud.log will not be moved, it writes to a different log file instead.

So where is this replacement log writing? RAM? docker image file? mapped config folder?

Link to comment

IT writes to /var/log/nextcloud/audit.log now please read my entire instructions for installation of nextcloud to learn more about the perfect setup and its super fast. destroys google drive in every way. I have upload speeds of 99mbs often. You will never see upload speed and reliabilty like this anywhere else. I can't say I know where its written exactly I found the location with krusader so I know it exists and thats what Im using it for it works fantastic. Its the perfect location. Oh boy I have a treat for everyone here. See my next post please for Amazing Nextcloud performance via proper installation done by me, invented by me.

Edited by RYZEN5000
Link to comment

Guide to installing Nextcloud to achieve the top performance. Get the absolute highest speeds out of upload and download.  The GUI, everything works perfectly. This is the ONLY way to properly install it.

You will need the following in order to install nextcloud professionally for commercial performance.

One: First Get a Domain name from a paid service, create an “A” name pointing to your public ip address. Direct your main domain to your public ip. Create some other “A” names to be alternative names to reach Nextcloud.

1.       Postgresql14

2.       Redis

3.       Nginxproxymanager

4.       Nextcloud

 

1.       Docker network create nextcloud

Type it into into main page cmd prompt. Select this docker network for all 4 apps in nextcloud installation when you do the installs.

 

2.       Install Postgresql14 create a database remember your username and password u created. If docker container doesn’t pull down properly and fails then change some ports if they are already in use.

 

3.       Install nextcloud and setup admin account and enter database info to proceed with the installation.  For trouble connecting make sure password is correct and use adminer to see if your database was created properly. If not then create one again.

 

-This is done one of three ways. During initial program installation of Postgresql14.

-Through adminer

-Through console for postgresql14

 

mysql -uroot -p
mypassword
CREATE USER 'me' IDENTIFIED by 'mypassword';
CREATE DATABASE IF NOT EXISTS nextcloud;
GRANT ALL PRIVILEGES ON nextcloud.* TO 'me' IDENTIFIED BY 'password';
FLUSH privileges;

 

Done

 

4.       Install Redis

5.       Enter config by path appdata\nextcloud\www\nextcloud\config.php and configure in Redis by these instructions.

 

Installing Redis in Unraid is super easy if you have Community Applications installed. It's as easy as searching Redis under apps and clicking install. Make sure to install the one provided from the official Redis user. Also note which port you use since you will need to reference this from the Nextcloud config file.  Configuring Nextcloud to use Redis Getting Nextcloud to use your new Redis instance is pretty easy. All we need to do is modify the config.php file for Nextcloud to point to our Redis instance. To do this open your config.php file (location is /mnt/use r/appdata/nextcloud/www/nextcloud/config/config.php if using default appdata path in Unraid with the Linuxserver Nextcloud container). We want to add these lines into the $CONFIG array:

'memcache.local' => '\\OC\\Memcache\\Redis', 'memcache.locking' => '\\OC\\Memcache\\Redis', 'redis' => array ( 'host' => '192.168.1.10', 'port' => 6379, ),

 

Make sure to change the host and port to point to match your Redis instance (this information can be found on the docker list page within Unraid).

 

Fit the code in below $CONFIG = array (

 

It should look like this below

 

 

<?php

$CONFIG = array (

  'memcache.local' => '\\OC\\Memcache\\Redis',

  'memcache.locking' => '\\OC\\Memcache\\Redis',

  'redis' =>

  array (

    'host' => '192.168.0.237',

    'port' => 6379,

  ),

  'memcache.local' => '\\OC\\Memcache\\APCu',

  'datadirectory' => '/data',

  'instanceid' => 'ocngtohwogm1',

  'passwordsalt' => 'DQhQQmvfoMGnRn+TRVE2SP2S7D6XJj',

  'secret' => 'r3itX9tIDNIGufar5EvCe7PGCDl+1GyKufrVQ6agXAIiNzgZ',

  'trusted_domains' =>

 

Great, you have now setup memcache with two services for extra speed. Redis and APCu. U need both.

 

If you get an error in your redis log just type this command and reset rednis.

<<<<<<<<<<<<>>>>>>>>>>>>>>>>

sysctl vm.overcommit_memory=1

<<<<<<<<<<<<>>>>>>>>>>>>>>>>

This gets typed into the main console comand promt not the redis one.

example:

Error

1:M 06 Dec 2021 04:39:22.056 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.

 

Example: This is how I believe it should look.

After the command:

 

1:M 06 Dec 2021 06:14:09.719 * monotonic clock: POSIX clock_gettime
1:M 06 Dec 2021 06:14:09.719 * Running mode=standalone, port=6379.
1:M 06 Dec 2021 06:14:09.719 # Server initialized
1:M 06 Dec 2021 06:14:09.719 * Loading RDB produced by version 6.2.6
1:M 06 Dec 2021 06:14:09.719 * RDB age 1 seconds
1:M 06 Dec 2021 06:14:09.719 * RDB memory usage when created 0.77 Mb
1:M 06 Dec 2021 06:14:09.719 # Done loading RDB, keys loaded: 0, keys expired: 0.
1:M 06 Dec 2021 06:14:09.719 * DB loaded from disk: 0.000 seconds
1:M 06 Dec 2021 06:14:09.719 * Ready to accept connections

 

Add your domain name to trusted domains, google how to do this if you don’t already know how.

 

Change ports on router for Tplink its in Virtual servers,

Port 18443 internal to external 80 for http

4444 internal to 443 for https. Original port will not work because its already used for something else container will fail so change it to 4444. Point router to server ip address and set to http.

 

Configure nginxproxymanager new proxy host use domain names u created A names for. Set to your server ip and ports were already opened by u in the router or it wont work, force ssl and select all force ssl http2 support hsts enabled hsts subdomains.

Press enter and if router set properly for reverse proxy then its all good so far. Make sure to set your proxy to https for each subdomain or it wont work out. Don't use http.

 

Enter nextcloud and install new themes 😊 it will connect to external lte network to test if link works, its very reliable and if u know how to fight the bear then it’s a good software.

 

Download speeds should be 284

Upload speeds will be 40-99mbs

For sure.

 

Thanks for reading my guide.

 

One last thing, I assume you had your share set up for nextclud data well the nextcloud.log is stored in the data folder making disks always stay spun up

 

Type this into nextcloud console to fix it.

 

           This moves nextcloud log file off the array-stops disc spin 24-7

 

occ config:app:set admin_audit logfile --value=/var/log/nextcloud/audit.log

 

The above line has been a change in the location im using appdata now to store the log file, please create this location manually and also create the log file itself too. then paste this command in and its working better than the previous one.

 

<<<<<<<<<>>>>>>>>>>>>>>>><<<<<<<<>>>>>>>>

Here is the redo of the command:

occ config:app:set admin_audit logfile --value=/mnt/user/appdata/stoparrayspinningnextcloud/nospin.log

<<<<<<<<<>>>>>>>>>>>>>>>><<<<<<<<>>>>>>>>

Hey hey, it makes the disks stay wonderfully spun down unless u actually access them, a great risk free choice for anyone to try this out.

 

 

Done

 

Write the command somewhere and save it because you will likely have to do it again after every nextcloud update to ensure we are not unnecessarily

spinning our expensive drives for no reason, I've used the command a couple times, just after the recent update to be certain it sticks, but I don't know if it was a needed task or not. It seems to be working fantastic. I love my unraid system. It can be morphed and crafted and turned into anything I want or can imagine and Im doing it with unraid.

 

My best advice is to always keep a copy of your flash config folder to a safe place for in case you ever cant boot you can just create another USB with the creator and drop in your config folder and all your settings are intact and perfect once again. This has saved me a couple times when I was trying new proceedures trying to get things to work.

 

Ryzen5000 signing out, good day everyone.

Edited by RYZEN5000
Link to comment
2 hours ago, RYZEN5000 said:

I can't say I know where its written exactly I found the location with krusader so I know it exists and thats what Im using it for it works fantastic. Its the perfect location.

That's not a good answer. Please clarify, as there are consequences for using locations that aren't appropriate for logging.

 

Runaway docker image size, running out of RAM and crashing, etc.

 

Since you are the one recommending the changes, YOU need to know the details about what you are telling people to change, so you can let them know of the possible consequences and how to deal with them if things go wrong.

 

Telling people to blindly follow your directions when you don't know the possible issues of what you are telling them to do is not good.

  • Like 2
Link to comment

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.