new1234.jpg
Home > VMware > VMware: Configure NetApp NFS datastore(s) Advanced parameters with PowerCLI

VMware: Configure NetApp NFS datastore(s) Advanced parameters with PowerCLI

The settings that NetApp recommends (across all ESX hosts) are:

– NFS.HeartbeatFrequency(NFS.HeartbeatDelta in vSphere) = 12
– NFS.HeartbeatTimeout = 5 (default)
– NFS.HeartbeatMaxFailures = 10

When the number of NFS datastores are increased, we also recommend increasing the heap values:
– Net.TcpipHeapSize =>’30’  to Net.TcpipHeapMax  => ‘120’

To automate this configuration I’ve wrote a PowerCLI script:

#====================================================================#
#   SCRIPT:        Configure_Advanced_NFS_parameters.ps1             #
#   FUNCTION:      Configure NFS / NetApp best practice              #
#   OWNER:         Sander Daems                                      #
#   VENDOR:        NetApp / FAS2040                                  #
#   VSPHERE:       5.0 Update 1 build 623860                         #
#   CREATED:       07/01/2013                                        #
#   MODIFIED:      20/03/2013                                        #
#   VERSION:       v.1.1                                             #
#====================================================================#
#   CHANGELOG:                                                       #
#                                                                    #
#    v.1.0                                                           #
#    - Created script;                                               #
#                                                                    #
#====================================================================#
#   HOST - Specify host and connect                                  #
#====================================================================#
$ESXiHost = Read-Host "Enter ESXi Host name or IP"
Connect-VIServer $ESXiHost
#====================================================================# 
#   ADVANCED - Update TCP Settings                                   #
#====================================================================#
Set-VMHostAdvancedConfiguration -VMHost $ESXiHost -Name Net.TcpipHeapSize -Value 32
Set-VMHostAdvancedConfiguration -VMHost $ESXiHost -Name Net.TcpipHeapMax -Value 128
#====================================================================#
#   ADVANCED - Update NFS Settings                                   #
#====================================================================#
Set-VMHostAdvancedConfiguration -VMHost $ESXiHost -Name NFS.MaxVolumes -Value 256
Set-VMHostAdvancedConfiguration -VMHost $ESXiHost -Name NFS.HeartbeatMaxFailures -Value 10
Set-VMHostAdvancedConfiguration -VMHost $ESXiHost -Name NFS.HeartbeatFrequency -Value 12
Set-VMHostAdvancedConfiguration -VMHost $ESXiHost -Name NFS.HeartbeatTimeout -Value 5
#====================================================================#
#   SCRIPT FINISHED                                        #
#====================================================================#
Write-Host "Script finished..." -foregroundcolor yellow
#====================================================================#

More information / source: NetApp Whitepaper

More information / source: VMware KB , VMware KB, VMware KB

sanderdaems

Sander Daems is founder and author of this blog and working as a Sr. Infrastructure Consultant by IT-Value. Sander has over 10 years experience in IT, primary focus: virtualization, storage and SBC

More Posts - Website

Follow Me:
TwitterLinkedIn

  1. Willem Stinie
    January 7th, 2013  (Quote) at 19:29  (Quote) | #1

    Are this settings default for NetApp or also default for other vendors?

  2. Stacey
    January 8th, 2013  (Quote) at 07:11  (Quote) | #2

    Nice we’ve also a FAS2040, gonna run this script also

  3. David D
    March 21st, 2013  (Quote) at 15:38  (Quote) | #3

    Does the host need to be rebooted for these settings to take effect?

  1. No trackbacks yet.