This information is not exposed using PowerShell. I got around the issue by using querying the Data Collector database directly and parsing out one of the fields that holds this information. Also, this information is not live data, it's a snapshot of a single point in time.
The table that holds the volume information is [compmsadb].[compmsauser].[StorageVolume]. There are a couple of columns that hold the tier information for each volume. I *** now that I had wrote an SSIS package to parse out the columns for me, as they are not in any nice format. I will try and find this for you and give you the script code I used to extract the information.
The columns that hold the information are called [ClassWritableArray] and [ClassHistoricalArray]. If I remember correctly, these are the number of blocks assigned to each tier type at the time the statistics were collected. Most Compellent SANs are configured with a default 2MB block size.
While I know my page size is 2MB I'm unable to see a pattern in the above values to the tier allocation for the volume. I look forward to seeing the code sample you mentioned as i'm missing something.
You've misunderstood what we are trying to do here. We are looking for a way to programmatically (ideally with PowerShell) see the tier distribution of a volume. In EM this can be seen on at Storage >
I took a long look at the DellStoragePowerShellSDK_v2_0_1_327B that was released with EM 2015 and am pleased to report the 'Get-DellScVolumeConfigurationStorageTypeClassDistributionListAssociation' cmdlet (and possibly the longest named cmdlet I've seen!) outputs the distribution of volume space across storage type classes. This also provides live data where the sql table only seem to be updated daily.
I was able to find my original SQL Integration Services package which I used to pull the data from the DC database. The package is make up of a single "Data Flow" task with the following 3 objects. OLE DB source pointing to the DC database (see T-SQL below as the source). A "Script Component" to parse the array columns to calculate the tier usage) and a "Flat file" destination that writes the output to a CSV file.
Source: Pulls the last entry (run daily)
******** T-SQL STARTS HERE *********
SELECT SystemSN, TimeStmp, Name, ClassWritableArray, ClassHistoricalArray from compmsadb.compmsauser.StorageVolume
WHERE SystemSN = ' ' AND DATEDIFF(day, TimeStmp, GETDATE()) < 1
ORDER BY SystemSN, Name
********* T-SQL ENDS HERE **********
Script Component "ScriptMain". You will need to add output columns named within the OutputBuffer. I also only pull the tiers and classes we have configured on the SAN. You may need to adjust these to match your configuration.
******** ScriptMain START HERE *********
Public Class ScriptMain
Inherits UserComponent
Public Overrides Sub Input0_ProcessInputRow(ByVal Row As Input0Buffer)
Dim SystemSN As Integer = Row.SystemSN
Dim TimeStamp As Date = Row.TimeStmp
Dim Name As String = Row.Name
Dim ClassWritableArray As String = Row.ClassWritableArray
Dim ClassHistoricalArray As String = Row.ClassHistoricalArray
Dim delimiter As String = " "
If Not (String.IsNullOrEmpty(ClassWritableArray)) Then
After looking at the code above, the array is actually the MB used, not the number of blocks. The active space is a calculation of the active column minus the history column, and the "replays" are the history column. As a side note, the position in the array for the different classes of storage are the same if you have single or double redundancy configured on a tier (e.g Tier 3 RAID 5-9 standard is the same as Tier 3 RAID 6-10 standard, array position 18). We don't have any RAID 5-5 configured, so I'm not sure what positions they would be.
Now that Dell has released the new SDK, this SSIS package is now a little dated. I will probably look at moving towards using the SDK myself.
I have a volume that is using ~1 TB and the function returns only 52.5 GB used in Tier3, all other Tiers have 0 MB used by this volume so I guess something is wrong
I've tried also to find a way to calculate the allocated space using the new API but didn't find a function to return this info, perhaps must be calculated using RAID overhead or who knows .... :(
jfrmilner
12 Posts
0
March 3rd, 2015 03:00
+1. I'm also trying to find this information without success.
McDaidH
28 Posts
0
June 15th, 2015 09:00
This information is not exposed using PowerShell. I got around the issue by using querying the Data Collector database directly and parsing out one of the fields that holds this information. Also, this information is not live data, it's a snapshot of a single point in time.
McDaidH
28 Posts
0
June 15th, 2015 10:00
The table that holds the volume information is [compmsadb].[compmsauser].[StorageVolume]. There are a couple of columns that hold the tier information for each volume. I *** now that I had wrote an SSIS package to parse out the columns for me, as they are not in any nice format. I will try and find this for you and give you the script code I used to extract the information.
The columns that hold the information are called [ClassWritableArray] and [ClassHistoricalArray]. If I remember correctly, these are the number of blocks assigned to each tier type at the time the statistics were collected. Most Compellent SANs are configured with a default 2MB block size.
Hope this information helps.
jfrmilner
12 Posts
0
June 15th, 2015 10:00
McDaidH,
Which Table are you seeing this information in? Could you share your query?
jfrmilner
12 Posts
0
June 15th, 2015 14:00
I can see the data you mention, for me the values are as follows:
"ClassWritableArray"
"0 66686 0 163942 0 0 50424 0 0 0 0 0 0 0 0 18382 0 0 706088"
"ClassHistoricalArray"
"0 0 0 163942 0 0 50424 0 0 0 0 0 0 0 0 18382 0 0 706088"
While I know my page size is 2MB I'm unable to see a pattern in the above values to the tier allocation for the volume. I look forward to seeing the code sample you mentioned as i'm missing something.
CompellentSanAd
43 Posts
0
June 15th, 2015 17:00
#get-cmlsummary.ps1
$San = "IP or HOST"
$scusername = "USER"
Write-output "Connecting to $SAN as $scusername"
$scpassword = ConvertTo-SecureString "PASSWORD" -AsPlainText -Force
## Connect to SAN
if (!(Get-PSSnapin Compellent.StorageCenter.PSSnapin -ea SilentlyContinue)) {Add-PSSnapin Compellent.StorageCenter.PSSnapin}
try {Get-SCConnection -HostName $san -User $scusername -Password $scpassword -Save SAN -default}
catch {Write-Host "Unable to connect to the Compellent controller."; Break;}
$SC = Get-SCStorageCenter | select -expandproperty Index -first 1
# Disk Classification
$script:disktiers = @()
$script:disktiers += "Write-Intensive SSD"
$script:disktiers += "15K"
$script:disktiers += "SLCSSD"
$script:disktiers += "Read-Intensive SSD"
$script:disktiers += "10K"
$script:disktiers += "FATA"
$script:disktiers += "7K"
function collectcmlinfo
{
foreach ($tier in $disktiers)
{
$diskT1 = Get-scdisk -Classification $tier | ? {$_.controltype -eq "managed"} |Select-Object Index, Capacity, FreeSpace, Product, Classification, LogicalPath, TotalBlocks, UnallocatedBlocks
if($diskT1 -ne $null)
{
$spare1 = 0
$count1 = 0
$disk1Total = 0
$disk1Unall1 = 0
$disk1Total1 = 0
$Allocated1 = 0
foreach ($disk1 in $diskT1)
{
$disk1Total = $disk1.TotalBlocks
$disk1Unall = $disk1.UnallocatedBlocks
$disk1TotalBlock = (($disk1Total * 512) / 1024 / 1024 / 1024)
$disk1TotalUnall = (($disk1Unall * 512) / 1024 / 1024 / 1024)
$disk1Total1 += $disk1.TotalBlocks
$disk1Unall1 += $disk1.UnallocatedBlocks
$disk1TotalBlock1 = (($disk1Total1 * 512) / 1024 / 1024 / 1024 / 1024)
$disk1TotalUnall1 = (($disk1Unall1 * 512) / 1024 / 1024 / 1024 / 1024)
$count1++
# Disk Calculations
$TotA = $disk1TotalBlock1
$Unused = $disk1TotalUnall1
$Allocated1 = ($disk1TotalBlock1 - $disk1TotalUnall1)
$TotAllocated = $Allocated1
$Used1 = ($Allocated1 / $disk1TotalBlock1)
$Free = ($Allocated1 - $disk1TotalUnall1)
}
$a1 = "{0:N3}" -f $disk1TotalBlock1
$b1 = "{0:N3}" -f $disk1TotalUnall1
$c1 = "{0:N3}" -f $Allocated1
$d1 = "{0:P2}" -f $Used1
#Calculating Totals each loop
$Total += $TotA
$TotAllocated1 += $TotAllocated
$UnusedSpace += $Unused
$FreeSP += $Free
Write-Host "`n $tier"
Write-Host "# Disks|Space Available(TB)|Allocated(TB)|Total Free Space(TB)|%Used Space" | Format-Table
Write-Host " $count1 | $a1 "TB" | $c1 "TB" | $b1 "TB" | $d1" | Format-Table
}
else
{
# IF No disks found
# Write-Host "`nSorry, no $tier Disks were found in $SC." -ForegroundColor Magenta
}
}
$FreeTot = "{0:N3}" -f $FreeSP
$Total1 = "{0:N3}" -f $Total
$TotAllocatedSpace = "{0:N3}" -f $TotAllocated1
$UnusedSpaceTot = "{0:N3}" -f $UnusedSpace
Write-Host " "
Write-Host "`n Total disk Space: $Total1" -ForegroundColor Yellow | Format-Table
Write-Host "`n Total Space Allocated for Volume Use: $TotAllocatedSpace " -ForegroundColor Yellow | Format-Table
Write-Host " Unallocated Disk Space: $UnusedSpaceTot " -ForegroundColor Yellow | Format-Table
}
collectcmlinfo
CompellentSanAd
43 Posts
0
June 15th, 2015 17:00
I have been able to create a script that checks for each model of disk and creates a table for each Tier of storage. See below:
Write-Intensive SSD
# Disks|Space Available(TB)|Allocated(TB)|Total Free Space(TB)|%Used Space
5 | 1.819 TB | 1.405 TB | 0.415 TB | 77.20 %
Read-Intensive SSD
# Disks|Space Available(TB)|Allocated(TB)|Total Free Space(TB)|%Used Space
5 | 7.277 TB | 4.067 TB | 3.210 TB | 55.88 %
7K
# Disks|Space Available(TB)|Allocated(TB)|Total Free Space(TB)|%Used Space
20 | 18.194 TB | 18.193 TB | 0.001 TB | 99.99 %
Total disk Space: 27.290
Total Space Allocated for Volume Use: 23.664
Unallocated Disk Space: 3.626
jfrmilner
12 Posts
0
June 16th, 2015 02:00
CompellentSanAdmin,
You've misunderstood what we are trying to do here. We are looking for a way to programmatically (ideally with PowerShell) see the tier distribution of a volume. In EM this can be seen on at Storage >
jfrmilner
12 Posts
0
June 16th, 2015 15:00
I took a long look at the DellStoragePowerShellSDK_v2_0_1_327B that was released with EM 2015 and am pleased to report the 'Get-DellScVolumeConfigurationStorageTypeClassDistributionListAssociation' cmdlet (and possibly the longest named cmdlet I've seen!) outputs the distribution of volume space across storage type classes. This also provides live data where the sql table only seem to be updated daily.
Sample output example (1type):
DiskSpaceActive : 0 MB
DiskSpaceCompressed : 0 MB
DiskSpaceReplay : 147.73 GB
DiskSpaceSavedByCompression : 0 MB
DiskTierNumber : 3
DiskTrack : FastTrack
PercentCompressed : -1
RaidLevel : RaidSixTen
StorageTypeClass : 30715.1.15 ScStorageTypeClass Assigned - Redundant - 2 MB - Tier 3 RAID 6-10 - Fast
UncompressedToCompressedPageRatio : -1
Volume : 30715.5 ScVolume pdc1_01
VolumeSpaceActive : 0 MB
VolumeSpaceCompressed : 0 MB
VolumeSpaceReplay : 118.18 GB
ObjectName : ScVolumeStorageTypeClassDistribution
McDaidH, I'd still like to see your sql code if you would be so kind to post it.
McDaidH
28 Posts
0
June 17th, 2015 15:00
jfrmilner,
I was able to find my original SQL Integration Services package which I used to pull the data from the DC database. The package is make up of a single "Data Flow" task with the following 3 objects. OLE DB source pointing to the DC database (see T-SQL below as the source). A "Script Component" to parse the array columns to calculate the tier usage) and a "Flat file" destination that writes the output to a CSV file.
Source: Pulls the last entry (run daily)
******** T-SQL STARTS HERE *********
SELECT SystemSN, TimeStmp, Name, ClassWritableArray, ClassHistoricalArray from compmsadb.compmsauser.StorageVolume
WHERE SystemSN = ' ' AND DATEDIFF(day, TimeStmp, GETDATE()) < 1
ORDER BY SystemSN, Name
********* T-SQL ENDS HERE **********
Script Component "ScriptMain". You will need to add output columns named within the OutputBuffer. I also only pull the tiers and classes we have configured on the SAN. You may need to adjust these to match your configuration.
******** ScriptMain START HERE *********
Public Class ScriptMain
Inherits UserComponent
Public Overrides Sub Input0_ProcessInputRow(ByVal Row As Input0Buffer)
Dim SystemSN As Integer = Row.SystemSN
Dim TimeStamp As Date = Row.TimeStmp
Dim Name As String = Row.Name
Dim ClassWritableArray As String = Row.ClassWritableArray
Dim ClassHistoricalArray As String = Row.ClassHistoricalArray
Dim delimiter As String = " "
If Not (String.IsNullOrEmpty(ClassWritableArray)) Then
Dim inputArrayA() As String = _
ClassWritableArray.Split(New String() {delimiter}, _
StringSplitOptions.RemoveEmptyEntries)
Dim inputArrayR() As String = _
ClassHistoricalArray.Split(New String() {delimiter}, _
StringSplitOptions.RemoveEmptyEntries)
With Output0Buffer
.AddRow()
.SystemSN = SystemSN
.TimeStamp = TimeStamp
.Name = Name
.Tier1Raid10StdA = CInt(inputArrayA(4)) - CInt(inputArrayR(4))
.Tier1Raid10StdR = CInt(inputArrayR(4))
.Tier2Raid10StdA = CInt(inputArrayA(7)) - CInt(inputArrayR(7))
.Tier2Raid10StdR = CInt(inputArrayR(7))
.Tier2Raid59FastA = CInt(inputArrayA(9)) - CInt(inputArrayR(9))
.Tier2Raid59FastR = CInt(inputArrayR(9))
.Tier2Raid10FastA = CInt(inputArrayA(10)) - CInt(inputArrayR(10))
.Tier2Raid10FastR = CInt(inputArrayR(10))
.Tier2Raid59StdA = CInt(inputArrayA(12)) - CInt(inputArrayR(12))
.Tier2Raid59StdR = CInt(inputArrayR(12))
.Tier3Raid610FastA = CInt(inputArrayA(15)) - CInt(inputArrayR(15))
.Tier3Raid610FastR = CInt(inputArrayR(15))
.Tier3Raid610StdA = CInt(inputArrayA(18)) - CInt(inputArrayR(18))
.Tier3Raid610StdR = CInt(inputArrayR(18))
End With
End If
End Sub
End Class
******** ScriptMain ENDS HERE *********
After looking at the code above, the array is actually the MB used, not the number of blocks. The active space is a calculation of the active column minus the history column, and the "replays" are the history column. As a side note, the position in the array for the different classes of storage are the same if you have single or double redundancy configured on a tier (e.g Tier 3 RAID 5-9 standard is the same as Tier 3 RAID 6-10 standard, array position 18). We don't have any RAID 5-5 configured, so I'm not sure what positions they would be.
Now that Dell has released the new SDK, this SSIS package is now a little dated. I will probably look at moving towards using the SDK myself.
Regards,
Hugh McDaid
aureliandan
1 Rookie
•
8 Posts
0
October 20th, 2015 07:00
Tried: Get-DellScVolumeConfigurationStorageTypeClassDistributionListAssociation
but it didn't return accurate results
I have a volume that is using ~1 TB and the function returns only 52.5 GB used in Tier3, all other Tiers have 0 MB used by this volume so I guess something is wrong
I've tried also to find a way to calculate the allocated space using the new API but didn't find a function to return this info, perhaps must be calculated using RAID overhead or who knows .... :(