Saturday, June 23, 2012

HDS Device Manager HiRDB Cluster Setup Error

I recently was setting up a Hitachi Device Manager and Tuning Manager cluster on Windows 2008.  During the configuration phase I ran into the follow error when trying to setup the HiRDB database onto the shared cluster disk.
 
HOSTNAME c:\Program Files (x86)\HiCommand\Base\bin\hcmdsdbclustersetup /createcluster /databasepath D:\database /exportpath E:\empty2 /auto
 
KAPM06577-E An attempt to acquire a value has failed.
 
This error has to do with C:\Program Files (x86)\HiComand\Base\conf\cluster.conf file.  The hcmdsdbclustersetup command references this file which you create before you run the cluster setup command.  Specifically it looks for the mode line which can either be online or standby.  However if that line is not there, has a typo or the file is missing completely, the cluster setup command will fail.

In my case I had a typo in the file.  Once I corrected the typo the command completed successfully.

Wednesday, May 09, 2012

Netapp Interconnect Troubleshooting


In a Netapp metro cluster configuration there may sometimes be the need, for troubleshooting, to reset the cluster interconnect and/or see the status.  If the interconnect is experiencing issues it could prevent the filer from failing over.   The following command details provide some insight on how to view the interconnect and reset it.

filer> priv set diag
Warning: These diagnostic commands are for use by NetApp
         personnel only.

filer*> ic ?
Usage:
        ic status
        ic stats performance
        ic stats error [ -v ]
        ic ood
        ic ood stats
        ic ood stats performance show [ -v ] [nv_vi_|vi_if_]
        ic ood status
        ic ood stats error show
        ic dumpq
        ic nvthruput [-bwmsrndkc:g:] [-c count]
        ic reset nic [0|1]
        ic reset link
        ic dump hw_stats
        ic ifthruput [chan]

filer*> ic status
        Link 0: up
        Link 1: up
        cfo_rv connection state :                       CONNECTED
        cfo_rv nic used :                               1
        cfo_rv2 connection state :                      CONNECTED
        cfo_rv2 nic used :                              1

To reset one of the interconnect links from the filer side:
   
filer*> ic reset nic 0

Hidden Options In Netapp


If you have ever wondered what all the hidden options were on a Netapp filer, you are not alone.  To view all the options both visible and hidden you only need to do the following:

filer>priv set advanced
filer*>registry walk options

A list of all the options both visible and hidden will be displayed.

Monday, March 26, 2012

Using Netapp DFM and Perl to Manage Netapp Filer /etc Files

Sometimes you have to manage the /etc/passwd and /etc/group files on your Netapp filer and seemingly the only options available are to use rdfile and wrfile or a text editor like vi via a NFS mount or Notepad++ via a CIFS share.   None of which appeal to me when trying to create something that a less technical person could use to manipulate these files.

Below is the rough framework that could be used to build a full fledged file manipulator for Netapp files under the /etc directory.  In the example below we are looking at the /etc/passwd file, however it could be expanded to manipulate any files on the filer through DFM.   Further, you could use Win32:GUI or Perl/TK to provide a GUI to the script as opposed to running it via the command line.

The breakdown of the script is as follows:


Standard Perl interpreter line.  In this example we are on Windows.

     #!/Perl64/bin/perl

This section of the script is a basic variable assignment of what I want my new line to be in the /etc/passwd file.  However you could have an input prompt here and/or have it read from a file.
     $newentry = "Your passwd entry\n";

This line grabs the existing /etc/passwd file and loads it into a perl array called rpasswd.  It is using the DFM command set to run rdfile on the filer.

     chomp (@rpasswd = `dfm run cmd -t 120 faseslab1 rdfile /etc/passwd`);

  This section cleans up the rpasswd values and only puts in the lines that match Stdout from the DFM output into a second array called passwd.

    foreach $line (@rpasswd) {
                     if ($line =~ /^Stdout:\s+/) {
                                     $line =~ s/^Stdout:\s+//g;
                                     push(@passwd,$line);
                     }
     }

This line  places the new entry into the passwd array.

     push (@passwd,$newentry);

This line backs up the existing passwd file using DFM and mv command.

     $result = `dfm run cmd -t 120 faseslab1 mv /etc/passwd /etc/passwd.bak`;
This line writes the new passwd file using the passwd array and DFM to write out the new file.

     foreach $line (@passwd) {
                     $result = `dfm run cmd -t 120 faseslab1 wrfile -a /etc/passwd $line`;
     }
     exit;

 Again, this is a rough example, but it gives you the idea of what can be done using Perl and DFM.