删除 Azure Stack HCI 和 Windows Server 群集上的卷Delete volumes on Azure Stack HCI and Windows Server clusters

适用于:Azure Stack HCI 版本 20H2;Windows Server 2019Applies to: Azure Stack HCI, version 20H2; Windows Server 2019

本文介绍如何使用 Windows 管理中心或 PowerShell 删除卷。This article explains how to delete volumes by using either Windows Admin Center or PowerShell.

删除包含 Windows 管理中心的卷Delete volumes with Windows Admin Center

  1. 在 Windows 管理中心,连接到群集,然后从左侧的 "工具" 窗格中选择 ""。In Windows Admin Center, connect to a cluster, and then select Volumes from the Tools pane on the left.

  2. 在“卷”页上选择“清单”选项卡,然后选择要删除的卷。On the Volumes page, select the Inventory tab, and then select the volume that you want to delete.

  3. 在卷详细信息页的顶部,选择“删除”。At the top of the volumes detail page, select Delete.

  4. 在“确认”对话框中,选中复选框以确认要删除该卷,然后选择“删除”。In the confirmations dialog, select the check box to confirm that you want to delete the volume, and select Delete.

    选择要删除的卷,选择 "删除",然后确认是否要清除该卷上的所有数据。

通过 PowerShell 删除卷Delete volumes with PowerShell

使用 VirtualDisk Cmdlet 删除 VirtualDisk 对象,并将其所使用的空间返回给公开 VirtualDisk 对象的存储池。Use the Remove-VirtualDisk cmdlet to delete the VirtualDisk object and return the space it used to the storage pool that exposes the VirtualDisk object.

首先,在管理 PC 上启动 PowerShell,并使用 CimSession 参数运行 VirtualDisk cmdlet,它是群集或服务器节点的名称,例如 clustername.contoso.comFirst, launch PowerShell on your management PC and run the Get-VirtualDisk cmdlet with the CimSession parameter, which is the name of a cluster or server node, for example clustername.contoso.com:

Get-VirtualDisk -CimSession clustername.contoso.com

这将返回 -FriendlyName 参数的可能值列表,这些值对应于群集上的卷名。This will return a list of possible values for the -FriendlyName parameter, which correspond to volume names on your cluster.

示例Example

若要删除名为“Volume1”的镜像卷,请在 PowerShell 中运行以下命令:To delete a mirrored volume called Volume1, run the following command in PowerShell:

Remove-VirtualDisk -FriendlyName "Volume1"

系统会要求你确认是否要执行该操作并清除该卷包含的所有数据。You will be asked to confirm that you want to perform the action and erase all the data that the volume contains. 选择“Y”或“N”。Choose Y or N.

警告

此操作不可恢复。This is not a recoverable action. 此示例会永久删除 VirtualDisk 卷对象。This example permanently deletes a VirtualDisk Volume object.

后续步骤Next steps

如需其他重要的存储管理任务的分步说明,另请参阅:For step-by-step instructions on other essential storage management tasks, see also: