none
Adding Child Datasource to collocated volume from powershell RRS feed

  • Question

  • I've read the collocation docs on technet:

    http://technet.microsoft.com/en-us/library/ff399498.aspx

    But they don't mention anything about how to add a datasource to a collocated volume from powershell. Also, I've checked the powershell help for various cmdlets but I haven't found any examples. Does anyone have any guidance as to how to add a child datasource to a protection group that has collocation enabled (and ensure it uses the already existing replica and recovery point volumes)?


    Jeff Graves, ORCS Web, Inc.
    • Moved by MarcReynolds Friday, May 20, 2011 3:13 PM (From:Data Protection Manager)
    Tuesday, August 24, 2010 2:25 PM

Answers

  • DPM will take care that if the new DS (hyper-v, etc) can be accommodated in one of the existing replicas, then it would. Only otherwise new replica is created. 

     

    Thanks,

    Parag Agrawal 

    This posting is provided "AS IS" with no warranties, and confers no rights.

    • Marked as answer by Parag Agrawal Wednesday, September 8, 2010 10:28 AM
    Wednesday, September 8, 2010 10:27 AM

All replies

  • Hi

    What kind of workload do you want to add?

     

    BR

    Robert Hedblom


    Check out my DPM blog @ http://robertanddpm.blogspot.com
    Monday, September 6, 2010 9:55 PM
    Moderator
  • This is a Hyper-V VM that I'm trying to add to an existing protection-group that has collocation enabled and sufficient space on volumes already protecting other collocated VM's.
    Jeff Graves, ORCS Web, Inc.
    Tuesday, September 7, 2010 12:24 PM
  • Here is a blog post on the esact scenario that you are looking for.

    http://blogs.technet.com/b/dpm/archive/2009/12/03/hyper-v-protection-with-dpm-2010-beta-how-to-automatically-protect-new-virtual-machines.aspx


    Thanks Shyama Hembram[MSFT] This posting is provided AS IS, with no warranties, and confers no rights.
    Tuesday, September 7, 2010 5:53 PM
  • Hi Shyama,

    Thanks for the follow-up. I did come across that blog, however, the code looks like it will manually create a new replica and recovery point volume instead of using the collocated volume:

    # 10. Perform the following for each new VM to add to protection
    foreach ($ds in $unprotectedDsList)
    {
     write-host "Adding data source"  $ds.Name "to" $MPG.FriendlyName
     $npg = Add-ChildDatasource -ProtectionGroup $MPG -ChildDatasource $ds

     # 10.1 Disk allocation is skipped if short term protection is to tape
     if($MPG.protectionmethod -eq $tape) { continue };
     $x = Get-DatasourceDiskAllocation -Datasource $ds
     Set-DatasourceDiskAllocation -Datasource $ds -ProtectionGroup $MPG
    }

    What I need to do is add a VM to a Protection-Group that is utilizing collocation. How do I tell the new Datasource to use an existing collocated volume instead of creating a new one?


    Jeff Graves, ORCS Web, Inc.
    Tuesday, September 7, 2010 6:25 PM
  • DPM will take care that if the new DS (hyper-v, etc) can be accommodated in one of the existing replicas, then it would. Only otherwise new replica is created. 

     

    Thanks,

    Parag Agrawal 

    This posting is provided "AS IS" with no warranties, and confers no rights.

    • Marked as answer by Parag Agrawal Wednesday, September 8, 2010 10:28 AM
    Wednesday, September 8, 2010 10:27 AM
  • In my case, that's not working. I have a collocated volume of 2TB with 1.3TB used, and a recovery point volume of 2TB with 805GB used with 14-day retention. I'm trying to add a HV VM that has just a single 60GB VHD, but it's creating a new replica and recovery point volume instead of adding it to the existing collocated volume.

    I modified HKLM\SOFTWARE\Microsoft\Microsoft Data Protection Manager\Collocation\HyperV\CollocatedReplicaSize to 2190433320960.


    Jeff Graves, ORCS Web, Inc.

    Wednesday, September 8, 2010 12:20 PM