Pirate Pack for Shared NAS for traditional Data ONTAP v2.0

by goodrum Former NetApp Employee on ‎2013-04-15 06:49 PM - edited on ‎2014-09-25 03:57 PM by allison Former NetApp Employee

Brought to you by the Pirate - www.virtpirate.com

 

This new installment of the Pirate Packs focuses on bringing back the first released pack - Shared NAS.  The pack was completely rewritten from the ground up with WFA 2.0 and many suggestions from the field.  The focus is NAS (Cifs & NFS) management for Arrays and Multistore (vFiler) environments.  More detailed information and screenshots are available in the README file (also found in the ZIP file). 

 

============================================

New Workflows

 

NAS MultiProtocol Support - VFiler Creation

NAS MultiProtocol Support - VFiler Creation with optional Data Volume, Shares & Exports

NAS MultiProtocol Support - Cifs Share Management

NAS MultiProtocol Support - NFSv3 Export Management

NAS MultiProtocol Support - Provision a new Qtree

NAS MultiProtocol Support - Provision a new Volume

NAS MultiProtocol Support - Quota Management

NAS MultiProtocol Support - Remove Volume and Shares/Exports

NAS MultiProtocol Support - SnapShot Management

NAS MultiProtocol Support - Volume Management

============================================

 

2013-07-17 - Updated to version 2.0.1.  This new version contains one change in the NFSv3 Management workflow.  I have now added a new command (Remove Host from Export) which will allow individual hosts to be removed from exports without the need to re-create the export.

 

WFA Version: 2.0.1.23.8 B13393

Comments
bdave Former NetApp Employee

Awesome! Great stuff, Jeremy!

Frequent Contributor

Excellent stuff Jeremy!!!  Looks awesome imported and fully available as a new NAS NOC Dashboard!

Strong, strong work!

sprakash Former NetApp Employee

Great work Jeremy! Looking forward to the Clustered ONTAP version of the pack!

Very helpful and thank you for taking the time to create some documentation to, result!

Bren

goodrum Former NetApp Employee

Everyone,

Thanks for the feedback and please keep it coming.  I ran through as many tests as I could think of to ensure no issues.  If you find a problem, then report it here in the communities.  I will be producing more packs in the next several months.  If there is something that you would like to see... let me know!

Jeremy Goodrum, NetApp

The Pirate

Twitter: @virtpirate

Blog: www.virtpirate.com

reide Former NetApp Employee

Thank you for updating this! 

Frequent Contributor

First grade stuff!!!

Thanks Jeremy!

This is  really awesome stuff.useful for me.Thanks jeremy.

Frequent Contributor

Thank you so much working on this. This is a great starting point for many customers to automate things in their environment, where they have management pain today. This certainly makes a great impact!

Occasional Contributor

Awesome work!

Fantastic! Thanks for this!

Great work:-).

one  Question...

Do you  have any WFA workflow/command for the changing the Aggregate options(ex:free_space_realloc.)?

Regard.

Rao.

goodrum Former NetApp Employee

No, I haven't built that command.  Have you taken a look at Dave's day-zero workflows?  This might be a good start

Jeremy Goodrum, NetApp

The Pirate

Twitter: @virtpirate

Blog: www.virtpirate.com

Jeremy,

This is great !

I have one question about NFSv3 Export Management.

Adding a host to existing exports and removing a host from exports works fine.

