Comment 7 for bug 641816

Revision history for this message
Vladyslav Shtabovenko (vl-sht) wrote :

Here is a very ugly workaround for the problem

$sudo nano /etc/iscsi/iscsid.conf
node.startup = automatic
node.session.auth.username = mylogin
node.session.auth.password = mypass

$sudo nano /etc/pm/sleep.d/20_iscsi

PATH=/sbin:/usr/sbin:/bin:/usr/bin
case "${1}" in
  hibernate|suspend)
    ;;
  thaw|resume)
    /bin/sleep 6 && /etc/init.d/open-iscsi start
    ;;
esac

$sudo chmod +x /etc/pm/sleep.d/20_iscsi

This way after resume the open-iscsi service is started. Because of "node.startup = automatic" it also mounts all known nodes. A very ugly hack indeed, but for a home NAS it works good.