Microsoft Virtualization Discussions

What would YOU like to see in the Data ONTAP PowerShell Toolkit?

cknight
38,245 Views

The initial response to the Data ONTAP PowerShell Toolkit has been tremendous, but that doesn't mean we have all the answers!  We've only begun to tap the enormous potential of PowerShell, and the combination of this Toolkit with other 3rd-party modules (HyperV, PowerCLI, etc.) is where things really get interesting.  Here's your opportunity to tell us how you'd like to use the Toolkit and how we can improve it to help you get there.

I'll offer a few things we're already considering:

  • Snapvault
  • Consistency group
  • Snapshot multicreate
  • Reallocate
  • System.DateTime values in addition to Int64 values
  • Find-NaController (discover controllers on the network, including new, unconfigured ones)

Clinton

120 REPLIES 120

friea
14,235 Views

Definitely check out Andy's great blog post highlighting a few wish list items at http://get-powershell.com/2010/06/15/netapp-releases-powershell-toolkit-1-0/.

donaldmann
14,251 Views

I'm not seeing anything for modifying vif/ifconfig information - or collecting anything from there besides the write file option.

I'm extremly happy with this capability and just getting started diving in.

Thanks for the effort!

-d

cknight
14,251 Views

Hi, Donald, thanks for the question.

Ideally, the Toolkit would allow full and complete configuration of the  storage controllers.  The Toolkit doesn't have network configuration cmdlets at present, but those are on the roadmap.  The APIs for doing that are fairly new, and to broaden the support base for Toolkit v1.0 we started with the ones that have been around a bit longer.

Clinton

baxterj
14,251 Views

Clinton,

Thanks to you and the whole team behind this. This is all great stuff!

Your list is definitely a great starting point. I'd especially love

the ability to discover controllers.

I hadn't realized you can't do network configuration. That's

definitely a huge priority. I want to be able to do everything through

PowerShell that you do when running the "setup" process. Are there any

other gaps there?

For the network config, can I get around it by writing a new rc file

and sourcing it, or is there any other workaround?

Jeff Baxter

(sent from mobile, excuse any typos.)

On Jun 17, 2010, at 2:47 PM, "cknight" <xdl-communities@netapp.com

rickymartin
14,251 Views

Couldnt you do filer discovery through standard SNMP calls with powershell ?

cknight
14,251 Views

Possibly, martinj, thanks.  I'll consider that when the time comes.  SNMP will be integral to the implementation in any case.

baxterj
12,529 Views

Hi Clinton -

Once again, great work.

The auto-discovery is actually less important to my customer.

More important is being able to do the entire Filer setup, from "out of the cardboard box" to "ready to deploy". Someone said there isn't the ability to set up vifs or network configuration? That seems like a show-stopper. Are there any workarounds?

Jeff Baxter

cknight
12,529 Views

Hi, Jeff, thanks.  The APIs for getting / setting the persistent network configuration appear to be new in Data ONTAP 7.3.3.  I've only just begun using them, but I consider that a fairly high priority for the Toolkit.  Possible workarounds might include modifying /etc/rc via the Write-NaFile cmdlet or using ssh to get to the ONTAP CLI.

cknight
11,085 Views

Network configuration is now available in Toolkit 1.2.

benjstarratt
14,251 Views

get-sysstat

I know it doesn't really follow the powershell model, but I would love to see a command that replicated the current method of quickly viewing performance activity in a very translatable fashion.

cknight
14,251 Views

OK, Ben, we'll consider that.  In the meantime, the perf cmdlets can provide a wealth of performance info.

thearle
14,251 Views

Would like to have a commandlet that allows me to run a command against the filer, currently i have created something to use the plink tool to do this and i have scripted a number of powershell scripts around it.

Thanks

cknight
13,414 Views

Hello, thearle.  I understand the appeal of a cmdlet the provides access to the controller CLI.  Unfortunately, the needed API isn't officially tested or supported, so I'm afraid we can't include that in the Toolkit.  I expect the need for that will abate as the Data ONTAP APIs, and the PowerShell Toolkit, evolve.  As you say, it's not difficult to roll your own, but please exercise caution with unsupported APIs.

thearle
13,414 Views

Hi Clinton,

I am asking for someone to write something that can run a command against a filer because it is easier for us administrators to use a cmdlet and write scripts around that than to necessarily learn another set of API's.  I did not say i wrote a cmdlet, rather i created something that enabled me to do this.  For me as a storage administrator for NetApp kit i can really see the advantage of a commandlet that can provide the functionalities of RSH or SSH similar to that on Linux and Unix systems.

