Power-saving suspend file server with
After an eternal now time for me ran a 24x7 server, I've decided to phase out this now and to build a more energy-efficient option. Can aim was to have a file server, using wake-on-the LAN to wake up and do not run constantly. Was important to me as quickly as possible and wake up the server, who wants to wait long to access documents.
To solve the problem now is running a Debian Lenny with latest kernel from backports.
puppy: ~ # uname-r 2.6.32-amd64-bpo.5
Only the kernel upgrade has reduced the power saving features enabled (especially cpufreq) consumption by about 20 watts.
In addition, I want the server is not always manually shut down to, so I went in search of an already existing checker which checks on the one hand if someone is connected via SSH, on the other hand the network, the usual suspects for activity checks to ensure that the server is not shut down when needed.
I found what I was in the "server-sleepd", was apparently built by the part time Heise find the shell script is under http://mercurial.intuxication.org/hg/server-sleepd .
Within the script can be distinguished what to do with the server when shutting down, in my case, "pm-suspend" is called to put him to sleep.
I had problems but the WOL, I was not waking up the server again. The error is simply a deaktiverem WOL on the NIC and the deaktivertem wakeup event for the network card to search in ACPI.
Should all look as follows:
puppy: ~ # cat / proc / acpi / wakeup Device S-state Status Sysfs node PS2K S4 disabled pnp: 00:0 a UAR1 S4 disabled pnp: 00:0 b NSMB S4 disabled pci: 0000:00: 01.1 USB0 S4 disabled pci: 0000:00: 02.0 USB2 S4 disabled pci: 0000:00: 02.1 NMAC S5 enabled pci: 0000:00: 07.0 P0P1 S4 disabled pci: 0000:00: 04.0 HDAC S4 disabled pci: 0000:00: 05.0 BR10 S4 disabled pci: 0000:00: 09.0 BR12 S4 disabled pci: 0000:00:0 c.0 BR11 S4 disabled pci: 0000:00:0 b.0 puppy: ~ # ethtool eth0 Settings for eth0: Supported ports: [MII] Half 10baseT / Full Supported link modes: 10baseT / 10baseT Half / Full Full 100baseT / 100baseT Half / Full 1000baseT / Full Supports auto-negotiation: Yes Half 10baseT / Full Advertised link modes: 10baseT / 10baseT Half / Full Full 100baseT / 100baseT Half / Full 1000baseT / Full Advertised auto-negotiation: Yes Speed: 1000Mb / s Duplex: Full Port: MII PHYAD: 1 Transceiver: external Auto-negotiation: on Supports Wake-on: g Wake-on: g Link detected: yes
Important here is that in / proc / acpi / wakeup in the respective network card is "enabled" appears in the status, otherwise events from this source is not used to wake up.
The correct PCI ID of the network map can be found via "lspci".
Is the whole set with me in / etc / network / interfaces when starting the network connections.
up ethtool-s eth0 want g gt; / proc / acpi / wakeup up echo NMAC & gt; / proc / acpi / wakeup
rootdelay the Linux boot
Just now I had with a brand new Linux installation, a problem the first time the new system. The error was not initially apparent, after a long debugging has shown the error as follows:
During the transition from initrd to the kernel and mounting the file system reported Grub error:
ALERT! /dev/sda2 does not exist. Dropping to a shell!
Then I was greeted by a BusyBox shell of which I unfortunately did not continue.
Problem was simply the loading of the SAS Controller Module (mptsas) takes the system far too long to find the plates and aborts with a timeout.
The error can be explained by the parameter
rootdelay=45
fix in the kernel command line.
See also here at launchpad described.





