- Community Home
- >
- Storage
- >
- HPE Nimble Storage
- >
- Application Integration
- >
- Re: Powershell - New-NSVolume does not work
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-01-2015 11:37 AM
тАО04-01-2015 11:37 AM
Re: Powershell - New-NSVolume does not work
What version of powershell are you using? and is it 32 or 64 bit?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-01-2015 11:55 AM
тАО04-01-2015 11:55 AM
Re: Powershell - New-NSVolume does not work
64bit 4.0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-01-2015 01:00 PM
тАО04-01-2015 01:00 PM
Re: Powershell - New-NSVolume does not work
hmm make sure the DLL is unblocked, nothing else comes to mind. if it was an older version of PS (1 or 2) or 32bit i could see it being a problem, but you should be good..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-01-2015 02:43 PM
тАО04-01-2015 02:43 PM
Re: Powershell - New-NSVolume does not work
And....it started working.
Thanks for humoring me...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-25-2015 04:22 PM
тАО05-25-2015 04:22 PM
Re: Powershell - New-NSVolume does not work
I'm using Powershell 4.0, Nimble Module v2, Nimble Version 2.2.5.0-197583-opt and am trying to clone a snapshot from a replica volume.
I upgraded to v2 per above, but I'm getting Error Creating Volume NIMBLE-SERVER-D-NAME! code: SMeinval.
After going through variations of inputs on New-NSClone, changing the length of the names, using different names, etc. I cannot get this to work unless I use the same name for the Snapshot and Clone volume.
New-NSClone -Name test -Volume NIMBLE-SERVER-D-NAME -Snap test
New-NSClone -Name BilboBaggins -Volume NIMBLE-SERVER-D-NAME -Snap BilboBaggins
New-NSClone -Name Bilbo-Baggins -Volume NIMBLE-SERVER-D-NAME -Snap Bilbo-Baggins
What doesn't work is any variation using the actual clone name I want and any of the snapshots created by the Nimble.
New-NSClone -Name NIMBLE-SERVER-D-NAME-RECENTMONTHLY -Volume NIMBLE-SERVER-D-NAME - Snap FileServerVCenter-DAILY-2015-04-30::01:00:00.000
New-NSClone -Name BilboBaggins2 -Volume NIMBLE-SERVER-D-NAME -Snap Bilbo-Baggins
To me it seems as though the clone name must match the snapshot name, otherwise you get SMeinval. I've also noticed you can't use a colon in the volume name. So, if you use a time stamp in your snapshot using the Nimble naming convention, you can't create a volume with the same name as the snapshot.
This isn't ideal for my scenario, since there is no relation between the time stamped snapshot name and the scheme I want to use of VOLUMENAME-RECENTMONTHLY for the clone name.
Thanks in advance, Terry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-25-2015 08:33 PM
тАО05-25-2015 08:33 PM
Re: Powershell - New-NSVolume does not work
yeah so try doing Get-NSSnapshot, see how it returns the names, also you might want to quote it because : is in many cases special.
also, you can pipe the snapshot to the new-nsclone (i think, if i recall right)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-26-2015 08:43 AM
тАО05-26-2015 08:43 AM
Re: Powershell - New-NSVolume does not work
Let me clarify, I do not want my volume to have the same name as the snapshot. I was just listing this as an example.
No matter what I do, unless the snapshot has the same name as the clone I am creating, this doesn't work.
This example works:
New-NSClone -Name test -Volume NIMBLEVOL -Snap test
This example does not work:
New-NSClone -Name test2 -Volume NIMBLEVOL -Snap test
Whether it's a volume or a volume replica, this only works when I use the same name for the clone as I do the snapshot.
Also, you can't create a volume with a : via the GUI, must be an illegal character.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-26-2015 09:22 AM
тАО05-26-2015 09:22 AM
Re: Powershell - New-NSVolume does not work
OK, to fix this I had to completely blow away all of the Nimble powershell files, copy them again, then run install.ps1.
I guess it was holding onto some old dlls or something.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-26-2015 11:14 AM
тАО05-26-2015 11:14 AM
Re: Powershell - New-NSVolume does not work
Nope, it's not fixed. Here is my actual code:
PS C:\Users\terry> $vol = "terrytest"
PS C:\Users\terry> $cloneVol = Get-NSVolume -Name $vol
PS C:\Users\terry> $strClonevol = $vol + "-RECENTMONTHLY"
PS C:\Users\terry> $snap = Get-NSSnapShot | where {($_.name -match "test")}
PS C:\Users\terry> New-NSClone -Name $strClonevol -Volume $cloneVol -Snap $snap
New-NSClone : Error Creating volume terrytest-RECENTMONTHLY! code: SMeinval
At line:1 char:1
+ New-NSClone -Name $strClonevol -Volume $cloneVol -Snap $snap
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,New-NSClone
So now I try just putting a string for the name of the volume:
PS C:\Users\terry> New-NSClone -Name test2 -Volume $cloneVol -Snap $snap
New-NSClone : Error Creating volume test2! code: SMeinval
At line:1 char:1
+ New-NSClone -Name test2 -Volume $cloneVol -Snap $snap
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,New-NSClone
Now I change the snap to use a string:
PS C:\Users\terry> New-NSClone -Name test2 -Volume $cloneVol -Snap test
New-NSClone : Error Creating volume test2! code: SMeinval
At line:1 char:1
+ New-NSClone -Name test2 -Volume $cloneVol -Snap test
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,New-NSClone
Now I am using strings to identify everything:
PS C:\Users\terry> New-NSClone -Name test2 -Volume terrytest -Snap test
New-NSClone : Error Creating volume test2! code: SMeinval
At line:1 char:1
+ New-NSClone -Name test2 -Volume terrytest -Snap test
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,New-NSClone
Quoted:
PS C:\Users\terry> New-NSClone -Name "test2" -Volume "terrytest" -Snap "test"
New-NSClone : Error Creating volume test2! code: SMeinval
At line:1 char:1
+ New-NSClone -Name "test2" -Volume "terrytest" -Snap "test"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,New-NSClone
Using the same name for the new clone as the snapshot:
PS C:\Users\terry> New-NSClone -Name "test" -Volume "terrytest" -Snap "test"
Name Online ReadOnly MultiInit Clone PerfPolicy Size(GB) Compressed(GB) Uncompressed(GB) Ratio Connections
---- ------ -------- --------- ----- ---------- -------- -------------- ---------------- ----- -----------
test True False False True default 1 0 0 0
I am connected to a different array when I ran the above. It's at version 2.1.7.0-151109-opt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-26-2015 11:44 AM
тАО05-26-2015 11:44 AM
Re: Powershell - New-NSVolume does not work
Further to my previous, initially this is the code I tried to get working, which also failed.
$vol = terrytest
$cloneVol = Get-NSVolume -Name $vol
$strClonevol = $vol + "-RECENTMONTHLY"
$snap = Get-NSSnapShot | where {($_.Volume -eq $vol) -and ($_.LocalCreationTime.Day -eq "1") -and ($_.localCreationTime.Month -like $today.Month) -and ($_.localCreationTime.Year -like $today.year)} | select -first 1
New-NSClone -Name $strClonevol -Volume $cloneVol -Snap $snap
Thanks