Set-EmcVolumeMountPoint

Sets the drive letter or mount path for the volume.

 

Syntax

 

Parameters

-HostSystem <IHostSystem>

Attributes: Required, Position: named

Specifies the ESI host system object. You can add a host system object to ESI by using the Get-EmcHostSystemCredential and Connect-EmcSystem cmdlets. You can get a host system object by using the Get-EmcHostSystem cmdlet. The object can be a stand-alone host system, a virtual machine, or a hypervisor.

 

-DriveLetter <String>

Attributes: Required, Position: named

Specifies the drive letter.

 

-Volume <Volume>

Attributes: Required, Position: named

Specifies the ESI volume object, which you can get from the ESI host system object or by using the Get-EmcHostVolume cmdlet.

 

-Silent <SwitchParameter>

Attributes: Optional, Position: named

Turns off all the informational and verbose messages. However, it still displays errors.

 

-MountPath <String>

Attributes: Required, Position: named

Specifies the mount path.

 

-ClusterSystem <IClusterSystem>

Attributes: Required, Position: named

Specifies the ESI cluster system object. You can add a cluster system object to ESI by using the Get-EmcClusterSystemCredential and Connect-EmcSystem cmdlets. You can get a cluster system object by using the Get-EmcClusterSystem cmdlet.

 

<CommonParameters>

This cmdlet supports these common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, and OutVariable. Type get-help about_commonparameters for more details.

 

Examples

-------------- Example 1 --------------

C:\PS>$l = New-EmcLun -Pool $p -Name mylun_test_1 -CapacityInMB 1024 -Silent

C:\PS>$h = Get-EmcHostSystem *.148

C:\PS>Set-EmcLunAccess -Lun $l -HostSystem $h -Available

TaskStatus: Started

C:\PS>$hd = Find-EmcHostDisk -HostSystem $h -Lun $l -Silent

C:\PS>Initialize-EmcHostDisk -HostDisk $hd -HostSystem $h

C:\PS>$v = New-EmcVolume -HostSystem $h -HostDisk $hd -Label volume_1 -silent

C:\PS>$drives = Get-EmcAvailableDriveLetter -HostSystem $h

C:\PS>$drives[0]

G

C:\PS>Set-EmcVolumeMountPoint -HostSystem $h -Volume $v -DriveLetter $drives[0] -Silent

C:\PS>Set-EmcVolumeMountPoint -HostSystem $h -Volume $v -MountPath "c:\foo" -silent

This example creates a LUN, unmasks onto a host system, finds the corresponding disk, initializes it, creates a volume, and sets a mount point to a drive letter or mount path.

 

-------------- Example 2 --------------

C:\PS>$l = New-EmcLun -Pool $p -Name mylun_test_1 -Capacity 2GB -Silent

C:\PS>$h = Get-EmcClusterSystem myclus*

C:\PS>Set-EmcLunAccess -Lun $l -ClusterSystem $h -Available -silent

 

C:\PS>$hd = Find-EmcHostDisk -ClusterSystem $h -Lun $l -Silent

C:\PS>$hd.HostDiskIdentifier

\\?\PhysicalDrive5

C:\PS>Initialize-EmcHostDisk -HostDisk $hd -ClusterSystem $h -PartitionStyle gpt

C:\PS>$v = New-EmcVolume -ClusterSystem $h -HostDisk $hd -Label volume_1 -Silent

C:\PS>$drives = $h | Get-EmcAvailableDriveLetter

C:\PS>Set-EmcVolumeMountPoint -ClusterSystem $h -Volume $v -DriveLetter $drives[0] -Silent

 

C:\PS>Set-EmcVolumeMountPoint -ClusterSystem $h -Volume $v

 -MountPath "c:\foo" -silent

This example creates a LUN, unmasks onto a cluster system, finds the corresponding disk, initializes it, creates a volume, and sets a mount point to a drive letter or mount path.