Data Backup and Recovery

new-sdlun

david_taylor
10,853 Views

I am trying to script the end to end process of a new server build, setting up snap center, creating and connecting the default luns in windows.

 

Looking through the snap centre 2.0 cmdlet reference guide i have found all the commands I need and tested them separately however to create the lun it says to use new-sdlun

 

This doesn't appear to be part of the module that installs or any other netapp one I can find and i cannot find any more information on it, has any got any experience with this command?

 

New-sdvolume is there but no lun

 

any help appreciated 

 

1 ACCEPTED SOLUTION

matte
10,803 Views

Also, forgot to mention, you can use the new-sdstorage to provide LUN insted using the new-sdlun. this just to avoid all the previous mentioned steps and keep your script more tidy

 

regards

View solution in original post

12 REPLIES 12

matte
10,760 Views

HI

 

i guess you also imported the Snapdrive module, correct?

 

i'm asking to dobule check because some PS commands are not integrated with SnapCenter itself, and the new-sdlun is one of them.

This is a command that belong to Snapdrive

With the latest release, SDW can be installed as integrated mode or standalone mode. in integration mode only the intergrated commands are allowed to be executed and other commands will show a an error "This command is not supported in Snap Center plugin mode".

You can enable these commands to be working by enabling then using commandlet

 

Set-StandaloneCommand.

 

Following are the example of enabling and disabling the commands not integrated with Snap center. 

 

Disable Command
Set-StandaloneCommand

Enable Command
Set-StandaloneCommand -Enable

 

david_taylor
10,755 Views

Hello,

 

Sorry, I did leave out that important detail that i am getting the message on the snap center server itself 

 

New-SdLun : This command is not supported in SnapCenter Plug-in mode

 

Thanks for the info relating to this, I am not able to enable the command on the snap center server

 

PS C:\Windows\system32> Set-StandaloneCommand
Set-StandaloneCommand : The term 'Set-StandaloneCommand' is not recognized as the name of a cmdlet, function, script
file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is
correct and try again.
At line:1 char:1
+ Set-StandaloneCommand
+ ~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Set-StandaloneCommand:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

matte
10,759 Views

Hi David

 

 

are you trying to do that on the plugin host or on the Snapcenter host?

 

anyway try to do in this way

 

import both modules, snapcenter and snapdrive

 

then open the connection with the command 

 

open-smconnection ..

 

instead the Set-StandaloneCommand use the following

 

set-sdsettings $true

 

and then

 

new-sdlun

 

 

let me know

 

matte
10,804 Views

Also, forgot to mention, you can use the new-sdstorage to provide LUN insted using the new-sdlun. this just to avoid all the previous mentioned steps and keep your script more tidy

 

regards

david_taylor
10,743 Views

new sd-storage is exactly what I needed - thank you!

 

 

RayHoltz
9,211 Views

Matte, why is there not a document that tells us all this.   The powershell support for Snapcenter is lacking not to mention the documentation.  Its fine to have a list of all the commands,  and the bare minimum of connection info, but I'm trying to cobble together provisioning a Lun, mounting it, etc but there is not how to for it.

 

The snapcenter powershell modules seem just like rebranded SnapManager & Snapdrive cmdlets that have to be run on a host instead of loading the module on mylaptop to command many systems from one..  Now in v4.1 of Snapcenter, I'd think powershell would have been more refined.

 

Is there any work being done to clean this up and make it easier and better documented?

Thanks,

Ray

MarcoF
8,971 Views

Hello  RayHoltz,

we are not able to get new-sdstorage command.

Have you found a guide to use those cmdlet?
After running Open-smconnection and Import-Module SnapCenter, the Get-Command -Module SnapCenter not include the new-sdstorage or Set-SdSettings.

Any help is very appriciated.

Best regards

 

 

matte
8,956 Views

Marco

 

To use all the Sd* cmdlets you need to import the snapdrive module

ipmo snapdrive shoudl be enough is you have the windows plugin installed.. 

MarcoF
8,948 Views

Hi Matte,

thanks for your suggestion.

If I understand corretcly we need to keep snapdrive installed on our system, correct?
Nowhere I have found that snapdrive is a requirement to use some function of snapcenter.

I have read that snapdrive is going to end of life and not needed anymore. I'm missing something?

I have tryed on another system where snapdrive still be present. Using the following commands

Open-smconnection -SMSbaseurl https://....  -Credential $cred -RoleName "SnapCenterAdmin"

Import-Module SnapCenter
Import-Module snapdrive

I can use the Get-SdStorage but using new-sdstorage I get "The term 'new-sdstorage' is not recognized as the name of a cmdlet".

Thanks a lot for your help.

Best regards

 

 

matte
8,484 Views

Marco

you should remove snapdrive, you’re right! The snapdrive PS module is part of the snapcenter windows plugin (They have the same name unfortunately) and you can find it in the plugin installation directory. 

Usually you just need to open powershell where the windows plugin is installed and run

>ipmo snapdrive 

 

MarcoF
8,462 Views

Matte you saved me.

Thank you for your help.

For anyone else with the same problem:

If you have previously installed Snapdrive on your system, you have to uninstall it and remove Snapdrive folder from C:\Windows\System32\WindowsPowerShell\v1.0\Modules.

One rebooted the system, you can point the following folder "C:\Program Files\NetApp\SnapCenter\SnapCenter Plug-in for Microsoft Windows" and executethe import-module snapdrive.

 

matte
8,445 Views

Ottimo 🙂

 

another think you should pay attention to is that if you already have installed the windows plugin along with the exchange one,  the best option would be to remove uninstall snapdrive and the windows plugin and then install SCW again.

This becase if you remove snapdrive it will also remove the data ontap VSS HW provider and this can create trouble if you have to use VSS for backup.

 

 

 

Public