Hard Disks won't go idle since update to 9.10, because of CIFS service

Status
Not open for further replies.

ElGusto

Explorer
Joined
Mar 19, 2015
Messages
72
Hello!

As the title already said:
Since I have updated my FreeNAS machine from 9.3 to 9.10, the hard drives won't go idle anymore. Disabling CIFS allowed them to go idle again.
The problem occures with no SMB/CIFS Clients connected.

What's the reason for this behaviour?
How could I find out, why the CIFS service keeps them busy now, even with no client accessing CIFS?
Thank you!
 
Last edited:
D

dlavigne

Guest
The Samba version changed significantly from 9.3 to 9.10. Anything in /var/log/messages?
 

tmsmith

Dabbler
Joined
Apr 28, 2014
Messages
44
Sorry I can't give any input to the thread but how do you verify whether hard drives are going inactive or not?
 

ElGusto

Explorer
Joined
Mar 19, 2015
Messages
72

ElGusto

Explorer
Joined
Mar 19, 2015
Messages
72
Hello!

I just had a look at the recent messages, as you have asked:

Apr 29 01:55:44 freenas sasidle[3232]: ** Stopping devices in pool "z2pool" **
Apr 29 01:55:44 freenas sasidle[3232]: camcontrol stop da2
Apr 29 01:55:44 freenas sasidle[3232]: camcontrol stop da3
Apr 29 01:55:44 freenas sasidle[3232]: camcontrol stop da4
Apr 29 01:55:44 freenas sasidle[3232]: camcontrol stop da5
Apr 29 01:55:44 freenas sasidle[3232]: Unit stopped successfully
Apr 29 01:55:44 freenas sasidle[3232]: Unit stopped successfully
Apr 29 01:55:44 freenas sasidle[3232]: Unit stopped successfully
Apr 29 01:55:44 freenas sasidle[3232]: Unit stopped successfully
Apr 29 03:06:46 freenas sasidle[3232]: ** Restarting devices in pool "z2pool" due to activity **
Apr 29 04:06:47 freenas sasidle[3232]: ** Stopping devices in pool "z2pool" **
Apr 29 04:06:47 freenas sasidle[3232]: camcontrol stop da2
Apr 29 04:06:47 freenas sasidle[3232]: camcontrol stop da3
Apr 29 04:06:47 freenas sasidle[3232]: camcontrol stop da4
Apr 29 04:06:47 freenas sasidle[3232]: camcontrol stop da5
Apr 29 04:06:48 freenas sasidle[3232]: Unit stopped successfully
Apr 29 04:06:48 freenas sasidle[3232]: Unit stopped successfully
Apr 29 04:06:48 freenas sasidle[3232]: Unit stopped successfully
Apr 29 04:06:48 freenas sasidle[3232]: Unit stopped successfully
Apr 29 09:36:57 freenas sasidle[3232]: ** Restarting devices in pool "z2pool" due to activity **
Apr 29 10:36:59 freenas sasidle[3232]: ** Stopping devices in pool "z2pool" **
Apr 29 10:36:59 freenas sasidle[3232]: camcontrol stop da2
Apr 29 10:36:59 freenas sasidle[3232]: camcontrol stop da3
Apr 29 10:36:59 freenas sasidle[3232]: camcontrol stop da4
Apr 29 10:36:59 freenas sasidle[3232]: camcontrol stop da5
Apr 29 10:36:59 freenas sasidle[3232]: Unit stopped successfully
Apr 29 10:36:59 freenas sasidle[3232]: Unit stopped successfully
Apr 29 10:36:59 freenas sasidle[3232]: Unit stopped successfully
Apr 29 10:36:59 freenas sasidle[3232]: Unit stopped successfully
Apr 29 13:12:03 freenas sasidle[3232]: ** Restarting devices in pool "z2pool" due to activity **
Apr 29 17:03:07 freenas sasidle[3199]: ** Restarting devices in pool "dotsystem" due to activity **


sasidle is the old script from Millhouse, that I am using for actually making the hard disks sleep. So from the log I can now see when and how often the hard disks exactly have been woken up again (without any real usage). Now I need to know what did wake them up. Only 'z2pool' is of importance, as it's a ZFS-Softraid built on da2 through da4, draining more than 20Watts. dotsystem is an SSD where I have placed .system.
I just access this data like about twice a week, so the energy waste if significant, if they keep waking up multiple times a day.

Thank you for any help :)
 
Last edited:

sebcworks

Cadet
Joined
May 2, 2016
Messages
1
I don't know if it will helps, but try to watch over the network for some CIFS activities (ports 445 and 137-139).
Also, check if samba is not configure to write some logs.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,553
In addition to writing logs, samba has various tdb files that hold information regarding locking, permissions, built-in groups, sid-gid/uid mapping, etc. You might want to verify that these aren't located on the pool you're trying to spin down.

You could also potentially use tcpdump and dtrace to figure out what exactly is going on with smbd.
 

m0nkey_

MVP
Joined
Oct 27, 2015
Messages
2,739
The .system dataset resides on the first pool that is created. Log files, configuration, etc are written to the .system dataset. I guess if you want your drives to spin down, you will have to move the .system dataset to a SSD or something.

http://doc.freenas.org/9.10/freenas_system.html#system-dataset

I fail to see why people want to spin down drives. You're gaining very little in terms of power consumption. You also put additional strain on the spindle motor by stopping and starting all the time. I find it's usually best to keep them spinning.
 

ElGusto

Explorer
Joined
Mar 19, 2015
Messages
72
Hello!
I still couldn't find any reason why it's doing so since 9.10 :(

My system dataset ist on an SSD, independent form the pool.

And I fail to see, why it should be a bad thing, spinning up and down like up to ten times max, with an average of about 3 times a week instead of having them running nearly 24/7. From their specs they can easily take those few cycles for hundreds of years. But anyway: this is neither the spot for discussing nor asking why or if I should spin down my hard drives.

So:
How could I verify if samba isn't actually saving it's logging and 'tdb' files to the pool?
 
Last edited:

ElGusto

Explorer
Joined
Mar 19, 2015
Messages
72
Hello!

Maybe I'm a step further now:
Because you mentioned changes in samba and the problem of metadata possibly written to somewhere on the pool itself, I tried to find ways for monitoring samba somewhat more detailed.
So this morning I set logging to full and enabled samba full audit, like explained here.

The audit is working, and my samba related log files (on the SSD) grew full of messages. When browsing those logs I found (in log.nmbd) that there was a reelection of the master browser every few minutes, thus making me curious because I usually have configured my router for playing the master browser role in my network.

I then saw, there was a Windows machine that had taken over the role, for unknown reasons. I then disable the 'Computerbrowser' service on this machine and rebootel all devices within my network.

Since then the hard disks have been idle the whole day so far... I hope it will stay like this.
 

Mirfster

Doesn't know what he's talking about
Joined
Oct 2, 2015
Messages
3,215

ElGusto

Explorer
Joined
Mar 19, 2015
Messages
72
Hello!

I have Local laster disabled at CIFS service, because I use my router for this. And I now can confirm that my hard disk have been idle since disabling the browser on that one Windows PC.

Thank you all! :)
 
Status
Not open for further replies.
Top