NAME
Set-DcsVirtualDiskSize
SYNOPSIS
Changes the size parameters of a virtual disk.
SYNTAX
Set-DcsVirtualDiskSize -VirtualDisk <Object> [ -Size <DataSize> ] [ -ReservedSpace <DataSize> ] [ -Yes] [ -Connection <String> ] [ -PipelineVariable <String> ] [ -WhatIf] [ -Confirm]
DESCRIPTION
Changes the size parameters of a virtual disk. If decreasing the size of a virtual disk, ensure that data will not be lost before performing this operation.
PARAMETERS
- -VirtualDisk<Object>
- VirtualDiskData object, name, or ID that identifies the virtual disk.
-
- Required: true
- Position: named
- Default value:
- Accept pipeline input: true (ByValue)
- Accept wildcard characters: false
-
- -Size<DataSize>
- Specify this parameter to change the size of the virtual disk. Valid values consist of the number followed by the unit of measurement (MiB, GiB, TiB). Decimals may be used. For example, "100GiB", "1.5TiB", and "500000MiB" are valid sizes. Size can range from a minimum of 8MiB to a maximum of 1024TiB.
-
- Required: false
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -ReservedSpace<DataSize>
- Specify this parameter to set the size of the reserved space for the virtual disk. Reserved space is the space reserved in a pool for exclusive use by the virtual disk and must be currently free in the pool. Valid values consist of the number followed by the unit of measurement (MiB, GiB, TiB). Decimals may be used. For example, "100GiB", "1.5TiB", and "500000MiB" are valid sizes. Size can range from a minimum of 1GiB to the size of the virtual disk.
-
- Required: false
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -Yes<SwitchParameter>
- Decreasing the size of a virtual disk is an operation that requires confirmation. Specify this parameter to confirm your intention to decrease the size and prevent user interaction during scripted scenarios. If not specified, user interaction will be required.
-
- Required: false
- 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
-
- -WhatIf<SwitchParameter>
-
- Required: false
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -Confirm<SwitchParameter>
-
- 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
VirtualDiskData : Object that identifies and describes the virtual disk.
NOTES
Also see Set-DcsVirtualDiskProperties, Get-DcsVirtualDisk, Get-DcsChunkAllocation, Get-DcsChunkAllocationMap
EXAMPLES
Set-DcsVirtualDiskSize -VirtualDisk "Virtual disk 1" -Size 50GiB -ReservedSpace 25GiB -Yes
The size of the virtual disk named "Virtual disk 1" is set to 50GiB and the reserved size in the pool is set to 25GiB. The Yes parameter is included to eliminate the need to confirm the operation.
VirtualDiskGroupId | : | |
FirstHostId | : | 84972D6B-7E71-4616-BDA1-57ECEAF3FFC4 |
SecondHostId | : | C553D471-3527-47EC-9326-D53E04204F2B |
BackupHostId | : | |
StorageProfileId | : | 100469DF-0BE1-40DA-874E-9F1DA5A259E3 |
Alias | : | Virtual disk 1 |
Description | : | |
Size | : | 50.00 GiB |
Type | : | MultiPathMirrored |
DiskStatus | : | Failed |
InquiryData | : | DataCore Virtual Disk DCS |
ScsiDeviceId | : | {96, 3, 13, 144...} |
RemovableMedia | : | False |
WriteThrough | : | False |
Offline | : | False |
DiskLayout | : | DataCore.Executive.PhysicalDiskLayout |
PersistentReserveEnabled | : | True |
RecoveryPriority | : | Regular |
IsServed | : | False |
Id | : | ff8924d57a8945e89f2738545d52503d |
Caption | : | Virtual disk 1 |
ExtendedCaption | : | Virtual disk 1 from Local Group |
Internal | : | False |
Get-DcsVirtualDisk -ServerGroup "Local Group" -Kind Standard | Set-DcsVirtualDiskSize -Size 100GiB
The cmdlet Get-DcsVirtualDisk is invoked to obtain VirtualDiskData objects for all virtual disks of standard type in the server group named "Local Group". The data is piped to Set-DcsVirtualDiskSize to set the size for those virtual disks to 100GiB. The size was increased for all virtual disks, so the Yes parameter was not needed to confirm the operation.
VirtualDiskGroupId | : | |
FirstHostId | : | 84972D6B-7E71-4616-BDA1-57ECEAF3FFC4 |
SecondHostId | : | C553D471-3527-47EC-9326-D53E04204F2B |
BackupHostId | : | |
StorageProfileId | : | 100469DF-0BE1-40DA-874E-9F1DA5A259E3 |
Alias | : | Virtual disk 1 |
Description | : | |
Size | : | 100.00 GiB |
Type | : | MultiPathMirrored |
DiskStatus | : | Online |
InquiryData | : | DataCore Virtual Disk DCS |
ScsiDeviceId | : | {96, 3, 13, 144...} |
RemovableMedia | : | False |
WriteThrough | : | False |
Offline | : | False |
DiskLayout | : | DataCore.Executive.PhysicalDiskLayout |
PersistentReserveEnabled | : | True |
RecoveryPriority | : | Regular |
IsServed | : | False |
Id | : | ff8924d57a8945e89f2738545d52503d |
Caption | : | Virtual disk 1 |
ExtendedCaption | : | Virtual disk 1 from Local Group |
Internal | : | False |
VirtualDiskGroupId | : | |
FirstHostId | : | 84972D6B-7E71-4616-BDA1-57ECEAF3FFC4 |
SecondHostId | : | C553D471-3527-47EC-9326-D53E04204F2B |
BackupHostId | : | |
StorageProfileId | : | 100469DF-0BE1-40DA-874E-9F1DA5A259E3 |
Alias | : | Virtual disk 2 |
Description | : | |
Size | : | 100.00 GiB |
Type | : | MultiPathMirrored |
DiskStatus | : | Online |
InquiryData | : | DataCore Virtual Disk DCS |
ScsiDeviceId | : | {96, 3, 13, 144...} |
RemovableMedia | : | False |
WriteThrough | : | False |
Offline | : | False |
DiskLayout | : | DataCore.Executive.PhysicalDiskLayout |
PersistentReserveEnabled | : | True |
RecoveryPriority | : | Regular |
IsServed | : | False |
Id | : | eaf8503bd6df4888922811dfc945aaca |
Caption | : | Virtual disk 2 |
ExtendedCaption | : | Virtual disk 2 from Local Group |
Internal | : | False |
VirtualDiskGroupId | : | |
FirstHostId | : | 84972D6B-7E71-4616-BDA1-57ECEAF3FFC4 |
SecondHostId | : | C553D471-3527-47EC-9326-D53E04204F2B |
BackupHostId | : | |
StorageProfileId | : | 100469DF-0BE1-40DA-874E-9F1DA5A259E3 |
Alias | : | Virtual disk 3 |
Description | : | |
Size | : | 100.00 GiB |
Type | : | MultiPathMirrored |
DiskStatus | : | Online |
InquiryData | : | DataCore Virtual Disk DCS |
ScsiDeviceId | : | {96, 3, 13, 144...} |
RemovableMedia | : | False |
WriteThrough | : | False |
Offline | : | False |
DiskLayout | : | DataCore.Executive.PhysicalDiskLayout |
PersistentReserveEnabled | : | True |
RecoveryPriority | : | Regular |
IsServed | : | False |
Id | : | d4682ace67a44d86a6b6489b3ef700fa |
Caption | : | Virtual disk 3 |
ExtendedCaption | : | Virtual disk 3 from Local Group |
Internal | : | False |
Set-DcsVirtualDiskSize -VirtualDisk "Virtual disk 1" -Size (Get-DcsVirtualDisk -VirtualDisk "Virtual disk 2").Size
The cmdlet Set-DcsVirtualDiskSize is invoked to change the size of "Virtual disk 1". For the parameter Size, the cmdlet Get-DcsVirtualDisk is invoked to get the size of "Virtual disk 2" and use that size for the new size of "Virtual disk 1".
VirtualDiskGroupId | : | |
FirstHostId | : | 8BD7BD0F-F5F9-40DB-B8B0-6ABB74D43F81 |
SecondHostId | : | |
BackupHostId | : | |
StorageProfileId | : | 100469DF-0BE1-40DA-874E-9F1DA5A259E3 |
Alias | : | Virtual disk 1 |
Description | : | |
Size | : | 50.00 GiB |
Type | : | NonMirrored |
DiskStatus | : | Online |
InquiryData | : | DataCore Virtual Disk DCS |
ScsiDeviceId | : | {96, 3, 13, 144...} |
ScsiDeviceIdString | : | 60030D90348A5307ABA92C415396D28A |
RemovableMedia | : | False |
WriteThrough | : | False |
Offline | : | False |
Disabled | : | False |
DiskLayout | : | DataCore.Executive.PhysicalDiskLayout |
PersistentReserveEnabled | : | True |
RecoveryPriority | : | Regular |
IsServed | : | False |
Sequencenumber | : | 37440 |
Id | : | c1391785925d46a3b6e1fc606244ab39 |
Caption | : | Virtual disk 1 |
ExtendedCaption | : | Virtual disk 1 from Group FTL |
$size = (Get-DcsVirtualDisk -VirtualDisk "Virtual disk ").Size $size = $size + "10GiB" Set-DcsVirtualDiskSize -VirtualDisk "Virtual disk 1" -Size $size
The cmdlet Get-DcsVirtualDisk is invoked to get the current size of "Virtual disk 1" and the size is assigned to the variable $size. The variable $size is increased by adding "10GiB" to the current size and the new size is stored in the variable $size. The cmdlet Set-DcsVirtualDiskSize is invoked to change the size of "Virtual disk 1" to the new size stored in the variable $size.
VirtualDiskGroupId | : | |
FirstHostId | : | 8BD7BD0F-F5F9-40DB-B8B0-6ABB74D43F81 |
SecondHostId | : | |
BackupHostId | : | |
StorageProfileId | : | 100469DF-0BE1-40DA-874E-9F1DA5A259E3 |
Alias | : | Virtual disk 1 |
Description | : | |
Size | : | 60.00 GiB |
Type | : | NonMirrored |
DiskStatus | : | Online |
InquiryData | : | DataCore Virtual Disk DCS |
ScsiDeviceId | : | {96, 3, 13, 144...} |
ScsiDeviceIdString | : | 60030D90348A5307ABA92C415396D28A |
RemovableMedia | : | False |
WriteThrough | : | False |
Offline | : | False |
Disabled | : | False |
DiskLayout | : | DataCore.Executive.PhysicalDiskLayout |
PersistentReserveEnabled | : | True |
RecoveryPriority | : | Regular |
IsServed | : | False |
Sequencenumber | : | 37826 |
Id | : | c1391785925d46a3b6e1fc606244ab39 |
Caption | : | Virtual disk 1 |
ExtendedCaption | : | Virtual disk 1 from Group FTL |
Internal | : | False |