Announcement

Collapse
No announcement yet.

Scheduled task to stop a clustered service

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Scheduled task to stop a clustered service

    I have a 2 node win2008 R2 MSCS and I have a specific service clustered. How can I schedule a nightly shutdown and restart of this service?

    I can remotely stop using psservice, but MSCS will correctly see something is wrong and restart it or fail over. My goal is to stop this service during our nightly backup window.

    Thanks,
    Jaime

  • #2
    Re: Scheduled task to stop a clustered service

    Can you disable failover first, then stop the service?
    Tom Jones
    MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
    PhD, MSc, FIAP, MIITT
    IT Trainer / Consultant
    Ossian Ltd
    Scotland

    ** Remember to give credit where credit is due and leave reputation points where appropriate **

    Comment


    • #3
      Re: Scheduled task to stop a clustered service

      This works but doesn't work for me. We have both a service and a disk shared, I want to stop the service and then back up the disk. My backup program references the disk using the cluster name; bringing down the cluster service also brings down the disk.

      I was hoping there was a built in cluster-aware method of setting up a task to do this but maybe there just isn't...

      Comment


      • #4
        Re: Scheduled task to stop a clustered service

        Can you stop the service then mark it as disabled? Then enable it again and start it after the disk access has finished?

        This might help get you started.

        http://blogs.technet.com/b/heyscript...a-service.aspx
        A recent poll suggests that 6 out of 7 dwarfs are not happy

        Comment


        • #5
          Re: Scheduled task to stop a clustered service

          Yep, this works:

          stop:
          psservice \\**server1name** setconfig DmPrimaryDsearch disabled
          psservice \\**server2name** setconfig DmPrimaryDsearch disabled
          psservice \\**clustername** stop DmPrimaryDsearch

          start:
          psservice \\**server1name** setconfig DmPrimaryDsearch auto
          psservice \\**server2name** setconfig DmPrimaryDsearch auto
          psservice \\**clustername** start DmPrimaryDsearch

          This still doesn't play well with MSCS as after this is run the failover plugin will not always correctly identify what node is hosting the service. So far this has not seemed to create any functional problems.

          Thanks fellas.

          Comment

          Working...
          X