Application Integration
1753288 Members
5277 Online
108792 Solutions
New Discussion юеВ

Powershell - New-NSVolume does not work

 
SOLVED
Go to solution
krisz2171
New Member

Powershell - New-NSVolume does not work

Hi All,

We have recently purchased Nimble and so far we are very happy with it. I was very happy when saw that there is a Powershell Module available so thank you for the great job to the community! I thought I am using powershell for setup the volumes but does not matter how and what I do the New-NSVolume always drops an error. Does not matter I just run the New-NSVolume cmdlet and add the attrbutes manually or just copy and paste the example command as is (New-NSVolume -Name testvol -Size 1tb -Description "powershell test" -PerformancePolicy default) I always get this error

> New-NSVolume -Name testvol -Size 10gb -Description "powershell test" -PerformancePolicy default

New-NSVolume : Error Creating volume testvol! code: SMeinval

At line:1 char:1

+ New-NSVolume -Name testvol -Size 10gb -Description "powershell test" -Performanc ...

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException

    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,New-NSVolume

and Nimble syslog drops this:

ErrorDR2-ARRAY01-A NMBL: Failed to create volume . Invalid argument

but does not tell unfortunately which argument is invalid.

My nimble is running on 2.2.5.0-197583-opt software and I have tried this on win8.1 powershell 3.0 as well as on a Win 2012 R2 server as well with the Nimble Powershell module version 1.1.20140407.1024.

Do I something wrong or could be a change in the Nimble software? I hope you can help me.

Many thanks

Krisz

29 REPLIES 29
aquaman27
New Member

Re: Powershell - New-NSVolume does not work

Krisz,

I just forwarded your issue to Justin who has written the PowerShell module.  Stay tuned for some help.

Ryan

jrich52352
Trusted Contributor

Re: Powershell - New-NSVolume does not work

I'm guessing you are on the newer firmware. If you take a look at the github repo there is a v2 branch. Download and try that.

It's still a work in progress but it should fix the new volume issue

brichardson15
Occasional Advisor

Re: Powershell - New-NSVolume does not work

I'm unable to download V2 when running this command...

iex (new-object System.Net.WebClient).DownloadString('https://github.com/jrich523/NimblePowerShell/tree/v2/Install.ps1')

I receive this error...

Exception calling "DownloadString" with "1" argument(s): "The request was aborted: The connection was closed unexpectedly."

At line:1 char:1

+ iex (new-object System.Net.WebClient).DownloadString('https://github.com/jrich52 ...

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException

    + FullyQualifiedErrorId : WebException

Am I attempting to download incorrectly?

jrich52352
Trusted Contributor

Re: Powershell - New-NSVolume does not work

I havent modified the installer to allow for options. right now it will only install the V1 version, you'll need to manually download the V2 branch and put it in your module folder.

Since I use that installer for a few things, I should probably make a more flexible version of it, but, i've got a long list of things to complete

brichardson15
Occasional Advisor

Re: Powershell - New-NSVolume does not work

Thanks for the reply...When I download version 2 and add it to my module directory I get this error when I try to run import-module Nimble

Import-Module : Could not load file or assembly 'file:///C:\Users\XXX\Documents\WindowsPowerShell\Modules\Nimble\NimbleGM.dll' or one of its dependencies. Operation is not supported.

(Exception from HRESULT: 0x80131515)

At line:3 char:5

+     Import-Module Nimble

+     ~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : InvalidOperation: (:) [Import-Module], FileLoadException

    + FullyQualifiedErrorId : FormatXmlUpdateException,Microsoft.PowerShell.Commands.ImportModuleCommand

jrich52352
Trusted Contributor
Solution

Re: Powershell - New-NSVolume does not work

Chances are its because the file is blocked, you typically want to unblock the zip, but you can unblock in PS

Join-Path (split-path $profile) \modules\Nimble | gci | Unblock-File

something like that should work

brichardson15
Occasional Advisor

Re: Powershell - New-NSVolume does not work

I answer the pop up to unblock the file and allow it to run when I run the Install.ps1 file.  But I receive a 404 error within PowerShell when it tries to run...

Exception calling "DownloadFile" with "2" argument(s): "The remote server returned an error: (404) Not Found."

At C:\Users\eng_bxr\Documents\WindowsPowerShell\Modules\Nimblev2\Install.ps1:27 char:59

+ (Import-LocalizedData -FileName Nimble.psd1).filelist | %{$wc.DownloadFile("http ...

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException

    + FullyQualifiedErrorId : WebException

jrich52352
Trusted Contributor

Re: Powershell - New-NSVolume does not work

no need to run the install, its just there because of the specialized install via the cmdline... you just need to import the module and connect

ipmo Nimble

connect-nsarray -system 1.2.3.4 -username admin -password whatever

brichardson15
Occasional Advisor

Re: Powershell - New-NSVolume does not work

Ok, then this just flat out doesn't work for me....I've run this unblock you recommended.

Join-Path (split-path $profile) \modules\Nimble | gci | Unblock-File


And copied the V2 module files from the Zip I downloaded into my profile module directory.  And after the import of the module I get the error I poster earlier.


Import-Module : Could not load file or assembly 'file:///C:\Users\XXX\Documents\WindowsPowerShell\Modules\Nimble\NimbleGM.dll' or one of its dependencies. Operation is not supported.

(Exception from HRESULT: 0x80131515)

At line:3 char:5

+     Import-Module Nimble

+     ~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : InvalidOperation: (:) [Import-Module], FileLoadException

    + FullyQualifiedErrorId : FormatXmlUpdateException,Microsoft.PowerShell.Commands.ImportModuleCommand