5

I have recently purchased myself an HP rack server for use as a personal fileserver. This server currently lives under my bed as I have nowhere else to put it. For those not aware (as I was not fully) this server is VERY LOUD.

I need to be able to access my files a lot of the time during the day, and due to the situation of my server, turning it off every night at the wall (it likes to suddenly spring into action for no apparent reason) isn't really an option. I would really like if the server could remain powered on all the time, but when not in use enter a sleep state such that the fans turn off, if nothing else, over LAN. The server also runs Debian.

If this kind of setup can't happen for whatever reason, I could settle for the machine shutting down at a certain time of day (or night) and starting up again in the morning, or something to that effect.

I have very little idea about how to go about such a task, other than to use wake/sleep-on-LAN.

12
  • For (only) a fileserver, you would have more benefit from selling the rack server, and buying an old PC to use. Your greatest latency will be from network overhead. Disks have been much faster than network traffic for a while now.
    – jpaugh
    Commented Jan 24, 2018 at 18:22
  • In order to wake up the computer when someone tries to access the fileserver , you would either need a specialized network card which could wake up the computer (based on traffic to a specific port), or to send a WoL packet before trying to access it. I'm not sure, but I would expect WoL to work the same whether the computer was shutdown or sleeping.
    – jpaugh
    Commented Jan 24, 2018 at 18:24
  • Unfortunately this isn't an option because I have in fact just switched from a rubbishy old tower PC to this server unit. I might eventually run other things on it as well, so getting rid of it isn't the solution. Commented Jan 24, 2018 at 18:25
  • Why doesn't WoL work?
    – jpaugh
    Commented Jan 24, 2018 at 18:26
  • 1
    I would suggest 1) getting rid of the rack mount chassis and put the hardware in a proper case with large, slow, quiet fans instead of the tiny noisy ones they use in rack mounts, and 2) take a look at the fancontrol package to see if it can slow down the fans when the system isn't under heavy load.
    – psusi
    Commented Jan 24, 2018 at 18:30

4 Answers 4

0

Also, see if the server has a management processor (HP brand name for them is iLO, Sun/Oracle has ILOM, Fujitsu has IRMC, for example).

A management processor is an independent small processor and a network interface, which are always powered as long as the system is plugged in. It can be used to remotely access the main part of the server, and even power it off and back on at will. If your server has this, and you can make it work, you don't need Wake-on-LAN: you can just connect to the management processor (typically with a web browser) and tell it to power up the main part of the server.

1
  • Probably should have mentioned that it was an HP system, I'll go and make an edit. I will look into this, thanks. Commented Jan 24, 2018 at 20:20
0

Ensure your nic and motherboard support WOL (wake on lan) use ethtool <interface> to confirm

Create a cron to shutdown the computer every day at say 5pm

Change 17 to the hour of each day you want to shut it down

add the following to /etc/crontab

0 17 * * * root shutdown -h now

Next you'll need a second computer on the network that can send the "magic packet"

On a second computer you can use wakeonlan <mac address> to wake up the first machine.

put the wakeonlan in a cron using the same method as listed above. We'll use 9am in the example. add the following to /etc/crontab

0 9 * * * root wakeonlan `<mac address of your other server>`

Also check out your router, it may have some support to send wake on lan packets.

0

It seems after trial and tribulation of innumerable ways to get my server to do what it's told, the best way to solve my problem of it being loud is just to put it in the garage and hope no water damage occurs during cold nights (which it shouldn't, as the server will be on 24/7).

Thanks to everyone who offered actual technical help, but it seems what I wanted ideally cannot be done.

0

I also had the exact same problem and after some work got a solution.

For Wake-on-Lan I use my OpenWRT router with etherwake-nfqueue. I have a firewall rule which sends new connection packages into a netfilter-queue. This queue is connected to etherwake-nfqueue. This user space tools sends a WoL package to the server and when it is reachable again releases the packet. There is a good tutorial on how to achieve that here: https://github.com/mister-benjamin/etherwake-nfqueue-openwrt

For suspending, I could not find a program which achieved what I wanted, i.e. suspend when there are no network connections to specific ports of my server. For example, I want to not suspend when Nextcloud instance is access, but I don't care about other connections. I decided to write a small python scripts which supports checking for active network connections using the contract tool, active locks with fcntl and processes running. If anyone is interested I uploaded the script to GitHub: https://github.com/7ritn/suspend_watch

Be aware that if let your server be woken when traffic is detected on standard ports like 22, 80 or 443, you need to expect it to be woken a lot by adversaries testing for basic vulnerabilities.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .