NAME
Get-DcsAllocationMap
SYNOPSIS
Retrieves the current allocation map of a virtual disk on a specified server (logical disk).
SYNTAX
Get-DcsAllocationMap -VirtualDisk <Object> -Server <Object> [ -Connection <String> ] [ -PipelineVariable <String> ]
DESCRIPTION
Retrieves the current allocation map of a virtual disk on a specified server (logical disk). The cmdlet returns allocations from the logical disk perspective, which chunks (logical disk SAU offsets) are allocated or not, regardless of the physical disk on which they reside. Returned data includes the Bitmap and Count for the logical disk. Each bit in the bit array corresponds to an SAU for the logical disk. The actual byte offset of this SAU can be determined by its position and the SAU size of the pool. The Count is determined by the number of chunks that logical disk contains (VD size divided by SAU size). If the corresponding bit is set to 1 (or True), the SAU is allocated. See the example for more information on the Bitmap.
PARAMETERS
- -VirtualDisk<Object>
- VirtualDiskData object, name or ID that identifies a virtual disk.
-
- Required: true
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -Server<Object>
- ServerHostData object, computer name or ID that identifies the server with the virtual disk storage source from which to get an allocation map. 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
OUTPUTS
BitArrrayEx : Object that displays the bitmap and bit count for the logical disk.
NOTES
Also see Get-DcsChunkAllocationMap, Get-DcsChunkAllocation, Get-DcsChunkReclamationMap, Get-DcsVirtualDisk. The difference between Get-DcsAllocationMap and Get-DcsChunkAllocationMap is that the later returns allocations from the physical disk perspective (how many chunks are allocated on each physical disk for the specified logical disk), and the former 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
Get-DcsAllocationMap -VirtualDisk "Virtual disk 1" -Server "SSVVM01"
The cmdlet is invoked to obtain the logical disk allocation map of the virtual disk named "Virtual disk 1" on the server named "SSVVM01". The Bitmap and Count is returned. In this example, the Count is 80 and the BitMap consists of 10 bytes.
The entire Bitmap is truncated. One way to see the entire BitMap would be to save the results to a variable and print the contents to the screen:
ForEach ($bit in $map) {Write-Host $bit.Bitmap} 171 84 37 83 149 170 84 165 74 213