Some more tinkering last night. The problem certainly seems related to how the machine is shutdown - it seems the NIC needs to be left in a state that allows WOL to work. This can be forcecd by physically removing power from the machine but obviously I don't want to do that every time... I may as well power it on manually.
The "halt" (/etc/init.d/halt) script which is the last that is called in the shutdown sequence, as I understand it, has a setting at the beginning "NETDOWN=yes" which then, if "yes" passes a "-i" parameter the /sbin/halt executable to, presumably, shut down the network device.
Now there doesn't seem to be clarity as to whether the NIC must be shutdown (similar to
ifconfig eth0 down
) or not for WOL to work but regardless of this, halt doesn't seem to do the right thing. I have tried "NETDOWN=no" as well as yes.
Some of the bugfixes/workarounds out there advise shutting down the NIC explicitly by creating a script that is executed right at the end of the shutdown process that does a
ifconfig eth0 down
immediately before powering off.
I tried hacking the halt script to include this code prior to the /sbin/halt command but the system then moaned about something being active. I presume this is to do with the NFS being mounted. Of course that is going to be a problem. It makes sense that you can't bring down a network card that is still being used for the filesystem....
Here's what I'm thinking at the moment. The problem is either due to
a) My NIC driver which is not allowing the NIC to be moved to a state that will accept WOL when the /sbin/halt command is executed with the "-i" parameter.
OR
b) Some other problem in the shutdown of this particular MD that is causing other things (NFS, NBD?) not to be stopped properly which is preventing the network being brought down properly.
I'll start with b) because there are definitely a few "faileds" being thrown on shoutdown of this MD. I'll compare to the working ones and see if I'm having a problem somewhere that doesn't exist on the others and try to fix. Otherwise I'll tinker wtih the NIC driver. Maybe.