Showing posts with label NetApp. Show all posts
Showing posts with label NetApp. Show all posts

Friday, 31 July 2015

Powershell - NetApp Volumes, Snapshots and Dedup

Some basic scripts that helped we get some sizing information.

First of all you'll need Powershell (who knew?!) and then the NetApp Powershell Toolkit - I found this link useful for this:

First script get the volume information with a loop due to having a number of Filers to get information on:

Import-Module DataOnTap

$filers = (Get-Content C:\Script_Output\Filers.txt)

Foreach ($filer in $filers){

Connect-NAController $filer -Credential <account-name>

Get-NaVol | Select @{Name="HostName";Expression={$filer}}`
,@{Name="VolumeName";Expression={$_.name}}`
,@{Name="TotalSize(GB)";Expression={[math]::Round([decimal]$_.SizeTotal/1gb,2)}}`
,@{Name="AvailableSize(GB)";Expression={[math]::Round([decimal]$_.SizeAvailable/1gb,2)}}`
,@{Name="UsedSize(GB)";Expression={[math]::Round([decimal]$_.SizeUsed/1gb,2)}}`
,PercentageUsed | Export-CSV C:\Script_Output\filers-vol-size.csv -Append -NoTypeInformation
}


Second script lists the snapshots per volume on each Filer:

Import-Module DataOnTap

$filers = (Get-Content C:\Script_Output\Filers.txt)

Foreach ($filer in $filers){
Connect-NAController $filer -Credential <account-name>
get-navol | get-nasnapshot | Select @{Name="HostName";Expression={$filer}}`
,@{Name="VolumeName";Expression={$_.TargetName}}`
,@{Name="SnapshotName";Expression={$_.Name}}`
,@{Name="CumlativeTotal(GB)";Expression={[math]::Round([decimal]$_.CumulativeTotal/1gb,2)}}`
,@{Name="Total(GB)";Expression={[math]::Round([decimal]$_.Total/1gb,2)}}`
,Created | Export-CSV C:\Script_Output\ifilers-snapshot-size.csv -Append -NoTypeInformation
}


Third script is for the Data Dedup information on each Filer (this script needs more work on it as I had to run it against each Filer instead of having a text file list of Filers

Import-Module DataOnTap

$controller = "isg-filer06"

Connect-NAController $controller -Credential <account-name>

Get-NaVol | foreach {
$volname = $_.name
Get-NaVolSis $_ | Select-Object @{n="HostName";e={$controller}}`
,@{n="VolumeName";e={$volname}}`
,@{Name="TotalSaved(GB)";Expression={[math]::Round([decimal]$_.TotalSaved/1gb,2)}}`
,State,PercentageSaved | Export-CSV C:\Script_Output\filers-dedup1.csv -Append -NoTypeInformation
}


Again, thanks to a number of bloggers out there where I managed to re-hash a few scripts to get what I wanted. I will credit them when I find their pages again!

Thursday, 6 November 2014

NetApp - Simulator install

NetApp simulator - useful for training on.

First of all you will need a NetApp account to be able to log on to the site and gain access to the simulator.

Having downloaded the Simulator for ESX and then uploaded it to the relevant host I received a error about the path the VMDK file is invalid.

I managed to get the Simulator up and running by following instructions on the NetApp Community site.

Useful links:

http://now.netapp.com/NOW/cgi-bin/simulator

http://community.netapp.com/t5/Simulator-Discussions/Ontap-simulator-8-2-got-sim-vmdk-error-on-ESX-5i-resolved-using-Vcenter/td-p/47845



Friday, 8 February 2013

VMware - My experience of upgrading from 4.1 to 5.0 update 2

**************************************************
Update:

We found an interesting article prior to updating the Hosts to ESXi 5.0 in which a NFS disconnect issue is highlighted - so we haven't upgraded to 5.0 as yet. Also impacts 5.1.

Impacted products: vSphere 5.0, NetApp also EMC.
***************************************************
 
My experiences of upgrading from 4.1 to 5.0.......

The test upgrade of a database (existing VC DB restored to another server) worked fine. Just the normal glitches of not being given the correct rights to upgrade the DB the first time of asking - dbo right on the DB and MSDB (the one that gets missed).

The test of the new feature of Web Client Server went well - the test of VPN connection using a user account proved access/connectivity to the nominated VM.

The testing ticked all the boxes. Excellent!

Production upgrade didn't go too well - it failed with a SQL script error every time on the first two days.
A call was logged with VMware to get assistance as no amount of Googling helped.

The VMware Engineer asked for a number of SQL DB checks to be done and set the Logs to unlimited growth. On the third day all steps were followed and the upgrade still failed. After the second restore and prior to the roll back to vSphere 4.1 one of the DBAs checked to see what differences there were between the Production DB and the Test DB - the only difference was the Compatibility level in the Database Properties (Test set to SQL Server 2008 (100) and Production set to SQL Server 2005 (90)). Production had its setting changed to SQL Server 2008 (100) and the upgrade worked!!

Once the upgrade completed VUM was upgraded followed by the Web Client Server install - no problems were encountered with either of these.

Now for the interesting bits.....
  • Some SSL issues mainly around the Web Client Server.
  • My VPN access isn't least privilege and therefore port 9443 wasn't open for general users - Firewall and VPN change required.
  • Web Client users getting  "Empty Inventory" when they connect which happens to be a known error - fix can be found here. I used the Domain Users group and gave them Read rights at the top level with no propagation.
  • Web Client users unable to see VMs they have console access to. The previous fix had been applied approximately 1 hour prior to the user trying Web Client. My tests, adding the console rights the user had to my user account, also failed to see the any VMs. Approximately another hour later the user checks and can see most of the VMs now. Checking my user account I can see ALL of the VMs that the user has access to. Permissions propagation issue????
  • During my testing to see why the user couldn't access the VMs I applied Read Only right to the Domain Users group at a Host and one of the impacted VMs - which looking back wasn't a good idea. Why? The least privilege rule applied which meant my Domain Admin account went from having full Virtual Center Admin rights to Read Only. This meant I couldn't do anything - at the time we thought it was something to do with the upgrade. This then had a knock on affect to our nightly backup as this account also belonged to the Domain Users group - the NetApp backup failed just because ONE machine out of 300 didn't have the right permissions. What happened to error checking??  Logged a call with VMware and before the lady rang us the epiphany hit (least privilege trump card). With VMware support we went through logging into the VI Client as the Administrator account (in our case the local admin account on the VC server) and since it had nothing to do with Domain authentication and had the highest level permissions I could remove the Domain Users Read Only from the Host and VM. Checking Web Client access and everything was working.
  • Annotations permissions have changed - Support staff can't edit the notes. The next day, with no changes applied, they could edit the notes....
Lessons learnt:
  • Have a VPN account which is mimics least privileged access.