NAME

Get-DcsChunkAllocationMap

SYNOPSIS

Returns storage allocation unit (SAU) data for a specified virtual disk in a pool on a particular server (also known as a logical disk).

SYNTAX

Get-DcsChunkAllocationMap   -VirtualDisk <Object>   -Server <Object>   [ -Connection <String> ]   [ -PipelineVariable <String> ]

DESCRIPTION

Returns storage allocation unit (SAU) data for a specified virtual disk in a pool on a particular server (also known as a logical disk). The cmdlet shows how many chunks are allocated on each physical disk (physical disk SAU offsets) in a pool. Data returned can be used to determine allocation distribution for the virtual disk on disks in the pool.

PARAMETERS

-VirtualDisk<Object>
VirtualDiskData object, name or ID of the virtual disk. The object can be obtained from Get-DcsVirtualDisk.

Required: true
Position: named
Default value:
Accept pipeline input: false
Accept wildcard characters: false

-Server<Object>
Computer name or ID of the server. The computer name must be unique or the name must be fully qualified.

Required: true
Position: named
Default value:
Accept pipeline input: false
Accept wildcard characters: false

-Connection<String>
Alias of the connection to the server group. If not specified, the default connection is used.

Required: false
Position: named
Default value:
Accept pipeline input: false
Accept wildcard characters: false

-PipelineVariable<String>

Required: false
Position: named
Default value:
Accept pipeline input: false
Accept wildcard characters: false

INPUTS

VirtualDiskData : Object that identifies and describes the virtual disk.

OUTPUTS

DiskAllocationInfoData : Object that associates the location for each SAU within the respective physical disks for a specified virtual disk storage source.

NOTES

Also see Get-DcsAllocationMap, Get-DcsChunkAllocation, Get-DcsChunkReclamationMap, Get-DcsVirtualDisk. The difference between Get-DcsChunkAllocationMap and Get-DcsAllocationMap is that the former returns allocations from the physical disk perspective (how many chunks are allocated on each physical disk for the specified logical disk), and the later returns the allocations from the logical disk perspective (which chunks are allocated or not regardless of the physical disk on which they reside). This function is highly volatile because I/O may change at any time. The call will throw an exception if the chunk allocation changes while getting the data. In this case, rerun the cmdlet.

EXAMPLES


-------------- Example 1 Returns data for a specified virtual disk --------------
$VDChunksAllocMap = Get-DcsChunkAllocationMap -VirtualDisk "Virtual disk 10" -Server SSV1
$VDChunksAllocMap
PoolMemberId                                                          ChunkMap
------------                                                          --------
c358e4a6-26e0-4f07-aa9e-e780fff049bb                                  DataCore.Executive.BitArrayEx
4407d9de-8022-40d3-be64-5db8eaf44260                                  DataCore.Executive.BitArrayEx
$VDChunksAllocMap[0].ChunkMap | Get-Member
TypeName: DataCore.Executive.BitArrayEx
Name        MemberType            Definition
----        ----------            ----------
Equals      Method                bool Equals(System.Object other)
GetHashCode Method                int GetHashCode()
GetType     Method                type GetType()
Or          Method                System.Void Or(DataCore.Executive.BitArrayEx otherBitArrayEx)
ToString    Method                string ToString()
Item        ParameterizedProperty bool Item(int index) {get;set;}
BitMap      Property              System.Byte[] BitMap {get;set;}
Count       Property              System.Int32 Count {get;set;}
$VDChunksAllocMap[0].ChunkMap
BitMap                                                                                                                                Count
------                                                                                                                                -----
{248, 255, 255, 255...}                                                                                                                 397
$VDChunksAllocMap = Get-DcsChunkAllocationMap -VirtualDisk "Virtual disk 10" -Server SSV1
ForEach ($d in $VDChunksAllocMap)
{
Write-Host (Get-DcsPhysicalDisk -PoolMember $d.PoolMemberid).ExtendedCaption
Write-Host
Write-Host "number of Bits in BitMap =" $d.ChunkMap.Count
Write-Host "BitMap:"
Write-Host $d.ChunkMap.BitMap
Write-Host
}

Chunk allocation data (SAUs) is returned for the virtual disk named "Virtual disk 10" on the server named "SSV1" and stored in the variable $VDChunksAllocMap. The contents of the variable are output. There are two physical disks are in the pool. The Pool Member ID and Chunk Map are returned for the disks. The PowerShell cmdlet Get-Member can be used to get the properties of the ChunkMap object, which are Bitmap and Count (total number of bits). The ChunkMap object for the first record in the variable is displayed. A script file shows one way to output the ChunkMap data for each disk. The cmdlet Get-DcsPhysicalDisk is used to get the disk name from the PoolMemberId. The variable $VDChunksAllocMap is used to output the bit count and actual bitmap from the ChunkMap object for each disk in the pool that stores the virtual disk data. The bitmap is displayed in a series of bytes in decimal that represent a bitmap of the SAU allocation for a disk. The disk size divided by the SAU size is equal to the number of SAUs or bits.

Disk 5 on SSV1
number of Bits in BitMap = 397
BitMap:
248 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 29 252 255 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Disk 6 on SSV1
number of Bits in BitMap = 397
BitMap:
248 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 21 249 255 127 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0