none
the usage of Set-DatasourceDiskAllocation RRS feed

  • General discussion

  • Hello i am trying to add a new data source on a Protection group setting the replica size and the restore point .

    but the script dont work and still adding the machine with the default size.

    *****************************************

    $PS = Get-ProductionServer -DPMServerName $DPM | ?{$_.machinename -like "*$servername*"}
    $DS = Get-Datasource -ProductionServer $PS 
    $PG = Get-ProtectionGroup -DPMServerName $DPM
    $MPG = Get-ModifiableProtectionGroup -ProtectionGroup $PG
    Add-childDatasource -ProtectionGroup $MPG -ChildDatasource $ds
    Set-ProtectionType -ProtectionGroup $MPG -ShortTerm disk
    Get-DatasourceDiskAllocation -Datasource $DS
    Set-DatasourceDiskAllocation -Datasource $DS -ProtectionGroup $MPG -manual -ReplicaArea (20gb) -ShadowCopyArea (20gb)
    Set-ReplicaCreationMethod -ProtectionGroup $MPG -NOW
    Set-protectiongroup $MPG 

    *********************************************

    anyone can help me please?

    OBS: when i try to edit a pre add data source that work.

    $PG = Get-ProtectionGroup -DPMServerName $DPM
    $MPG = Get-ModifiableProtectionGroup -ProtectionGroup $PG
    $DS = Get-Datasource -ProtectionGroup $MPG | ?{$_.ProductionServerName -like "*$servername*"}
    Set-DatasourceDiskAllocation -Manual -Datasource $DS -ProtectionGroup $MPG -ReplicaArea (73gb)
    Set-DatasourceDiskAllocation -Manual -Datasource $DS -ProtectionGroup $MPG -ShadowCopyArea (63gb) 
    Set-ProtectionGroup $MPG


    Meu Blog: http://howtoserver.com Minhas Ceritificações: 73-642,73-640


    Friday, July 6, 2012 2:52 PM