Thanks

Matthew

cknight
12,503 Views

OK, Matthew, got it.  The system-cli ZAPI isn't supported, but sending commands via SSH is.  SSH support isn't built-in to .NET, but it can be done, so we'll definitely consider such a cmdlet.

benjstarratt
13,425 Views

I'll throw out something that seems ridiculously difficult given mulltiple protocols, many to many relationships, multiple vendors...

Vmware to NetApp volume translation.

$ds=Get-datastore "prodvms"

$nv=convert-datastoretonavol $ds

Or how about:

get-datastore "prodvms" | convert-datastoretonavol | enable-nasis

cknight
13,425 Views

Hi, Ben.  What I think you're asking is how to map a VMware datastore to a Data ONTAP volume, no?  We don't envision creating cmdlets for interfacing with other vendors' products.  Instead, we aim to provide cmdlets that may be used in concert with others' offerings.  I'm not a VMware expert, but I consulted one, and you might try something along these lines:

> Get-Datastore demoData | fl


DatacenterId         : Datacenter-ha-datacenter
ParentFolderId       : Folder-ha-folder-datastore
DatastoreBrowserPath : vmstores:\10.10.10.136@443\ha-datacenter\demoData
FreeSpaceMB          : 61374
CapacityMB           : 61440
Accessible           : True
Type                 : NFS
Id                   : Datastore-10.10.10.92:/vol/demoData
Name                 : demoData

The Type is 'NFS' and the Id field appears to contain the controller address and the NFS export name.  Given that:

Connect-NaController 10.10.10.92 -Credential (Get-Credential)

Get-NaNfsExportStoragePath /vol/demoData | Get-NaVol | Enable-NaSis | Start-NaSis

(The real VMware experts are welcome to correct any of this, or better yet, post an example script on this community.)

Clinton

jasemccarty
13,414 Views

Clinton,

I looked at this, and put something together.  It is very rough, as I don't have a filer in front of me, but could do the trick.

It is a little long winded, as I commented everything.

This would be done using the vSphere PowerCLI:

#Load Data ONTAP PowerShell Toolkit

Import-Module DataONTAP

#Connect to vCenter

Connect-VIServer vcenter.domain.com

#Grab all the datastores that are NFS

$datastores Get-Datastore | where {$_.type -eq "NFS"}

#Loop through the results

foreach ($datastore in $datastores) {

   #Get a specific datastore

    $objDataStore = Get-Datastore -Name $_.Name

    #Get the a view of the datastore, by the ID, so we can get extended properties

    $objDataStoreView = Get-DataStoreView -id $objDataStore.id

    #Grab the URL, as it has the filer IP address, and the export path

    #It will look something like this: netfs://10.10.10.92//vol/demodata/

    $objDataStoreURL = $objDataStoreView.info.URL

   #Split it up, using "//" as the delimiter

    $SplitURL = $objDataStoreURL.split("//")

    #Position 0 has netfs: and will not be used, Position 1 has the IP of the filer, Position 2 has the export path, without a leading / and with a trailing /

    $filer = $SplitURL[1]
    $export = "/"+$SplitURL[2].Trimend("/")

    #Connect to the filer, prompting for Credentials (this could be done beforehand in a single filer environment)

    Connect-NaController $filer -Credential (Get-Credential)

    #Get the NFS Export info...

    Get-NaNfsExportStoragePath $export |Get-NaVol

}

Again, this is pretty rough draft, and I haven't used the Get-NaNfsExportStoragePath cmdlet before.  But this is a start.

btstickel
13,425 Views

I would like to be able to do more with vfilers such as cifs and nfs.

Thanks,

Brian

cknight
12,514 Views

Hello, Brian.  The Data ONTAP API supports tunneling commands to vfilers, so the Toolkit supports this as well:

Connect-NaController dunn -Vfiler vfiler1


OntapiMajorVersion : 1
OntapiMinorVersion : 12
Protocol           : RPC
Vfiler             : vfiler1
Name               : dunn
Address            : 10.61.167.60
Port               : 0
Credentials        :
ValidateIncoming   : False
ValidateOutgoing   : False
Trace              : False


Test-NaCifs


stopped


Get-NaNfsExport


ActualPathname             Pathname                   SecurityRules
--------------             --------                   -------------
                           /vol/testvol               {}

Not all APIs may be sent to vfilers, but many can.

Public