none
Migrated DPM Disk Issue RRS feed

  • Question

  • I have a migrated DPM Disk but the Old Replica volume from one Protection Group refuses to age out. I have tried deleting the recovery points. doing a search for recovery points lists none for this resource that was protected there. I am not sure what can be done to remove these volumes gracefully.
    • Edited by M_Bay Monday, May 26, 2014 8:14 PM
    Monday, May 26, 2014 8:01 PM

All replies

  • Hi,

    not realy clear what you want.

    How Long is your Retentiontime on disk and how Long ago did you migrate your disk?


    Seidl Michael | http://www.techguy.at | twitter.com/techguyat | facebook.com/techguyat

    Tuesday, May 27, 2014 5:24 AM
  • Could it be that the replica volume was collocated and has other data sources on it?

    You may use the following query to determine all the data sources that lie on this replica. Replace DatasourceName appropriately.

    Also, how are you searching for recovery points? Are you using Get-DPMRecoveryPoint cmdlet?

    select LR.ReplicaId, DS.DataSourceName from tbl_PRM_LogicalReplica LR
    join tbl_IM_DataSource DS on LR.DataSourceId = DS.DataSourceId
    where LR.ReplicaId in (select ReplicaId from tbl_PRM_LogicalReplica LR1
    	join tbl_IM_DataSource DS1 on LR1.DataSourceId = DS1.DataSourceId
    	where DS1.DataSourceName LIKE '%DatasourceName%')
    ORDER BY LR.ReplicaId

    Thanks.

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

    Tuesday, May 27, 2014 5:25 AM
  • I have used the Get-DPMRecoveryPoint and coule other scripts I found by doing research but all give a null result.

    Is there a way to include the NetBIOS name in the query above so I know what server it is linked to.

    Tuesday, May 27, 2014 1:05 PM
  • The retention time was 5 days for this protection. the Disk was migrated early March.

    Tuesday, May 27, 2014 1:11 PM
  • Tuesday, May 27, 2014 2:13 PM
  • The Disks I want to age out show that there is no Protected Datasources on them So I know the Datasource was migrated. This specific server has two volumes protected E and F. E is up and synchronized and aged out. F has not been able to synchronize and unfortunately is not aging out. the Volume is spanned across three disks which I want to remove from the DPM server. SO I am not sure running the migrate will help here.

    My next thinking was to completely destroy the protection for the F and delete the replica on Disk to see if that does the trick but I know that will also be destroying the migrated data on the New disks presented to the DPm server.

    • Edited by M_Bay Tuesday, May 27, 2014 2:31 PM
    Tuesday, May 27, 2014 2:28 PM
  • Lets try some things

    Maybe the Prune Job is not running correct, try to run this command .\pruneshadowcopiesDpm2010.ps1

    if this is not working, there is a Script, which checks the pruning:

    Import-Module DataProtectionManager
    #displays all RP for data sources and shows which RP’s would be deleted by the regular pruneshadowcopies.ps1 
    # Outputs to a logfile:  C:\Program Files\Microsoft DPM\DPM\bin\SHOW-PRUNESHADOWCOPIES.LOG 
    #Author    : Mike J 
    #Date    : 02/24/2009 
    $version="V1.0" 
    $date=get-date 
    $logfile="SHOW-PRUNESHADOWCOPIES.LOG.txt" 
    function GetDistinctDays([Microsoft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.OMCommon.ProtectionGroup] $group, 
    [Microsoft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.OMCommon.Datasource] $ds) 
    {    
        if($group.ProtectionType -eq [Microsoft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.OMCommon.ProtectionType]::DiskToTape) 
        { 
            return 0 
        } 
        $scheduleList = get-policyschedule -ProtectionGroup $group -ShortTerm 
        if($ds -is [Microsoft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.FileSystem.FsDataSource]) 
        { 
            $jobType = [Microsoft.Internal.EnterpriseStorage.Dls.Intent.JobTypeType]::ShadowCopy 
        } 
        else 
        { 
            $jobType = [Microsoft.Internal.EnterpriseStorage.Dls.Intent.JobTypeType]::FullReplicationForApplication 
            if($ds.ProtectionType -eq [Microsoft.Internal.EnterpriseStorage.Dls.Intent.ReplicaProtectionType]::ProtectFromDPM) 
            {            
                return 2 
            } 
        } 
        write-host   "Look for jobType $jobType" 
        foreach($schedule in $scheduleList) 
        { 
            write-host("schedule jobType {0}" -f $schedule.JobType) 
            if($schedule.JobType -eq $jobType) 
            { 
                return [Math]::Ceiling(($schedule.WeekDays.Length * $ds.RecoveryRangeinDays) / 7) 
            } 
        } 
        return 0 
    } 
    function IsShadowCopyExternal($id) 
    { 
        $result = $false; 
        $ctx = New-Object -Typename Microsoft.Internal.EnterpriseStorage.Dls.DB.SqlContext 
        $ctx.Open() 
        $cmd = $ctx.CreateCommand() 
        $cmd.CommandText = "select COUNT(*) from tbl_RM_ShadowCopy where shadowcopyid = ‘$id’"   
        write-host $cmd.CommandText 
        $countObj = $cmd.ExecuteScalar() 
        write-host $countObj 
        if ($countObj -eq 0) 
        { 
            $result = $true 
        } 
        $cmd.Dispose() 
        $ctx.Close() 
        return $result 
    } 
    function IsShadowCopyInUse($id) 
    { 
        $result = $true; 
        $ctx = New-Object -Typename Microsoft.Internal.EnterpriseStorage.Dls.DB.SqlContext 
        $ctx.Open() 
        $cmd = $ctx.CreateCommand() 
        $cmd.CommandText = "select ArchiveTaskId, RecoveryJobId from tbl_RM_ShadowCopy where ShadowCopyId = ‘$id’"   
        write-host $cmd.CommandText 
        $reader = $cmd.ExecuteReader() 
        while($reader.Read()) 
        { 
            if ($reader.IsDBNull(0) -and $reader.IsDBNull(1)) 
            { 
                $result = $false 
            } 
        } 
        $cmd.Dispose() 
        $ctx.Close() 
        return $result 
    } 
    "**********************************" > $logfile 
    "Version $version" >> $logfile 
    get-date >> $logfile 
    $dpmservername = &"hostname" 
    $dpmsrv = connect-dpmserver $dpmservername 
    if (!$dpmsrv) 
    { 
        write-host "Unable to connect to $dpmservername" 
        exit 1 
    } 
    write-host $dpmservername 
    "Selected DPM server = $DPMservername" >> $logfile 
    $pgList = get-protectiongroup $dpmservername 
    if (!$pgList) 
    { 
        write-host   "No PGs found" 
        disconnect-dpmserver $dpmservername 
        exit 2 
    } 
    write-host("Number of ProtectionGroups = {0}" -f $pgList.Length) 
    $replicaList = @{} 
    $latestScDateList = @{} 
    foreach($pg in $pgList) 
    { 
        $dslist = get-datasource $pg 
        if ($dslist.length -gt 0) 
        { 
        write-host("Number of datasources in this PG = {0}" -f $dslist.length) 
        ("Number of datasources in this PG = {0}" -f $dslist.length) >> $logfile 
         } 
        Foreach ($ds in $dslist) 
        { 
           write-host("DS NAME=  $ds") 
           ("DS NAME=  $ds") >>$logfile 
        } 
        foreach ($ds in $dslist) 
        {        
            $rplist = get-recoverypoint $ds | where { $_.DataLocation -eq ‘Disk’ } 
            write-host("Number of recovery points for $ds {0}" -f $rplist.length) 
            ("Number of recovery points for $ds {0}" -f $rplist.length) >>$logfile  
            $countDistinctDays = GetDistinctDays $pg $ds 
            write-host("Number of days with fulls = $countDistinctDays") 
            ("Number of days with fulls = $countDistinctDays") >>$logfile 
            if($countDistinctDays -eq 0) 
            { 
                write-host   "D2T PG. No recovery points to delete" 
                "D2T PG. No recovery points to delete" >>$logfile 
                continue; 
            } 
            $replicaList[$ds.ReplicaPath] = $ds.RecoveryRangeinDays 
            $latestScDateList[$ds.ReplicaPath] = new-object DateTime 0,0 
            $lastDayOfRetentionRange = ([DateTime]::UtcNow).AddDays($ds.RecoveryRangeinDays * -1);        
            write-host("Distinct days to count = {0}. LastDayOfRetentionRange = {1} " -f $countDistinctDays, $lastDayOfRetentionRange) 
            ("Distinct days to count = {0}. LastDayOfRetentionRange = {1} " -f $countDistinctDays, $lastDayOfRetentionRange) >>$logfile 
            $distinctDays = 0; 
            $lastDistinctDay = (get-Date).Date 
            $numberOfRecoveryPointsDeleted = 0 
            if ($rplist) 
            { 
                foreach ($rp in ($rplist | sort-object -property UtcRepresentedPointInTime -descending)) 
                {                        
                    if ($rp) 
                    {                    
                        if ($rp.UtcRepresentedPointInTime.Date -lt $lastDistinctDay) 
                        { 
                            $distinctDays += 1 
                            $lastDistinctDay = $rp.UtcRepresentedPointInTime.Date 
                        } 
                        write-host(" $ds") 
                        (" $ds") >>$logfile 
                        write-host("  Recovery Point #$distinctdays RPtime={0}" -f $rp.UtcRepresentedPointInTime) 
                        ("  Recovery Point #$distinctdays RPtime={0}" -f $rp.UtcRepresentedPointInTime) >>$logfile 
                        if (($distinctDays -gt $countDistinctDays) -and ($rp.UtcRepresentedPointInTime -lt $lastDayOfRetentionRange)) 
                        { 
                            write-host ("Recovery Point would be deleted ! – RPtime={0}" -f $rp.UtcRepresentedPointInTime)  -foregroundcolor red 
                            ("Recovery Point would be deleted ! – RPtime={0} <<<<<<<" -f $rp.UtcRepresentedPointInTime) >>$logfile 
    #remove-recoverypoint $rp -ForceDeletion -confirm:$true | out-null 
                            $numberOfRecoveryPointsDeleted += 1 
                        } 
                        else 
                        { 
                            write-host "    Recovery point not expired yet" 
                            "    Recovery point not yet expired" >>$logfile 
                        } 
                    } 
                    else 
                    { 
                        write-host "Got a NULL rp" 
                        "Got a NULL rp" >>$logfile 
                    }    
                } 
                write-host "Number of RPs that would be deleted = $numberOfRecoveryPointsDeleted"   
                "Number of RPs that would be deleted = $numberOfRecoveryPointsDeleted" >>$logfile             
            } 
        } 
    } 
    disconnect-dpmserver $dpmservername 
    write-host "Exiting from script" 
    #exit 

    after that, there is still one way, to manualy delete the Recoverypoints on the old disk, but try the two steps before

    Seidl Michael | http://www.techguy.at | twitter.com/techguyat | facebook.com/techguyat

    Tuesday, May 27, 2014 2:35 PM
  • I have tried those on Numerous occasions even did it yesterday and for F: in that specific Datasource it shows nothing.

    Here is the Show-Pruneshadowcopies log entry. Notice E: has recovery points listed and F doesn't

    Number of datasources in this PG = 2
    DS NAME=  F:\ on computer server.domain.com
    DS NAME=  E:\ on computer server.domain.com
    Number of recovery points for F:\ on computer server.domain.com
    Number of days with fulls = 4
    Distinct days to count = 4. LastDayOfRetentionRange = 5/21/2014 1:18:29 PM
    Number of recovery points for E:\ on computer server.domain.com 9
    Number of days with fulls = 4
    Distinct days to count = 4. LastDayOfRetentionRange = 5/21/2014 1:18:31 PM
     E:\ on computer server.domain.com
      Recovery Point #0 RPtime=5/26/2014 8:00:29 AM
        Recovery point not yet expired
     E:\ on computer server.domain.com
      Recovery Point #1 RPtime=5/23/2014 8:00:43 PM
        Recovery point not yet expired
     E:\ on computer server.domain.com
      Recovery Point #1 RPtime=5/23/2014 8:00:35 AM
        Recovery point not yet expired
     E:\ on computer server.domain.com
      Recovery Point #2 RPtime=5/22/2014 8:00:31 PM
        Recovery point not yet expired
     E:\ on computer server.domain.com
      Recovery Point #2 RPtime=5/22/2014 8:00:36 AM
        Recovery point not yet expired
     E:\ on computer server.domain.com
      Recovery Point #3 RPtime=5/21/2014 8:00:23 PM
        Recovery point not yet expired
     E:\ on computer server.domain.com
      Recovery Point #3 RPtime=5/21/2014 8:00:37 AM
        Recovery point not yet expired
     E:\ on computer server.domain.com
      Recovery Point #4 RPtime=5/20/2014 8:00:26 PM
        Recovery point not yet expired
     E:\ on computer server.domain.com
      Recovery Point #4 RPtime=5/20/2014 8:00:37 AM
        Recovery point not yet expired
    Number of RPs that would be deleted = 0

    Tuesday, May 27, 2014 2:42 PM
  • Try this command with your disk

    (get-dpmdisk).pgmember

    are there mebers on your disk?


    Seidl Michael | http://www.techguy.at | twitter.com/techguyat | facebook.com/techguyat

    Tuesday, May 27, 2014 2:51 PM
  • this is the output I get;

    PS C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin> (get-dpmdisk).pgmember
    PS C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin>

    Tuesday, May 27, 2014 2:55 PM
  • only the get-dpmdisk

    and copy the property pgmember of your affected disk, is it empty?


    Seidl Michael | http://www.techguy.at | twitter.com/techguyat | facebook.com/techguyat

    Tuesday, May 27, 2014 2:57 PM
  • Here it the Get-DPMDisk output. the Bolded ones are the ones that are not aging out;


    Name          DiskStatus        NtDiskId TotalCapacit UnallocatedS DiskTypeLabe
                                                   yLabel    paceLabel l          
    ----          ----------        -------- ------------ ------------ ------------
    DGC LUNZ  ... Healthy                  1         0 GB         0 GB Uninitial...
    DGC LUNZ  ... Healthy                  2         0 GB         0 GB Uninitial...
    DGC LUNZ  ... Healthy                  3         0 GB         0 GB Uninitial...
    DGC LUNZ  ... Healthy                  4         0 GB         0 GB Uninitial...
    PowerDevic... Healthy                  7      4095 GB      3794 GB Dynamic    
    CDISK ISCS... Healthy                  9      7167 GB      1246 GB Dynamic    
    PowerDevic... Healthy                  6      2499 GB      2258 GB Dynamic    
    CDISK ISCS... Healthy                  8      6143 GB       168 GB Dynamic    
    PowerDevic... Healthy                  5      3071 GB      2766 GB Dynamic    

    Here is a screen capture of the disks;


    • Edited by M_Bay Tuesday, May 27, 2014 3:09 PM
    Tuesday, May 27, 2014 3:05 PM
  • This command should give us the members of the voldes disks

    $Disks=Get-DPMDisk
    $Disks[4].pgmember
    $Disks[6].pgmember
    $Disks[8].pgmember


    Seidl Michael | http://www.techguy.at | twitter.com/techguyat | facebook.com/techguyat

    Tuesday, May 27, 2014 3:08 PM
  • Here is the output

    PS C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin> $Disks = Get-DPMDisk

    PS C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin> $Disks[4].pgmember

    PS C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin> $Disks[6].pgmember

    PS C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin> $Disks[8].pgmember

    PS C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin>

    Tuesday, May 27, 2014 3:13 PM
  • My opionion:

    Somethings goes wrong during Migration.

    Once try to start a diskmigration, if this is not working, try to remove the Disk from DPM


    Seidl Michael | http://www.techguy.at | twitter.com/techguyat | facebook.com/techguyat

    Tuesday, May 27, 2014 4:43 PM
  • The Datasource for this is showing association with the new disk. So I know it was migrated. the thing is after the migration the consistency check keeps getting interrupted and not completing properly.

    If I just drop the disk from DPM what does that do for the entries in DPMDB pointing to these volumes?

    Tuesday, May 27, 2014 5:41 PM
  • In my opinion, i think that DPM just lose some information in the DB, an Datasources and Replicas are on the new disk, so lets try this.

    1: Try to Move old Disk to new Disk, maybe DPM will repair itself, to it with this Script: http://gallery.technet.microsoft.com/Migrate-DPM-Disk-or-dea8d4e9

    if this not working, we will try to solve it another way

    DPM has a function, if a Disk has crashed to repair the Datasourcres. i don't know what exactly will happen with the old recovery point that maybe on the old disk, but i think thats the best way to solve the problem.

    1: shutdown Server
    2: detach the old disks physically from the Server
    3: turn on server
    4: open DPM console, disk should be showed as missing
    5: run dpmsync -ReallocateReplica "this repairs al replicas on the old Disks ad removes the old disks
    6: hopefully all should be fine and checkpoint should work



    Seidl Michael | http://www.techguy.at | twitter.com/techguyat | facebook.com/techguyat

    Wednesday, May 28, 2014 5:05 AM
  • Here is the script containing the Server name as well.

    select LR.ReplicaId, DS.DataSourceName, S.ServerName from tbl_PRM_LogicalReplica LR
    join tbl_IM_DataSource DS on LR.DataSourceId = DS.DataSourceId
    join tbl_AM_Server S on DS.ServerId = S.ServerId
    where LR.ReplicaId in (select ReplicaId from tbl_PRM_LogicalReplica LR1
    	join tbl_IM_DataSource DS1 on LR1.DataSourceId = DS1.DataSourceId
    	where DS1.DataSourceName LIKE '%DatasourceName%')
    ORDER BY LR.ReplicaId

    Thanks.

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

    Wednesday, May 28, 2014 11:38 AM
  • This query shows two Replica IDs for one Datasource. One of them being the old migrated data. This is what I am trying to gracefully remove.
    Wednesday, May 28, 2014 12:55 PM
  • Will try.

    Wednesday, May 28, 2014 12:56 PM
  • Can you modify so it shows the mounted volume?
    Wednesday, May 28, 2014 1:25 PM
  • Can I just remove the disks from the DPM Pool in the admin console?
    Wednesday, May 28, 2014 1:50 PM
  • try the way i explained

    Seidl Michael | http://www.techguy.at | twitter.com/techguyat | facebook.com/techguyat

    Wednesday, May 28, 2014 1:52 PM
  • did you resolve your issue?

    Seidl Michael | http://www.techguy.at | twitter.com/techguyat | facebook.com/techguyat

    Friday, May 30, 2014 2:22 PM
  • No, I tried the way you explained the Disks still show in DPM as missing. I have reattached them and now I am trying to get the Disk to show again.
    • Edited by M_Bay Friday, May 30, 2014 3:38 PM
    Friday, May 30, 2014 3:27 PM
  • The aged replicas are still showing and associated with DPM.

    Any help to gracefully drop them out will be much appreciated :(

    Monday, June 2, 2014 12:32 PM
  • I was able to get the disks free by stopping protection of member and deleting replica on disk.
    • Edited by M_Bay Monday, June 2, 2014 5:12 PM
    Monday, June 2, 2014 5:08 PM