but if all the hosts are removed from exports and then add a host fails (command shows completed successfully but it doesn't add host in the Exports list).

Add hosts serverBB.abc.com,serverCC.abc.com to existsing Exports /vol/vol_88551/oracletest1_88551

/vol/vol_88551/oracletest1_88551        -sec=sys,rw=server1:serverBB.abc.com:serverCC.abc.com,anon=0

After removing all hosts, entry in /etc/exports file looks like

/vol/vol_88551/oracletest1_88551        -sec=sys,rw,anon=0

Add hosts serverBB.abc.com,serverCC.abc.com to existsing Exports /vol/vol_88551/oracletest1_88551

Entry in /etc/exports file looks like 

/vol/vol_88551/oracletest1_88551        -sec=sys,rw,anon=0

Above workflow / command to add hosts completed successfully but did not add hosts in Exports list.

Any suggestion to address this will be greatly appreciated.

Thanks,

Occasional Contributor

What seems to be missing is the "default gateway" for the vfiler.

goodrum Former NetApp Employee

Yes, there is no default gateway for the interface or the IPSpace.  Since default gateways are global in 7DOT, I didn't add that as part of the vFiler creation.

Jeremy Goodrum, NetApp

The Pirate

Twitter: @virtpirate

Blog: www.virtpirate.com

Occasional Contributor

No problem,

I changed it so it accept a gateway

….

if(!$SshSupported)

{

$disAllowProtocols += "ssh"

}

Get-WFALogger -Info -message $("Disabling protocols : " + $disAllowProtocols)

Set-NaVfilerProtocol -Name $VFilerName -DisallowProtocols $disAllowProtocols -ErrorAction SilentlyContinue

}

#

  1. ADDED by Mirko Van Colen : Default Gateway

#

if(($IpSpace -ne "default-ipspace") -and $IpSpaceDefaultGateway){

try{

Get-WFALogger -Info -message $("Adding default gateway '" + $IpSpaceDefaultGateway +"' to ipspace '" + $IpSpace + "'")

Add-NaNetRoute default $IpSpaceDefaultGateway 1 -Ipspace $IpSpace -Creator $VFilerName

}catch{

Get-WFALogger -Info -message $("Failed adding default gateway '" + $IpSpaceDefaultGateway +"' to ipspace '" + $IpSpace + "'")

}

}

#

  1. set options

#

if($VfilerOptions){

….

Regards,

Mirko Van Colen

Professional Services Consultant

M +32 496 122 285

goodrum Former NetApp Employee

Ok, sorry for the delay.  Been a busy week back.

The first two steps are expected.  The command to remove-hosts from an export will not delete the export so if all specific hosts are removed, then by default ONTAP will export RW=everyone.  Ok, now that that makes sense, we need to understand what is happening on the third step. 

There is a bug in the Update Export command.  Based on the code, the command will only update the list of exports if the export is not RW=Everyone.  This is wrong and part of the issue.  As an alternate, you could remove the Export and then recreate with the correct permissions.  Nonetheless, this is a bug in the code.

        if($existingHosts)

        {

            if($existingHosts -eq "all-hosts")

            {

                # do nothing since all hosts are allowed to read/write

                $result = "all-hosts"

            }

            else

            {

                # make unique list and append

                $result = ($existingHosts.split(",") + $NewHosts) | select -Unique

            }

        }

I will reach out to Engineering on this and see if we can get an update

Jeremy Goodrum, NetApp

The Pirate

Twitter: @virtpirate

Blog: www.virtpirate.com

goodrum Former NetApp Employee

Ok, cool.  I will try to remember to add this to the next update for WFA 2.2.  I might add it to the Create IPSpace command instead of the Create Vfiler command.  This way we can keep the Create Vfiler command certified and not affect reservations.

Jeremy Goodrum, NetApp

The Pirate

Twitter: @virtpirate

Blog: www.virtpirate.com

I believe you can only set the default gateway for an ipspace from the v-filer context of a v-filer in that ipspace. If that's true you'll have to include it in the Create V-filer command or as a separate command to run after the ipspace and v-filer are created. I always add a "vfiler run route add default' command to the physical filer's /etc/rc file for every ipspace so they are guaranteed to be set after every filer reboot.

P.S. Great work on this Pirate Pack - as a complete noob it got me up and running in no time!

Warning!

This NetApp Community is public and open website that is indexed by search engines such as Google. Participation in the NetApp Community is voluntary. All content posted on the NetApp Community is publicly viewable and available. This includes the rich text editor which is not encrypted for https.

In accordance to our Code of Conduct and Community Terms of Use DO NOT post or attach the following:

  • Software files (compressed or uncompressed)
  • Files that require an End User License Agreement (EULA)
  • Confidential information
  • Personal data you do not want publicly available
  • Another’s personally identifiable information
  • Copyrighted materials without the permission of the copyright owner

Files and content that do not abide by the Community Terms of Use or Code of Conduct will be removed. Continued non-compliance may result in NetApp Community account restrictions or termination.