SaaS Backup Bulk Export Tool

How-TO: Automate the NetApp Tasks via BASH SHELL Script

mklee786
8,596 Views

Dear Team,

I would like to, ""Automate my daily NetApp Tasks (DB Backup execution, Space Usage monitoring & Bringing the NetApp Filer UP / Down at regular intervals) via BASH SHELL Script (.sh)"". 

Is there any external Linux box is required & linked to the NetApp box to perform this task, if so let me know how I can achieve setting up this?.

Kindly, let me know:

a) How-TO: Create & Execute any BASH SHELL Script (.sh) in a NetApp box. And, change the permission for them?.

b) Also, I would like to know "How-TO: Schedule any BASH SHELL Script (.sh) inside the NetApp box to perform my daily sequence activity (EX: Genearating, a daily Health Check Report of my NetApp box (to identify the status of my LUN, Storage Pools and their Health, Volumes)".

c) Hope, "rdfile & wrfile"will be able to perform the read a file and write a file on the NetApp box. But, the command is missing in my box. Kindly, let me know why & How-TO: fix / make it work?.

d) Also, please let me know the best way to install any missing package / command in a NetApp box. I tried "n" ways nothing worked.

Any, help appreciated on these above queries are highly appreciated !!!!.

Thanks,

KM (Mail ID: mklee786@gmail.com / WhatsApp No.: 9442619352).

3 REPLIES 3

GidonMarcus
8,412 Views

Hi

 

NetApp uses proprietary and closed OS called ONTAP. the OS is locked-down to only run NetApp built-in commands.

Rdfile and Wrfile are commands available in Advanced / Diagnostic mode on the nodes, ad they mainly available for troubleshooting and edit of local config files.

 

scripts as such should be run from external box. NetApp provide multiple SDK's and developer / scripting tools to the individual products. as well as a backup suite, monitoring tools and automation tools that you can explore and may help you with your tasks.

 

Gidi

Gidi Marcus (Linkedin) - Storage and Microsoft technologies consultant - Hydro IT LTD - UK

mklee786
8,332 Views

Gidi,

 

1. Below is the errro I got when I try to use "wrfile / rdfile in netapp". Kindly, advise howto proceed here?. 

 

<<

METRO-CLUSTER-01::> set -privilege admin

METRO-CLUSTER-01::> wrf

Error: "wrf" is not a recognized command
METRO-CLUSTER-01::> rdf

Error: "rdf" is not a recognized command
METRO-CLUSTER-01::> set -privilege advanced

Warning: These advanced commands are potentially dangerous; use them only when directed to do so by NetApp personnel.
Do you want to continue? {y|n}: y

METRO-CLUSTER-01::*> wrf

Error: "wrf" is not a recognized command
METRO-CLUSTER-01::*> rdf

Error: "rdf" is not a recognized command
METRO-CLUSTER-01::*> set -privilege diagnostic

Warning: These diagnostic commands are for use by NetApp personnel only.
Do you want to continue? {y|n}: y

METRO-CLUSTER-01::*> wrf

Error: "wrf" is not a recognized command
METRO-CLUSTER-01::*> rdf

Error: "rdf" is not a recognized command

>>

 

2. My actual need is to generate and send a "Health Check Report" va mail at the end of my  work day on daily basis. How to achiveve this by a Linux box and a NetApp, how to achieve this?. 

 

3. Please, get me more on this, Per my knowledge: SANSurfer, fdm (Fabri Disk Management), HP OneView, NetApp Manageability (NM) cn be used to achieve this. Please. correct me and elaborate more on this. 

<<

scripts as such should be run from external box. NetApp provide multiple SDK's and developer / scripting tools to the individual products. as well as a backup suite, monitoring tools and automation tools that you can explore and may help you with your tasks.

>>

 

Thanks,

KM

Skim
7,640 Views

rdfile and wrfile are node shell commands. Below is provided from Ontap 9 Documentation Center as an example.  They were used more often in 7-mode as there are other ways of getting the information now.  For example, the below will allow you to see events in the /etc/log directory, but it can be easier to go through OnCommand System Manager and get to the logs there.

Accessing the event log files

You can access the event log files for tape backup and restore operations in the /etc/log/ directory by using the rdfile command at the nodeshell. You can view these event log files to monitor tape backup and restore operations.

About this task

With additional configurations, such as an access-control role with access to the spi web service or a user account set up with the http access method, you can also use a web browser to access these log files.

Steps

  1. To access the nodeshell, enter the following command: node run -node node_name
    node_name is the name of the node.
  2. To access the event log files for tape backup and restore operations, enter the following command: rdfile /etc/log/backup

 

Additionally, to answer the questions that you ask before, NetApp has several products and supports several other products to help you do what you want to do.  OnCommand Unified Manager (OCUM) will allow you to create alerts, generate custom reports and other administrative tasks.  OCUM also has the ability to run shell scripts in response to an alert.  So if you have a volume that hits 80% usage, you can either set up autogrow through Ontap or have OCUM run a script to grow your volume a specific amount.

 

I have OCUM set up to generate reports on a daily, weekly and monthly basis depending on the report.  For example, I get a summary of active alerts sent daily and health and performance reports on a weekly basis.  If there are any issues, I get alerts that I can get sent repeatedly to me on a schedule until the issue is taken care of.

 

There are also many products to help automate the process that NetApp provides as a product or service or provides support for third party products.  WFA or Work Flow Automation is a NetApp product that you can talk to your sales representative about as well as third pary products that NetApp supports such as Ansible, Puppet and others.

Public