Author Topic: (RT RAID) How to shutdown safely?  (Read 6929 times)

Offline Brahim

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8,547
  • Karma: +204/-16
    • View Profile
Re: (RT RAID) How to shutdown safely?
« Reply #15 on: February 08, 2013, 05:47:09 pm »
This should go onto the wiki.  ;D
If you have an account there, PM me your username and I will make you an editor.

Offline vletroye

  • Hero Member
  • *****
  • Posts: 714
  • Karma: +7/-0
    • View Profile
Re: (RT RAID) How to shutdown safely?
« Reply #16 on: February 12, 2013, 06:57:38 am »
 >:( Unfortunately, my solution is not working 100%.  :'(

I think that "Shutdown -a" may only abort a "scheduled" shutdown not a "normal shutdown" (done by the user using the menu). So it worked fine while testing but not once I did a manual shutdown. Another reason could be that FlexRAID Service is stopped before the execution of the Shutdown task  :(

I am looking for a valid alternative... Maybe disable the "Automatic Termination of Application that block Windows Shutdown" in the registry and loop until FlexRAID tasks are completed... Only valid if the script is run by Windows before stopping the Service. Not sure it will work as there is also a 10 minutes timeout for Group Policy scripts  :-\

If I can't find an alternative to abort the shutdown or prevent it, I will possibly look how to "pause" the current task in FlexRAID and just stop the pool...

Offline Brahim

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8,547
  • Karma: +204/-16
    • View Profile
Re: (RT RAID) How to shutdown safely?
« Reply #17 on: February 12, 2013, 07:48:39 am »
I am not sure if you are cancelling the shutdown as a first step, but that's what you should do.

Windows is quick when it comes to terminating things (for that Windows boots and shutdowns fast feel).
So, by the time your script tries to cancel the shutdown, either FlexRAID or your script has been killed.

Did you try increasing the WaitToKillServiceTimeout as per the wiki?