-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated steps on removing volumes from vSphere
Providing updated steps on how to remove a volume. This now includes unmount and detach steps.
- Loading branch information
1 parent
6922188
commit 650f176
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Load Datastore Functions | ||
. "C:\Users\jatwell\Google Drive\Scripts\DatastoreFunctions.ps1" | ||
|
||
# Load SPBM Module since we'll use the Get-SVolumeFromDatastore function. | ||
Import-Module "C:\Users\jatwell\Documents\GitHub\PowerShell\SPBM\SolidFire-SPBM.psm1" | ||
|
||
|
||
# Collect datastore object that you wish to remove | ||
$datastore = Get-Datastore Engineering-02 | ||
|
||
# Collect volume object for the selected datastore | ||
$volume = $datastore | Get-SFVolumeFromDatastore | ||
|
||
|
||
$datastore | Get-DatastoreMountInfo | ||
|
||
# Unmount the datastore | ||
$datastore | Unmount-Datastore | ||
|
||
# Check mount info for the datastore (optional) | ||
$datastore | Get-DatastoreMountInfo | ||
|
||
|
||
# Detach the datastore from ESXi host | ||
$datastore | Detach-Datastore | ||
|
||
# Remove the volume from the SolidFire System | ||
# This places the volume in the DeletedVolumes space | ||
$volume | Remove-SFVolume -Confirm:$false | ||
|
||
# Optional | Permanently remove volume from SolidFire system | ||
# This is a PERMANENT OPERATION! | ||
#Get-SFDeletedVolume | Remove-SFDeletedVolume -Confirm:$false |