Suspend / Auto Shutdown / WoL Settings ?

Multiblitz

Cadet
Joined
Aug 15, 2021
Messages
5
I am new to Truenas, but found it quiet intuitive to setup. Every worked like a charme.

One important feature for me is the Auto Shutdown / Suspend / Lightsoff Ability and the corresponding WoL.

I could not find any settings on that all...but to my surprise its working somehow. My PC goes into Suspend after some time and if I send a Magic Package it wakes up again.

This is good new, but I wonder if there any settings which control this process more in detail like I am used to under Lightsoff (Windows Homeserver 2011) where you can set not only the time until the PC goes into Suspend, but as well which Clients keep him alive etc. ?
 

NugentS

MVP
Joined
Apr 16, 2020
Messages
2,947
Of course knowing what your hardware is would help - cos at the moment all we can do is guess
Look at my signature for an example
 

NugentS

MVP
Joined
Apr 16, 2020
Messages
2,947
Why are you using TrueNAS. The whole point of TN is ZFS and with a single Ironwolf 8TB ZFS is crippled. Also 8GB is absolute minimum - not that that is a major problem here.
If you are trying to lean about TN - fair enough - but all you are learning is about the GUI and not about ZFS
 

Multiblitz

Cadet
Joined
Aug 15, 2021
Messages
5
But this thread is not about ZFS or Truenas in general....I have a specific question on Suspend Capabilities. This is only a prototype. My target is to have a silent PC which is only on when needed. Truenas is one option out of many and the Autoshutdown capability is important for me. So, lets please on the topic.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
But this thread is not about ZFS or Truenas in general....I have a specific question on Suspend Capabilities. This is only a prototype. My target is to have a silent PC which is only on when needed. Truenas is one option out of many and the Autoshutdown capability is important for me. So, lets please on the topic.

Welcome to the forums.

Please bear in mind that this is not a paid technical support forum for TrueNAS, and that most people responding are other community members who are attempting to assist and guide you with not only the problem you are asking about, but problems that they are aware you are likely to run into.

WoL is an edge case that almost no one uses, because frequently spinning a disk up and down is a life-shortening behaviour for hard disk drives, and most users here have invested thousands of dollars in their filers. Additionally, you can run into some problems when using ZFS without redundancy available. It is fairly normal for people to point out issues that they see in your future, even if they don't have the answer you are currently seeking. WoL support on the PC platform is flaky, and when the topic has been developed in the past, it generally turned out to be more problematic than it was worth, because you really need to make sure that nothing is going on, and that's really difficult with ZFS. Got a scrub going on? Replication? rsync? Client accessing via one of several protocols? Cloud backup? All this stuff really needs to be idle before a sleep, and it is just really outside the normal FreeNAS/TrueNAS use case.
 

Multiblitz

Cadet
Joined
Aug 15, 2021
Messages
5
Thanks for the warm welcome. Dont get me wrong, I appreciate the responsiveness of you guys and fully understand that this is a user help user effort.

My use case is simply different to yours.

I am the whole week not at home and even when I am at home, I do not need access to the data stored always. Its movies etc. The redundancy I solve in different ways, I have two other NAS and a Windows home Server 2011 with a full Raid-System as well.

My house got under water in the bad flooding we had here in Germany 4 weeks ago. My server were in the cellar...so, I am now planning a second server which will stand physcially 50km away in a differetn house and syncs over the internet. The ZFS-System will get more Disks and if necessary the machine gets as well more RAM...

So, I really want a server which sends itself into suspend if the MAc-Adresses defined are offline. If this is not possible with Truenas, well, in theory OMV could do it, but the pugin installetion created errors. Somaybe I need to go back to a Windows Server.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
My use case is simply different to yours.

I know that's a popular thing to say when you're not getting the answers you want, but it comes across somewhat poorly. The problem isn't that your use case is different to mine. The problem is that what you presented is a specific feature inquiry for something that the NAS itself isn't particularly well suited towards, because TrueNAS is aimed towards enterprise always-on environments.

I am the whole week not at home and even when I am at home, I do not need access to the data stored always. Its movies etc. The redundancy I solve in different ways, I have two other NAS and a Windows home Server 2011 with a full Raid-System as well.

My house got under water in the bad flooding we had here in Germany 4 weeks ago.

We are all very sorry to hear that, the pictures and video from that were stunningly horrifying.

My server were in the cellar...so, I am now planning a second server which will stand physcially 50km away in a differetn house and syncs over the internet. The ZFS-System will get more Disks and if necessary the machine gets as well more RAM...

So, I really want a server which sends itself into suspend if the MAc-Adresses defined are offline. If this is not possible with Truenas, well, in theory OMV could do it, but the pugin installetion created errors. Somaybe I need to go back to a Windows Server.

Well, knowing if MAC addresses are "offline" requires relatively deep magic, because you need involvement of the network's switch silicon. A much less expensive proxy for that would be whether MAC addresses are currently listed in the ARP table of the NAS unit, which would require that the clients involved be trying to communicate with the NAS. You could certainly write a script that checked to see if any of your list-of-interest MAC addresses were in the ARP table, and then if not, wait ten minutes, check again, and if still not, then call /etc/rc.suspend That's probably about five lines of bad shell script or a screenful of somewhat better.

The problem with this is that you'd basically be on your own for resolving sleep-related issues. You could replace the suspend call with shutdown instead if that turned out to be a serious problem.

I think that's the closest you'd be likely to get... other alternatives might be inspecting the output of netstat for ESTABLISHED entries, but that's not going to work correctly for some protocols like UDP NFS.
 

NugentS

MVP
Joined
Apr 16, 2020
Messages
2,947
Why not use ping - and apply logic that if nothing responds then shutdown. Horribly messy but wouldn't rely on the vagaries of an arp cache
But as our Resident Grinch says you are out in the wild west and very much on your own
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Why not use ping - and apply logic that if nothing responds then shutdown. Horribly messy but wouldn't rely on the vagaries of an arp cache

Because not everything responds to ping. The server's ARP cache is more reliable than that (could be primed by a ping, too, even if the client host didn't actually respond).
 

NugentS

MVP
Joined
Apr 16, 2020
Messages
2,947
Yeah OK - that makes sense - and as you say prime with a ping first - and watch out for arp timeout (apparently 20 mins for BSD - so not a major issue)
 
Top