Move LDM partition ID 32065 RRS feed

  • Question

  • Hello!

    I have a problem with my DPM 2012 R2 server.
    In errors i found ID 32065 LDM Base under 90%.

    I found instruction, unfortunately all links on script not work.

    How to move LDM to another partition? Where can i find work instruction?
    Tuesday, June 11, 2019 7:03 AM

All replies

  • Hello,

    You will need to use the MigrateDatasourceDataFromDPM.ps1 script to migrate the data.

    You'll find information and instructions over here:
    How to Use The Migratedatasourcedatafromdpm.Ps1 DPM Powershell Script to Move Data

    Best regards,

    Blog: LinkedIn:

    Tuesday, June 11, 2019 7:32 AM
  • Hello, i read the article. Unfortunately nothing found about LDM :(

    Monday, June 17, 2019 9:54 AM
  • This also applies to the Logical Disk Manager Database (LDM) disks, as all disks used by DPM 2012 R2 are used by the LDM.

    Blog: LinkedIn:

    Monday, June 17, 2019 12:51 PM
  • This also applies to the Logical Disk Manager Database (LDM) disks, as all disks used by DPM 2012 R2 are used by the LDM.

    Blog: LinkedIn:

    I have 7 Disk - 60 Tb which cuted on thousands partitions.

    I don't need to move all of this data. Only find LDM and move to another disk.

    I don't understand how to find LDM partition.

    Tuesday, June 18, 2019 4:46 AM
  • For the LDM database occupancy is nearing threshold link that you've found, I found the correct links for you that weren't working.

    Check them here:

    The following DPM PowerShell script will show you how many extents each protected datasource is using so you can use the MigrateDatasourceDataFromDPM.PS1 script to migrate it to a disk with the most contiguous free space. Once the older recovery points expire, the volumes that were migrated will be deleted and will free up the excess LDM records.

    Checking LDM database space usage

    Blog: LinkedIn:

    • Proposed as answer by Leon Laude Tuesday, June 18, 2019 9:46 PM
    Tuesday, June 18, 2019 8:00 AM
  • Thanks!

    When i start the script:

    Select SQLSERVER from list below:

    Myservername\Blank space

    I can't choose my DPM DB Name and others DBs of my network.

    If i choose blank DBname - error.

    What am i doing wrong?

    Thursday, June 20, 2019 9:05 AM
  • Make sure you copied the full script:

    #begin script
    param () 
    #region queries 
    #-- Count only extents from dynamic disks 
    $ExtentCountCmd = "select count(*) as  TotalNumberOfDynamicExtents from tbl_SPM_Extent extent where extent.DiskID in (select DiskID from tbl_SPM_Disk where DiskType = 1) " 
    #-- Count the number of unique PhysicalReplicas 
    $PhysReplCountCmd = "select physicalreplicaid as PhysicalReplicaId, COUNT(*) as Count from tbl_PRM_LogicalReplica where physicalreplicaid is not null and datasourceid is not null group by PhysicalReplicaId" 
    #-- Count the number of datasources 
    $DScountCmd = "select COUNT(*) as TotalNumberOfDatasources from tbl_IM_Datasource where ProtectedGroupId is not null" 
    #-- Count the number of volumes 
    $VolCountCmd = "select COUNT(*) as NumberOfVolumes from tbl_SPM_Volume where VolumeSetID is not null" 
    #-- Get the LDM alerts 
    $LDMAlertsCmd = "select AlertId, Type, OccuredSince, Resolution, ResolvedTime from tbl_AHP_Alerts where Type = 63 or Type = 64 order by OccuredSince desc " 
    #-- Get the datasources with the maximum extents (useful for migration) 
    $DSwithExtentsCmd = "SELECT (select DataSourceName from tbl_IM_Datasource ds2 where DataSourceId = DS.DataSourceId) as DatasourceName, 
    (select pg.FriendlyName from tbl_IM_Datasource ds2 join tbl_IM_ProtectedGroup pg on ds2.ProtectedGroupId = pg.ProtectedGroupId 
    where DataSourceId = DS.DataSourceId) as ProtectionGroupName, 
    COUNT(Extent.DiskID) as NumberOfExtents, replica.PhysicalReplicaId as PhysicalReplicaId, DS.DatasourceId as DatasourceId 
    FROM tbl_SPM_Extent Extent WITH (NOLOCK) 
    JOIN dbo.tbl_SPM_Volume Volume WITH (NOLOCK) 
    ON Extent.GuidName = Volume.GuidName 
    JOIN dbo.tbl_PRM_LogicalReplica Replica WITH (NOLOCK) 
    ON Replica.PhysicalReplicaId = Volume.VolumeSetID 
    JOIN dbo.tbl_IM_Datasource DS WITH (NOLOCK) 
    ON Replica.DataSourceId = DS.DataSourceId 
    GROUP BY DS.DataSourceId, Replica.PhysicalReplicaId 
    Order by NumberOfExtents desc" 
    #-- Get all the Replica and SC disk threshold exceeded alerts along with the corresponding datasources 
    $GetDiskAlertsCmd = "select aa.AlertId, ra.DatasourceId, Type as AlertType, OccuredSince, Resolution, ResolvedTime from tbl_AHP_Alerts aa 
    JOIN tbl_PRM_ReplicaAlerts ra WITH (NOLOCK) 
    ON aa.AlertId = ra.AlertId 
    where Type = 31 or Type = 36" 
    function DisplayAndSelect { 
    param ($list, $item) 
    # unified forced select from list by index number 
    Write-Host "" 
    Write-Host "Select $($item.toupper()) from list below:" 
    for ($i = 0; $i -lt $list.count; $i++) { 
    write-host "`t -> [$i] $($list[$i])" 
    Write-Host "" 
    $i = – 1 
    while (($i -lt 0) -or ($i -ge $list.count)) { 
    $now = (Get-Date).ToString($format) 
    $i = [int](Read-Host "[$now] Enter index number") 
    write-host "Selected $($list[$i])`n" 
    return $list[$i] 
    function GetSqlServers { 
    # return SQL instances that the SQL browser service can find 
    write-host "Searching for SQL service instances, this may take a while..." 
    return [System.Data.Sql.SqlDataSourceEnumerator]::Instance.GetDataSources() 
    $version = "1.6" 
    write-host "" 
    Write-Host ("=" * 30) -ForegroundColor cyan 
    Write-Host "LdmStats version $version" -ForegroundColor yellow 
    Write-Host  ("=" * 30) -ForegroundColor cyan 
    #ensure browser runs 
    $sb = Get-Service | ? {$ -match "sqlbrowser"} 
    if (!$sb) {Throw "No SQL browser service found!"} 
    if ($sb.status -ne "running") {$sb.start; sleep 500} 
    # get sql server list 
    $SQLinstances = @(GetSqlServers) 
    $tmplist = @() 
    # build SERVER\INSTANCE format 
    $SQLinstances | foreach {$tmplist += "$($_.servername)\$($_.instancename)"} 
    $SQLinstances = @($tmplist) 
    $sqlserver = DisplayAndSelect $SQLinstances "SQLserver" 
    $dpmservername = (&hostname) 
    Write-Host "Connecting [$sqlserver]..." 
    $srvr = new-object ("Microsoft.SqlServer.Management.Smo.Server") $sqlserver 
    $db = $srvr.Databases["DPMDB"] 
    $ExtentCount =   $db.ExecuteWithResults($ExtentcountCmd).Tables[0].rows[0].TotalNumberOfDynamicExtents 
    $DSCount =  $db.ExecuteWithResults($DScountCmd).Tables[0].rows[0].TotalNumberOfDatasources 
    $volcount = $db.ExecuteWithResults($VolcountCmd).Tables[0].rows[0].NumberOfVolumes 
    $dpmRemaining = [math]::truncate(600 - $volcount) 
    $diskcount = (Get-DPMDisk $dpmservername).count 
    Write-Host "Total disks".PadRight(20)  ": $diskcount" 
    Write-Host "Total volumes".PadRight(20) ": $volcount" 
    Write-Host "Total extents".PadRight(20) ": $ExtentCount" 
    Write-Host "Total data sources".PadRight(20) ": $DSCount" 
    $usedslots = 1 + $diskcount + (2*$volcount) + $ExtentCount 
    $slotsRemaining = 2960-$usedslots 
    $volRemaining = [math]::Truncate($slotsRemaining/3) 
    if ($dpmRemaining -lt $volRemaining) {$dsRemaining = [math]::Truncate($dpmRemaining/2)} 
    else {$dsRemaining = [math]::Truncate($volRemaining/2)} 
    Write-Host "Number of non-colocated data sources that can still be added: $dsRemaining" 
    Write-Host "`nData source extent list..." 
    $DSwithExtentsTable = $db.ExecuteWithResults($DSwithExtentsCmd).Tables[0] 
    $DSwithExtentsRows =   $DSwithExtentsTable.rows 
    $physicalReplicasPrinted = @{} 
    foreach ($row in $DSwithExtentsRows) 
    if ($physicalReplicasPrinted.Contains($row["PhysicalReplicaId"])) { 
    } else { 
    $physicalReplicasPrinted[$row["PhysicalReplicaId"]] = 1; 
    $DSwithExtentsRows | ft –AutoSize 
    Write-Host "`nReplica colocation counts..." 
    $PhysReplCount =   $db.ExecuteWithResults($PhysReplCountCmd).Tables[0].rows 
    $PhysReplCount | ft –AutoSize 
    Write-Host "`nLDM alerts list..." 
    $LDMAlerts =   $db.ExecuteWithResults($LDMAlertsCmd).Tables[0].rows 
    if ($LDMAlerts.Count -gt 0 ) { 
    $LDMAlerts | ft –AutoSize 
    else {write-host "None found!" -f white} 
    Write-Host "`nDone!" 

    Save the script as LdmStats.ps1 and run it in an elevated PowerShell on your DPM server.

    Blog: LinkedIn:

    Tuesday, June 25, 2019 9:46 AM