I have a small server which runs Ubuntu, running webserver and other things, and as such is on 24/7. It also serves as our file server for the majority of frequently used files, serving files through samba.
I also have a much larger server with significantly more hard drive space that is used to store large video files that are accessed infrequently (maybe once a week). It's files are mounted to the small server through samba, so clients actually go through both servers to get to the large files.
In the interest of saving power (and noise!) I'd like to set the large server to go to sleep when it's not being used. But then the odd time people want a file from it, they need to go wake it up, or remember to run a wake on lan tool manually.
Is there any way to mount the remote file system and have the small server automatically wake up the large one when someone tries to access files on it? The large server only takes a few seconds to wake back up and spin up it's drives, so the small delay is acceptable. I just want to make it happen without having to train users to do anything special.
Yes, you can use something like
-> preexec in samba docs
You can use
ethtool
to enable wake on unicast packets rather than magic packets. You may need to add a permanentarp
entry to the clients or if they forget the server's MAC address, they won't be able to send unicast packets to try to access it and thus, wake it up.