What brings CentOS out of suspend mode?

General support questions
Post Reply
NickC
Posts: 186
Joined: 2012/01/20 16:13:41

What brings CentOS out of suspend mode?

Post by NickC » 2014/09/30 14:39:29

I have a CentOS 7 box set-up as an iSCSI target which goes into suspend mode correctly after 30 mins if it is not used. Problem is when we try and access the iSCSI target disks it does not come out of suspend mode. Are there any setting anywhere to configure what triggers a release from suspend mode?

vanecka
Posts: 45
Joined: 2010/01/28 21:05:11
Location: University of the Free State - South Africa
Contact:

Re: What brings CentOS out of suspend mode?

Post by vanecka » 2014/10/20 12:47:29

I don't have an easy answer but I would not recommend sleeping/suspending your machine if it exports an iSCSI path in the first place.

The only way I can think of is using a "Wake on LAN" tool such as ether-wake.

How To:

Get the MAC address of the iSCSI server and enable Wake on LAN.
Log onto your iSCSI server and execute the following:

Code: Select all

#Assuming that the server uses eth0 to export the iSCSI:
ip addr show eth0|grep "link/ether" |awk  '{print $2}'
52:54:00:a9:47:b0

#The above number is the MAC address that you have to use on the remote host(s)

#Now add the following line in /etc/sysconfig/network-scripts/ifcfg-eth0
ETHTOOL_OPTS="wol g"

#And restart your network interface(s):
/etc/init.d/network restart
Now log in on the remote host and execute:

Code: Select all

yum -y install net-tools

Every time you want to wake the iSCSI server, you can execute the following (as root):

Code: Select all

ether-wake 52:54:00:a9:47:b0

Post Reply