Mount-SCStorageDisk

Mounts a storage disk.

Syntax

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>]

Description

The Mount-SCStorageDisk cmdlet mounts a storage disk.

Examples

Example 1: Format a new disk

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

The first command generates a GUID, and then stores the GUID as a string in the $JobGroup variable. Subsequent commands that include this GUID are collected into a single job group.

The second command gets the host object named VMHost01 by using the Get-SCVMHost cmdlet. The command stores that object in the $VMHost variable.

The third command gets the storage logical unit object named LUN01 by using the Get-SCStorageLogicalUnit cmdlet. The command stores that object in the $LU variable.

The fourth command registers LUN01 with VMHost01 by using the Register-SCStorageLogicalUnit cmdlet. This command specifies the JobGroup parameter. Therefore, this command does not run until just before the final command that includes the job group that has the same GUID.

The fifth command mounts the storage logical unit in $LU on VMHost01. The command performs a quick format on the volume, labels the volume New Volume, and sets the mount point to S:. This command specifies JobGroup.

The last command updates VMHost01 with the mounted storage disk. This command specifies the JobGroup parameter to register and mount LUN01 prior to running the Set-SCVMHost cmdlet.

Parameters

-CreateClusterSharedVolume

Indicates that the cmdlet creates a Cluster Shared Volume.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DeleteClusterSharedVolume

Indicates that the cmdlet deletes a Cluster Shared Volume.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DesiredUnitAllocationSizeBytes

Specifies the size, in bytes, of the default allocation of a volume.

Type:UInt32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DiskId

Specifies the ID of a disk object.

Type:Guid
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-DiskSignature

Specifies the signature of a disk object.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ForceFormat

Forces the formatting of the storage disk even if volumes are already present.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-FullFormat

Indicates that a full format of the partition is performed.

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-GuidPartitionTable

Indicates that the storage disk is a GUID partition table disk.

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-JobGroup

Specifies an identifier for a series of commands that run as a set just before the final command that includes the same job group identifier runs.

Type:Guid
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-JobVariable

Specifies a variable in which job progress is tracked and stored.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-MasterBootRecord

Indicates that the storage disk is a master boot record disk.

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-MountPoint

Specifies a mount point location.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PROTipID

Specifies the ID of the Performance and Resource Optimization tip (PRO tip) that triggered this action. This parameter lets you audit PRO tips.

Type:Guid
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-QuickFormat

Indicates that a quick format of the partition is performed.

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-StorageClassification

Specifies a storage classification object.

Type:StorageClassification
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-StorageDisk

Specifies a disk on a Hyper-V or VMware ESX host that a virtual machine on that host can use instead of using a virtual hard disk. This disk is referred to as a pass-through disk. The corresponding VMware term is Raw Device Mapping (RDM). The host disk is either a local hard disk or a logical unit on a Storage Area Network (SAN). VMM lets the virtual machine bypass the host's file system and access the pass-through disk directly. Hyper-V hosts support pass-through disks and conversion of a pass-through disk to a VHD. VMware ESX hosts support pass-through disks, but not disk conversion. Citrix XenServer hosts do not support pass-through disks.

Type:StorageDisk
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-StorageLogicalUnit

Specifies a storage logical unit object.

Type:StorageLogicalUnit
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-VolumeLabel

Specifies a label for a disk volume.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Notes

  • This cmdlet requires a VMM storage disk object, which can be retrieved using the Get-SCStorageDisk cmdlet.