|
|
Data ONTAP® PowerShell Toolkit
|
Cmdlet: Invoke-NcVirtualDiskSpaceReclaim
NAME
Invoke-NaVirtualDiskSpaceReclaim
SYNOPSIS
Reclaim space on a virtual disk residing on a Data ONTAP LUN.
SYNTAX
Invoke-NaVirtualDiskSpaceReclaim [-Name] <String> [-Controller <AbstractCont
roller>] [<CommonParameters>]
DESCRIPTION
Reclaim space on a virtual disk residing on a Data ONTAP LUN.
This cmdlet works by mounting a copy of the virtual disk to the host and fin
ding the free space in the NTFS filesystem. The corresponding blocks in the
original virtual disk are then freed on the Data ONTAP controller.
This cmdlet requires the virtual disk to be experiencing no active I/O. Tak
ing a Hyper-V snapshot of a running virtual machine before invoking this cmd
let allows space to be reclaimed on a running virtual machine. After the cm
dlet has completed, the Hyper-V snapshot can be deleted.
PARAMETERS
-Name <String>
Full path to the virtual disk. This can be a VHD or VHDX file.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Controller <AbstractController>
Controller containing the virtual disk file embodied by a NaController o
r NcController object. This is obtained using Connect-NaController or C
onnect-NcController.
If not provided, the values in the global variables CurrentNaController
and CurrentNcController are considered. If neither contain the virtual
disk file, an attempt is made to establish a connection to the controlle
r containing the file. If no connection can be established, the cmdlet
will fail.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".
INPUTS
OUTPUTS
NOTES
Category: host
-------------- Example 1 --------------
C:\PS>Invoke-NaVirtualDiskSpaceReclaim -Name E:\vm0_disk0.vhd
Reclaim all space from the virtual disk vm0_disk0. The virtual machine usin
g this disk is offline.
-------------- Example 2 --------------
C:\PS>Get-NaHyperV Win2k8R2_VM1 | Checkpoint-VM -SnapshotName reclaim_snapsh
ot
Invoke-NaVirtualDiskSpaceReclaim -Name C:\ClusterStorage\Volume2\VirtualDisk
s\Win2k8R2_VM1.vhdx
Remove-VMSnapshot -Name reclaim_snapshot -VMName Win2K8R2_VM1
Take a snapshot of a running virtual machine, reclaim the free space, then r
emove the snapshot.
RELATED LINKS
| Copyright © 2013 NetApp. All rights reserved. Use is subject to license terms. |
|
Data ONTAP® PowerShell Toolkit
|