Microsoft Virtualization Discussions

vfiler creation

sjallabais

Hi!

I am trying to script the creation of a new cifs vfiler.

This works:

$testfiler = Connect-NaController testfiler
New-NaVfiler vf1 -Addresses 10.10.10.10 -Storage vf1vol -controller $testfiler
But how can I do setup of the ip address and CIFS equivalent of the "setup" and "cifs setup"
on the vfiler command line?

I have tried

$vf1 = Connect-NaController fas270a -Vfiler vf1

Set-NaCifs -CifsServer vf1 -AuthType ad -SecurityStyle ntfs -Domain test.local -Controller $vf1

but this doesnt seem to accept a vfiler as "-Controller"

Is this possible at all with PowerShell only? (it should be)

Regards

Sjalla

1 REPLY 1

cknight

Yes, this should be possible and I managed to get it working here.  I did have to do a few things beyond what you listed.

First, make sure your vfiler network is fully configured with ip address, netmask and interface.  I did it like this from the pfiler context, per the Toolkit online help:


PS C:\> $b = New-Object NetApp.Ontapi.Filer.Vfiler73.IpbindingInfo
PS C:\> $b.Interface = "e0a"
PS C:\> $b.Ipaddress = "10.61.167.98"
PS C:\> $b.Netmask = "255.255.255.0"
PS C:\> Set-NaVfilerAddress vfiler1 -IpBindingInfo $b

Also make sure your vfiler DNS is configured so you can resolve the domain controller by name.


PS C:\> Ping-NaHost torres.rtprre.testdomain
True

Then try configuring CIFS from the vfiler context:


PS C:\> Connect-NaController dunn -Vfiler vfiler1

Name                 Address           Ontapi   Version
----                 -------           ------   -------
dunn                 10.61.167.60      1.12     NetApp Release 7.3.3: Thu Mar 11 22:29:52 PST 2010


PS C:\> Set-NaCifs -CifsServer DUNNVF1 -AuthType ad -SecurityStyle ntfs -Domain rtprre.testdomain -User Administrator -Password ********
PS C:\> Get-NaCifs


ADSite            :
AuthType          : ad
DCConnection      : {NetApp.Ontapi.Filer.Cifs.ConnectionInfo}
DNSDomainname     : rtprre.testdomain
LDAPConnection    : {NetApp.Ontapi.Filer.Cifs.ConnectionInfo}
NetBIOSDomainname : RTPRRE
NetBIOSServername : DUNNVF1
SecurityStyle     : ntfs
WindowsType       : Windows 2003

PS C:\> Test-NaCifs
started

In my case I had to add the vfiler server name to the AD server manually; I'm not sure why, but ONTAP tried and failed to register the name:

Mon Dec  6 15:58:32 EST [vfiler1@dunn (takeover): cifs.ldap.processingFail:error]: LDAP: Could not create Active Directory account for the filer. Error 32: No such object

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public