Automatic wake on LAN in Linux when accessing remote filesystem
Yes, you can use something like
[videos]
comment = big files
path = /mnt/bigserver/videos
...
preexec = /usr/local/bin/my_wake-on-lan_and_mount_script
-> preexec in samba docs
You can use ethtool
to enable wake on unicast packets rather than magic packets. You may need to add a permanent arp
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.