HiperLogic

Virtualization, High Performance Computing, Enterprise Computing

NetApp

You are currently browsing the archive for the NetApp category.

NetApp has released a fantastic PowerShell kit to automate operations with their filers.

To get started, download the DataOntap.zip and install.ps1 from the NetApp NOW site, and place them in c:\temp\ on a Windows box with PowerShell ( I am using 2008 R2 with PowerShell Version 2 )

Start PowerShell, and type the following:

set-executionpolicy remotesigned
cd c:\temp\
 ./install.ps1

after that, start PowerShell again and type

     Get-Module -listavailable

to make sure you see DataONTAP installed.

Now you can type

Import-Module DataONTAP

To access the DataONTAP cmdlets in your session. You will need to do this each time you start PowerShell, or you can add the above command to your PowerShell profile to automatically load them.

To see help and examples, you can use the following command:

Show-NaHelp

For detailed help on a cmdlet, use get-help as you normally would with PowerShell:

Get-Help Connect-NaController –full

There are MANY great cmdlets available to automate common NetApp administration tasks.

A great example is a script mixing both NetApp and VMware PowerShell automation by Jase McCarty here which automatically provisions and mounts storage on all ESX hosts.

I modified Jase’s script slightly to work with PowerShell 2.0 and to use root access instead of AD credentials. This script must be ran from VMware PowerCLI to work:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Add the  DATA ONTAP Module
Import-module DataONTAP
# Set my variables. Change for your site
##########################
$vCenter = "192.168.15.70"
$Filer = "192.168.15.3"
$aggr = "aggrx"
$newvol = "volx"
$narootpasswd = "netapprootpasshere"
#########################

#Connect to NetApp as root
$password = ConvertTo-SecureString $narootpasswd -AsPlainText -Force
$cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "root",$password

Connect-NaController $Filer -Credential $cred

# Create a new 6GB volume
New-NaVol $newvol $aggr 6g

# Set some options for the new volume
Set-NaVolOption $newvol no_atime_update yes
Set-NaVolOption $newvol fractional_reserve 0

# Set the SnapShot Reserve to 0
Set-NaSnapshotreserve $newvol 0
Set-NaSnapshotschedule $newvol -Weeks 0 -Days 0 -Hours 0

# Add an NFS export
Add-NaNfsExport /vol/$newvol -Persistent -ReadWrite all-hosts -NoSuid -SecurityFlavors sys,krb5

# Get all the vSphere Hosts and add the NFS export. This requires VMware PowerCLI

# Connect to vCenter
Connect-VIServer $vCenter

$Hosts = Get-VMHost
ForEach ($h in $Hosts)
{
New-Datastore -Nfs -VMHost $h.Name -NAME $newvol -Path /vol/$newvol -NfsHost $Filer;
}

During a recent customer VMware healthcheck, we noted a customer did perform the VMware NFS timeout tunings as recommended by NetApp TR-3749. However none of the guests had the correct guest level timeout tuning.

TR-3749 doesn’t explicitely spell out that you should make sure and update your guest level disk timeouts to match the NFS timeout tunings.

Also note that these disk timeout settings if done once in the guest, may be reset through a VMware Tools upgrade. (See http://communities.vmware.com/thread/212235) so watch out.

See NetApp article kb41511 “VMware ESX Guest OS I/O Timeout Settings for NetApp Storage Systems”  for more details.

Tags: ,

We frequently get questions from customers with NetApp if they should store the swap with the VM or on a separate datastore, and how big should they make their swap datastore.

NetApp recommends in NetApp TR-3749 to use a separate datastore, as to avoid storing “transient” data like swap when using array based snapshots or disk-to-disk replication with SnapMirror and/or SnapVault. (Also See TR-3428).

For sizing, you can thin provision and use autogrow on the NetApp side to avoid having to worry about an “exact” space figure as this space is dynamic in nature depending on the number of VM’s, the memory in those VM’s, and memory reservations, and is used only when there is memory pressure.

If you want an absolute worse case add up all the VM’s you would create with the memory you anticipate allocating to them, and use that result if you need an absolute worse case number.

Tags: ,

© 2006-2010 HiperLogic, LLC.  |  Serving the Ann Arbor, Southeast Michigan, and Ohio region  |  (888)-268-3930  |