<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">On Monday 29 October 2012 07:32 PM,
      Dennis Leeuw wrote:<br>
    </div>
    <blockquote cite="mid:508E8C64.4060303@umcutrecht.nl" type="cite">We
      can make this a long discussion, but I rather not. I do not have
      the knowledge to tell you what might or might not happen and why.
      I can only tell you what went wrong and restarting the open-iscsi
      service, without a block device being present created a problem
      with a ro / filesystem. But actually that is not the important.
      What is important is that if no block device is present, the
      script does not end gracefully, with the provided change it does.
      <br>
      <br>
    </blockquote>
    <br>
    What you see out there is not something very simple. And given my
    limited time I spend on Debian, I will investigate in detail only if
    I am convinced it to be a bug.<br>
    <br>
    That said, support for sw iSCSI block devices is more complicated
    than what it looks. On top of that, adding the Device Mapper layer
    further adds a layer of complications. In the current approach
    available, you at least have an option to have your entire block
    device auto-mounted/activated during boot.<br>
    <br>
    Remember, iscsi is a daemon. If the daemon is stopped, all your
    block devices could die. That's why the stop script is built with
    some assumptions. More below....<br>
    <br>
    <blockquote cite="mid:508E8C64.4060303@umcutrecht.nl" type="cite">running
      without my change:
      <br>
      # /etc/init.d/open-iscsi restart
      <br>
      Unmounting iscsi-backed filesystems: Unmounting all devices marked
      _netdevDeactivating iSCSI volume groups: md3200_1  Volume group
      "md3200_1" not found
      <br>
      Cannot deactivate Volume Group md3200_1 ... (warning).
      <br>
      .</blockquote>
    <br>
    The assumption being that if you have DM devices on top of your
    iSCSI devices, we expect that you (the user) will define them in the
    config file. That is what you did.<br>
    <br>
    You instructed it to take care of a non-existent VG, which it did,
    failed and complained.<br>
    <br>
    This is the current design. It might not be the most elegant, but it
    works better than many others I have seen.<br>
    <blockquote cite="mid:508E8C64.4060303@umcutrecht.nl" type="cite">
      <br>
      umount: /: device is busy.
      <br>
              (In some cases useful info about processes that use
      <br>
               the device is found by lsof(8) or fuser(1))
      <br>
      Could not unmount / ... (warning).
      <br>
      umount: /var: device is busy.
      <br>
              (In some cases useful info about processes that use
      <br>
               the device is found by lsof(8) or fuser(1))
      <br>
      Could not unmount /var ... (warning).
      <br>
       failed!
      <br>
      invoke-rc.d: initscript umountiscsi.sh, action "stop" failed.
      <br>
      Couldn't unmount all iSCSI devices. Cannot stop iSCSI service ...
      failed!
      <br>
      <br>
    </blockquote>
    <br>
    I can't see a reason why / and /var got pulled in... Can you run the
    same init script in debug mode?<br>
    Just add "set -vx" to the beginning of the umountiscsi.sh script so
    that we can see what is going on.<br>
    <br>
    <blockquote cite="mid:508E8C64.4060303@umcutrecht.nl" type="cite">Which
      is probably not very user friendly. It doesn't matter if my system
      get Read-Only or not.
      <br>
      <br>
      With the following lines added:
      <br>
      if [ "${BLOCK_FILE}" = '<i class="moz-txt-slash"><span
          class="moz-txt-tag">/</span>sys/devices/platform/host24/session20/target*/*:*/block<span
          class="moz-txt-tag">/</span></i>*' ]; then
      <br>
              log_warning_msg "No block devices found for this host,
      nothing to do"
      <br>
              return 1
      <br>
      fi
      <br>
      <br>
      It ends more gracefully:
      <br>
      # /etc/init.d/open-iscsi restart
      <br>
      Unmounting iscsi-backed filesystems: Unmounting all devices marked
      _netdevDeactivating iSCSI volume groups: md3200_1  Volume group
      "md3200_1" not found
      <br>
      Cannot deactivate Volume Group md3200_1 ... (warning).
      <br>
      .
      <br>
      No block devices found for this host, nothing to do ... (warning).
      <br>
      invoke-rc.d: initscript umountiscsi.sh, action "stop" failed.
      <br>
      Couldn't unmount all iSCSI devices. Cannot stop iSCSI service ...
      failed!
      <br>
      <br>
      open-iscsid is still running and a restart didn't happen, but that
      is another issue.
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Ritesh Raj Sarraf
RESEARCHUT - <a class="moz-txt-link-freetext" href="http://www.researchut.com">http://www.researchut.com</a>
"Necessity is the mother of invention."
</pre>
  </body>
</html>