Mount-SCStorageDisk
装载存储磁盘。
语法
Mount-SCStorageDisk
-StorageDisk <StorageDisk>
[-StorageLogicalUnit <StorageLogicalUnit>]
[-MountPoint <String>]
[-CreateClusterSharedVolume]
[-DeleteClusterSharedVolume]
[-JobGroup <Guid>]
[-StorageClassification <StorageClassification>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
Mount-SCStorageDisk
-StorageDisk <StorageDisk>
-DiskId <Guid>
[-MountPoint <String>]
[-CreateClusterSharedVolume]
[-DeleteClusterSharedVolume]
[-JobGroup <Guid>]
[-StorageClassification <StorageClassification>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
Mount-SCStorageDisk
-StorageDisk <StorageDisk>
[-MountPoint <String>]
[-CreateClusterSharedVolume]
[-DeleteClusterSharedVolume]
-DiskSignature <String>
[-JobGroup <Guid>]
[-StorageClassification <StorageClassification>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
Mount-SCStorageDisk
-StorageDisk <StorageDisk>
[-FullFormat]
[-ForceFormat]
[-MasterBootRecord]
[-DesiredUnitAllocationSizeBytes <UInt32>]
[-MountPoint <String>]
[-CreateClusterSharedVolume]
[-DeleteClusterSharedVolume]
[-VolumeLabel <String>]
[-JobGroup <Guid>]
[-StorageClassification <StorageClassification>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
Mount-SCStorageDisk
-StorageDisk <StorageDisk>
[-FullFormat]
[-ForceFormat]
[-GuidPartitionTable]
[-DesiredUnitAllocationSizeBytes <UInt32>]
[-MountPoint <String>]
[-CreateClusterSharedVolume]
[-DeleteClusterSharedVolume]
[-VolumeLabel <String>]
[-JobGroup <Guid>]
[-StorageClassification <StorageClassification>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
Mount-SCStorageDisk
-StorageDisk <StorageDisk>
[-QuickFormat]
[-ForceFormat]
[-MasterBootRecord]
[-DesiredUnitAllocationSizeBytes <UInt32>]
[-MountPoint <String>]
[-CreateClusterSharedVolume]
[-DeleteClusterSharedVolume]
[-VolumeLabel <String>]
[-JobGroup <Guid>]
[-StorageClassification <StorageClassification>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
Mount-SCStorageDisk
-StorageDisk <StorageDisk>
[-QuickFormat]
[-ForceFormat]
[-GuidPartitionTable]
[-DesiredUnitAllocationSizeBytes <UInt32>]
[-MountPoint <String>]
[-CreateClusterSharedVolume]
[-DeleteClusterSharedVolume]
[-VolumeLabel <String>]
[-JobGroup <Guid>]
[-StorageClassification <StorageClassification>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
Mount-SCStorageDisk
-StorageLogicalUnit <StorageLogicalUnit>
[-FullFormat]
[-QuickFormat]
[-ForceFormat]
[-MasterBootRecord]
[-DesiredUnitAllocationSizeBytes <UInt32>]
[-MountPoint <String>]
[-CreateClusterSharedVolume]
[-DeleteClusterSharedVolume]
[-VolumeLabel <String>]
-JobGroup <Guid>
[-StorageClassification <StorageClassification>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
Mount-SCStorageDisk
-StorageLogicalUnit <StorageLogicalUnit>
[-FullFormat]
[-QuickFormat]
[-ForceFormat]
[-GuidPartitionTable]
[-DesiredUnitAllocationSizeBytes <UInt32>]
[-MountPoint <String>]
[-CreateClusterSharedVolume]
[-DeleteClusterSharedVolume]
[-VolumeLabel <String>]
-JobGroup <Guid>
[-StorageClassification <StorageClassification>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
说明
Mount-SCStorageDisk cmdlet 装载存储磁盘。
示例
示例 1:设置新磁盘的格式
PS C:\> $JobGroup = [Guid]::NewGuid().ToString()
PS C:\> $VMHost = Get-SCVMHost -ComputerName "VMHost01"
PS C:\> $LU = Get-SCStorageLogicalUnit -Name "LUN01"
PS C:\> Register-SCStorageLogicalUnit -StorageLogicalUnit $LU -VMHost $VMHost -JobGroup $JobGroup
PS C:\> Mount-SCStorageDisk -QuickFormat -MasterBootRecord -VolumeLabel "New Volume" -StorageLogicalUnit $LU -MountPoint "S:\" -JobGroup $JobGroup
PS C:\> Set-SCVMHost -VMHost $VMHost -JobGroup $JobGroup
第一个命令生成 GUID,然后将 GUID 存储为$JobGroup变量中的字符串。 将包含此 GUID 的后续命令收集到单个作业组中。
第二个命令使用 Get-SCVMHost cmdlet 获取名为 VMHost01 的主机对象。 该命令将该对象存储在$VMHost变量中。
第三个命令使用 Get-SCStorageLogicalUnit cmdlet 获取名为 LUN01 的存储逻辑单元对象。 该命令将该对象存储在$LU变量中。
第四个命令使用 Register-SCStorageLogicalUnit cmdlet 向 VMHost01 注册 LUN01。 此命令指定 JobGroup 参数。 因此,只有在包含具有相同 GUID 的作业组的最终命令之前,此命令才会运行。
第五个命令在 VMHost01 上的 $LU中装载存储逻辑单元。 该命令对卷执行快速格式,对卷“新建卷”进行标签,并将装入点设置为 S:。 此命令指定 JobGroup。
最后一个命令使用装载的存储磁盘更新 VMHost01。 此命令指定在运行 Set-SCVMHost cmdlet 之前注册并装载 LUN01 的 JobGroup 参数。
参数
-CreateClusterSharedVolume
指示 cmdlet 创建群集共享卷。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DeleteClusterSharedVolume
指示 cmdlet 删除群集共享卷。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DesiredUnitAllocationSizeBytes
指定卷的默认分配的大小(以字节为单位)。
Type: | UInt32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DiskId
指定磁盘对象的 ID。
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DiskSignature
指定磁盘对象的签名。
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ForceFormat
强制设置存储磁盘的格式,即使卷已存在。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-FullFormat
指示执行分区的完整格式。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-GuidPartitionTable
指示存储磁盘是 GUID 分区表磁盘。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-JobGroup
指定在包含相同作业组标识符的最终命令之前作为集运行的一系列命令的标识符。
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-JobVariable
指定跟踪和存储作业进度的变量。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MasterBootRecord
指示存储磁盘是主启动记录磁盘。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MountPoint
指定装入点位置。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PROTipID
指定触发此操作 (PRO 提示) 的性能和资源优化提示的 ID。 此参数允许审核 PRO 提示。
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-QuickFormat
指示执行分区的快速格式。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RunAsynchronously
指示作业以异步方式运行,以便控件立即返回到命令 shell。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-StorageClassification
指定存储分类对象。
Type: | StorageClassification |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-StorageDisk
指定 Hyper-V 或 VMware ESX 主机上的磁盘(该主机上的虚拟机可使用该磁盘,而不使用虚拟硬盘)。 此磁盘称为直通磁盘。 相应的 VMware 术语是原始设备映射 (RDM) 。 主机磁盘可以是本地硬盘或存储区域网络 (SAN) 上的逻辑单元。 VMM 允许虚拟机绕过主机的文件系统,直接访问传递磁盘。 Hyper-V 主机支持直通磁盘,以及将直通磁盘转换为 VHD。 VMware ESX 主机支持直通磁盘,但不支持磁盘转换。 Citrix XenServer 主机不支持直通磁盘。
Type: | StorageDisk |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-StorageLogicalUnit
指定存储逻辑单元对象。
Type: | StorageLogicalUnit |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VolumeLabel
指定磁盘卷的标签。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
备注
- 此 cmdlet 需要 VMM 存储磁盘对象,可以使用 Get-SCStorageDisk cmdlet 进行检索。