HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
Application Integration
Showing results for 
Search instead for 
Did you mean: 

Powershell cmdlets: delete lun

Go to solution
Occasional Visitor

Powershell cmdlets: delete lun

I've trying to delete a lun using powershell module:

PS H:\> Remove-NSVolume -name xxx
The request could not be completed due to a conflict.Volume xxxx is associated with volume collection xxxx.

I tried using set-nsvolume but I can't seem to remove it from the volume collection using powershell so I am free to delete.  How can this be accomplished?

Trusted Contributor

Re: Powershell cmdlets: delete lun

You need to offline and remove the Volume Collection association for the volume before removing the volume. This is possible with Set-NSVolume.

Here's an example: 

Set-NSVolume -name xxx -online:$false -force:$true

Set-NSVolume -name xxx -volcoll_id "" -force:$true

Remove-NSVolume -name xxx