Tuesday 21 April 2020

SIMPLE PERL SCRIPT TO CONNECT TO ONE OR MULTIPLE NETAPP AND RUN A COMMAND


This is a very simple perl script to connect to netapp and run any command.
Useful for beginners. It can work both in 7mode and cmode.
By the way you can use to to connect to other devices as well :)

#!/usr/bin/perl
use strict;
use warnings;
use lib "/<user directory to keep modules>" # if you don't have internet you can download the modules and keep it here;
use Net::OpenSSH;

use Expect;
$| = 1;

my ($f);
my $username = 'user';
my $password= 'password';
my $cmd = 'version';
my @servers = ('filer1', 'filer2');
foreach $f (@filers) {
 my $ssh = Net::OpenSSH->new("$username\@$f",  timeout => 30, password => $password);
 $ssh->error and die "Unable to connect: " + $ssh->error;
 print "Connected to NetApp Filer :  $f\n";
 my $out = $ssh->capture($cmd) or die "Unable to run command";
   print $out;
}

Guy please like and comment, if you find it useful.

Wednesday 16 August 2017

Netapp 7mode provisioning commands


Command
Summary


Volume provisioning (new volume):
Creates a FlexVol volume with the specified space guarantee type (volume, file, or none) and the desired size of the guaranteed space (KB, MB, GB, or TB).

To use volume thin provisioning set guarantee to ―none.‖
vol create flexvol_name aggr_name –s [volume|file|none] size [k|m|g|t]
To use volume thin provisioning but allow individual LUNs to reserve space at the aggregate level (for LUN-level thick provisioning) set guarantee to ―file.‖

To use volume thick provisioning set guarantee to ―volume.‖


Volume provisioning (existing volume):
Changes the space guarantee setting of an existing FlexVol volume.

To use volume thin provisioning set guarantee to ―none.‖
vol options flexvol_name aggr_name guarantee [volume|file|none]
To use volume thin provisioning but allow individual LUNs to reserve space at the aggregate level (for LUN-level thick provisioning) set guarantee to ―file.‖

To use volume thick provisioning set guarantee to ―volume.‖


LUN overwrite reserve (fractional_reserve):
Reserves space within a volume for LUNs to use for non-snapshot data after all other storage space in the volume is used. It is used as a safeguard so that there is enough space set aside in the volume for data that is being overwritten in the LUNs between Snapshot copies, even if large amounts of new data are written between Snapshot copies, causing the Snapshot copies to use up excessive space in the volume. (default = 100%)


vol options flexvol_name fractional_reserve percent


Volume autosizing:
Determines if a volume should grow when nearly full (default = off)


vol autosize flexvol_name [-m <size>[k|m|g|t]] [-i <size>[k|m|g|t]] [ on | off | reset ]



Try_first:
Determines whether autovolume growing or auto Snapshot copy deleting is tried first


vol options volname try_first [snap_delete|volume_grow]



Volume snapshot reserve:
Reserves space within the volume for storing only Snapshot copies by removing the defined percentage of space from the volume (default = 20%)


snap reserve –V flexvol_name percent



Volume snapshot autodelete:
Determines when (if) Snapshot copies will be automatically deleted (default = off)


snap autodelete flexvol_name [on|off|show|reset|help]



Command
Summary


LUN provisioning (new LUN):
Creates a LUN with specified space guarantee type, reserve or noreserve (default = reserve).

To use LUN thin provisioning use ― –o noreserve.‖
lun create -s size –t ostype [–o noreserve] lun_path
To use LUN thick provisioning omit ‖-o noreserve‖ and use default.



NOTE:

LUN thick provisioning enables space to be available in the volume for the LUN, but does not ensure that space is available in the aggregate for the volume. See volume provisioning for more information.


LUN provisioning (existing LUN):
Changes the reserve setting of an existing LUN, enable or disable (default = enable).

To use LUN thin provisioning set reservation to ―disable.‖
lun set reservation lun_path [enable|disable]
To use LUN thick provisioning, set reserve to ―enable.‖



NOTE:

Setting the value of ―reserve‖ enables space to be available in the volume for the LUN, but does not ensure that space is available in the aggregate for the volume.

Wednesday 22 June 2016

Brocade Network Advisor Migration to Another Server

Brocade Network Advisor Migration to Another Server

Version 12.x.x / Windows 2012
Login to BNA.
Servers --- Options --- Backup Now.

It takes several minutes to take a current backup.


In the new server install the BNA.
After the installation is complete, open SMC





Select the RESTORE TAB on the top.
Browse to the backup folder. The directory structure should be \Backup\Backup\ < ------ manifest file and folders located here.
Backup  -à This folder is created during the backup.
If you select the wrong directory, it would not work and throw error. So Select /backup as the location. Don’t select the backup folder which was created during the backup.





It might take some time to restore. After restoration. You’ll get a confirmation message.




POST INSTALLATION, USE THE OLD USERNAME AND PASSWORD.







Featured post

Netapp monitoring solution from scratch

I created a netapp monitoring solution on a UNIX machine... and have uploaded the static files to a free php server for so that you under...