All replies

  • Hi Matheus,

    "ReplicaArea" and "ShadowCopyArea" must be set in numerical:

    -ReplicaArea 9491709952 (For 73gb : 73x1024x1024x1024)

    -ShadowCopyArea 6738149376 (For 63Gb : 63x1024x1024x1024)

    Technet link: http://technet.microsoft.com/en-us/library/ff631942.aspx

    Stephane


    Please remember to click “Mark as Answer” on the post that helps you. This posting is provided "AS IS" with no warranties. knowledge is valid only if it is shared by All.

    Friday, July 6, 2012 3:04 PM
  • i now that but on powershell when you put (20gb) it pass 21474836480 and the command not give me any error and if i run

    $DS | FL * it show me the that:

    ReplicaSize                     : -1
    ShadowCopyAreaSize              : -1
    RequiredReplicaSize             : 21474836480
    RequiredShadowCopyAreaSize      : 21474836480



    Meu Blog: http://howtoserver.com Minhas Ceritificações: 73-642,73-640

    Friday, July 6, 2012 3:28 PM
  • Hi Matheus,

    I try your first Script with "-inquire" parameter and it's work :

    $PS = Get-ProductionServer -DPMServerName $DPM | ?{$_.machinename -like "*$servername*"}
    $DS = Get-Datasource -ProductionServer $PS -Inquire 
    $PG = Get-ProtectionGroup -DPMServerName $DPM
    $MPG = Get-ModifiableProtectionGroup -ProtectionGroup $PG
    Add-childDatasource -ProtectionGroup $MPG -ChildDatasource $ds
    Set-ProtectionType -ProtectionGroup $MPG -ShortTerm disk
    Get-DatasourceDiskAllocation -Datasource $DS
    Set-DatasourceDiskAllocation -Datasource $DS -ProtectionGroup $MPG -manual -ReplicaArea (20gb) -ShadowCopyArea (20gb)
    Set-ReplicaCreationMethod -ProtectionGroup $MPG -NOW
    Set-protectiongroup $MPG

    Stephane

     


    Please remember to click “Mark as Answer” on the post that helps you. This posting is provided "AS IS" with no warranties. knowledge is valid only if it is shared by All.

    Saturday, July 7, 2012 4:18 PM
  • I gonna try that,

    can you explain me the -inquire?


    Meu Blog: http://howtoserver.com Minhas Ceritificações: 73-642,73-640

    Saturday, July 7, 2012 5:06 PM
  • i try..
    if(!(get-PSSnapIn "Microsoft.DataProtectionManager.PowerShell")){
        Add-PSSnapin "Microsoft.DataProtectionManager.PowerShell" 
    }
    if((Get-Location) -notlike "C:\Program Files\Microsoft DPM\DPM\bin")
    {
        cd "C:\Program Files\Microsoft DPM\DPM\bin"
    }
    $DPM = "dpm"
    $servername = "server89"
    $PS = Get-ProductionServer -DPMServerName $DPM | ?{$_.machinename -like "*$servername*"}
    $DS = Get-Datasource -ProductionServer $PS -Inquire 
    $PG = Get-ProtectionGroup -DPMServerName $DPM
    $MPG = Get-ModifiableProtectionGroup -ProtectionGroup $PG
    Add-childDatasource -ProtectionGroup $MPG -ChildDatasource $ds
    Set-ProtectionType -ProtectionGroup $MPG -ShortTerm disk
    Get-DatasourceDiskAllocation -Datasource $DS
    Set-DatasourceDiskAllocation -Datasource $DS -ProtectionGroup $MPG -manual -ReplicaArea (20gb) -ShadowCopyArea (20gb)
    Set-ReplicaCreationMethod -ProtectionGroup $MPG -NOW
    Set-protectiongroup $MPG

    and that dont work. him still being added with 14 gb.


    Meu Blog: http://howtoserver.com Minhas Ceritificações: 73-642,73-640

    Saturday, July 7, 2012 5:11 PM
  • Hi Matheus,

    "inquire" parameter queries the protected computer and returns the list of data sources or child data sources on it.

    Could you try this one :

    Disconnect-DPM DPMServer "dpm"
    Connect-DPM DPMServer "dpm"
    $DPM = "dpm"
    $servername = "server89"
    $PS = Get-ProductionServer -DPMServerName $DPM | ?{$_.machinename -like "*$servername*"}
    $DS = Get-Datasource -ProductionServer $PS -Inquire
    $PG = Get-ProtectionGroup -DPMServerName $DPM
    $MPG = Get-ModifiableProtectionGroup -ProtectionGroup $PG
    Add-childDatasource -ProtectionGroup $MPG -ChildDatasource $ds
    Set-ProtectionType -ProtectionGroup $MPG -ShortTerm disk
    Get-DatasourceDiskAllocation -Datasource $DS
    Set-DatasourceDiskAllocation -Datasource $DS -ProtectionGroup $MPG -manual -ReplicaArea (20gb) -ShadowCopyArea (20gb)
    Set-ReplicaCreationMethod -ProtectionGroup $MPG -NOW
    Set-protectiongroup $MPG
    Disconnect-DPM DPMServer "dpm"

    Stephane


    Please remember to click “Mark as Answer” on the post that helps you. This posting is provided "AS IS" with no warranties. knowledge is valid only if it is shared by All.

    Sunday, July 8, 2012 8:39 AM
  • i try that and dont work... any idea?

    Meu Blog: http://howtoserver.com Minhas Ceritificações: 73-642,73-640

    Monday, July 9, 2012 3:00 PM
  • Hi Matheus,

    I' m almost stuck :)

    What kind of datasources do you have in $DS ? Only one type or a mix of different datasources ?

    Stephane.


    Please remember to click “Mark as Answer” on the post that helps you. This posting is provided "AS IS" with no warranties. knowledge is valid only if it is shared by All.

    Monday, July 9, 2012 3:10 PM
  • i have the Microsoft Hyper-V datasource for a clustered VM, i am trying exactly that

    $DPM = "DPMSERVER"
    $servername = "SERVER89"
    Connect-DPMServer $DPM
    $PS = Get-ProductionServer -DPMServerName $DPM | ?{$_.machinename -like "*$servername*"}
    $DS = Get-Datasource -ProductionServer $PS -Inquire 
    $PG = Get-ProtectionGroup -DPMServerName $DPM
    $MPG = Get-ModifiableProtectionGroup -ProtectionGroup $PG
    Add-childDatasource -ProtectionGroup $MPG -ChildDatasource $ds
    Set-ProtectionType -ProtectionGroup $MPG -ShortTerm disk
    Get-DatasourceDiskAllocation -Datasource $DS
    Set-DatasourceDiskAllocation -Datasource $DS -ProtectionGroup $MPG -manual -ReplicaArea (20gb) -ShadowCopyArea (20gb)
    Set-ReplicaCreationMethod -ProtectionGroup $MPG -NOW
    Set-protectiongroup $MPG
    Disconnect-DPMServer $DPM


    Meu Blog: http://howtoserver.com Minhas Ceritificações: 73-642,73-640

    Monday, July 9, 2012 3:50 PM
  • I  have changed the script...

    $DPM = "dpmservfer"
    $servername = "server89"
    Connect-DPMServer $DPM
    $PG = Get-ProtectionGroup -DPMServerName $DPM | ?{$_.FriendlyName -like "group"}
    $MPG = Get-ModifiableProtectionGroup -ProtectionGroup $PG
    $PS = Get-ProductionServer -DPMServerName $DPM | ?{$_.machinename -like "*$servername*"}
    $DS = Get-Datasource -ProductionServer $PS
    #$DS.IsCustomAllocation = $true
    Add-ChildDatasource -ProtectionGroup $PG -ChildDatasource $DS
    $DS = ($PG.GetDatasources() | ?{$_.name -like "*$servername*"})
    $DSDISK = Get-DatasourceDiskAllocation -Datasource $DS
    Set-DatasourceDiskAllocation -Manual -Datasource $DS -ProtectionGroup $PG -ReplicaArea (20gb)
    Set-DatasourceDiskAllocation -Manual -Datasource $DS -ProtectionGroup $PG -ShadowCopyArea (20gb)
    Set-ReplicaCreationMethod -ProtectionGroup $PG -NOW 

    Set-ProtectionGroup -ProtectionGroup $PG
    Disconnect-DPMServer $DPM


    Meu Blog: http://howtoserver.com Minhas Ceritificações: 73-642,73-640

    Tuesday, July 10, 2012 8:48 PM
  • I have the same problem, I tried to run the script in DPM2012 but with no success

    $servername = "server1"
    $dpmname = "dpm2012"

    $pg = Get-ProtectionGroup -DPMServerName $dpmname | ?{($_.FriendlyName) -like "teste01*"}
    $pg = Get-ModifiableProtectionGroup -ProtectionGroup $pg
    $ps = Get-ProductionServer -DPMServerName $dpmname | where { $_.machinename -contains "$servername" }
    $ds = Get-Datasource -ProductionServer $ps -Inquire
    Add-childDatasource -ProtectionGroup $pg -ChildDatasource $ds
    $ds = Get-Datasource -ProtectionGroup $pg | ?{$_.ProductionServerName -like "*$servername*"}
    Set-DatasourceDiskAllocation -Manual -Datasource $ds -ProtectionGroup $pg -ReplicaArea (20GB) -ShadowCopyArea (20GB)
    Set-ReplicaCreationMethod -ProtectionGroup $pg -NOW
    Set-ProtectionGroup -ProtectionGroup $pg

    I tried this command instead Set-DatasourceDiskAllocation but when I run it crashs DPM
    Modify-DPMDiskAllocation -Datasource $ds -Replicasize (30GB) -ShadowCopySize (30GB)

    Tuesday, July 10, 2012 8:55 PM
  • I try with the official microsoft script http://download.microsoft.com/download/F/6/7/F679933F-8A6F-4EAD-B122-EAFB5C117CEE/AddNewCLusteredVM.ps1

    and it still dont working :(

    anyone know a way to set the disk size when inserting the DS on the PS?


    Meu Blog: http://howtoserver.com Minhas Ceritificações: 73-642,73-640


    Wednesday, July 11, 2012 6:03 PM
  • Hi Matheus,

    AddNewCLusteredVM.ps1 don't use "-ReplicaArea" and "-ShadowCopyArea" then default disk allocation is used.

    I still don't understand why your script don't work in your environment...

    One more question: in $DS, do you have only one datasource (1 VM) or several ?

    Stephane


    Please remember to click “Mark as Answer” on the post that helps you. This posting is provided "AS IS" with no warranties. knowledge is valid only if it is shared by All.

    Thursday, July 12, 2012 10:33 AM
  • i know that but i just modify the set-datasourcediskallocation command on the script...

    i get only one DS, one question you tried my script and it work for you?

    what kind of DS ara you using ?

    what version of dpm?

    any hotfix installed or something like it?


    Meu Blog: http://howtoserver.com Minhas Ceritificações: 73-642,73-640

    Thursday, July 12, 2012 11:25 AM
  • Hi,

    I test your script on Exchange Databases. but whatever the datasources it should works :)

    DPM 2010 QFE1&2

    Stephane


    Please remember to click “Mark as Answer” on the post that helps you. This posting is provided "AS IS" with no warranties. knowledge is valid only if it is shared by All.

    Thursday, July 12, 2012 12:14 PM
  • my version is

    PS C:\Program Files\Microsoft DPM\DPM\bin> get-wmiobject -computername localhost win32_product -filter "Name = 'Microsoft System Center Data Protection Manager 2010'"|select version

    version
    -------
    3.0.7696.0

    can you send me your version?


    Meu Blog: http://howtoserver.com Minhas Ceritificações: 73-642,73-640

    Thursday, July 12, 2012 12:30 PM
  • Hi,

    DPM 2010 RTM 3.0.7696.0

    Agent version is 3.0.7707.0 (RollUP 2)

    Stephane


    Please remember to click “Mark as Answer” on the post that helps you. This posting is provided "AS IS" with no warranties. knowledge is valid only if it is shared by All.

    Thursday, July 12, 2012 1:18 PM
  • are the same... maybe this problem is only with vm datasource... cause if i add the datasource and after that i get again the protection group and set disk allocation  to the datasource it work

    Meu Blog: http://howtoserver.com Minhas Ceritificações: 73-642,73-640

    Thursday, July 12, 2012 1:28 PM
  • can you test with hyper-v datasources?

    thank you for help


    Meu Blog: http://howtoserver.com Minhas Ceritificações: 73-642,73-640

    Thursday, July 12, 2012 1:30 PM
  • Hi Matheus,

    Not for the moment, my DPM storage pool is nearly full... Migration is under way :)

    Maybe next week I could give a try.

    Stephane


    Please remember to click “Mark as Answer” on the post that helps you. This posting is provided "AS IS" with no warranties. knowledge is valid only if it is shared by All.

    Thursday, July 12, 2012 3:58 PM
  • thank you any way... i gonna wait for some one that can help me with that hehehe, i really dont know why that!...


    Meu Blog: http://howtoserver.com Minhas Ceritificações: 73-642,73-640

    Thursday, July 12, 2012 4:06 PM