How To Recover Deleted Volume In Netapp Cluster Mode


How To Recover Deleted Volume In Netapp


In this video we will see how we can recover a deleted volume in NetApp cluster mode. This features is available in data ontap 8.3 and in later version. If you have deleted a volume and this feature is enabled then you can recover that volume within certain period of time.

How To Recover Deleted Volume In Netapp Cluster Mode
How To Recover Deleted Volume In Netapp Cluster Mode

To see if the feature is enable or not execute the below command

vserver show -fields volume-delete-retention-hours -vserver vs1

The value under volume-delete-retention-hours indicates the retention period of the deleted volume in a vserver. If its none then the feature is not enabled. In order the enable the feature execute below command.

vserver modify -volume-delete-retention-hours 8 -vserver vs1

Above command will set the retention period of 8 hours of all volume under SVM vs1. Below command will show what are the volume which are in recovery queue or in other sense which are in pending delete state.

volume recovery-queue show -vserver vs1

Below command will recover the volume from recovery queue

volume recovery-queue recover -vserver vs1 -volume vv4_1033

After using the recover command, the following steps must still be performed to access the data.

  1. Rename the volume running the volume rename command.
  2. Set up a junction, if required, running the volume mount command.
  3. Create mappings for LUNs in the volume, if required, run the lun map command.
  4. Associate a snapshot policy, an export policy with the volume, if required, with the volume modify command.
  5. Add new quota policy rules for the volume, if required, with the quota policy rule command.
  6. Add a QOS policy for the volume, if required, run the volume modify command.

Video Tutorial For NetApp Cluster Mode


                   

How To Send Email Using SMTPLIB Python Scripting

How To Send Email Using SMTPLIB Python Scripting

In this script we will see how we can send email using smtplib in python scripting. This script use gmail smtp server to send email hence we have used smtp server of gmail. You need to use your environment's smtp server to run this script.

Below is the entire script which we have written so far. Watch the video for full explanation and subscribe to the channel for more such video.

How To Send Email Using SMTPLIB Python Scripting
How To Send Email Using SMTPLIB Python Scripting

import paramiko,smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
p = paramiko.SSHClient()
cred = open("cred.csv","r")
for i in cred.readlines():
    try:
        line=i.strip()
        ls =line.split(",")
        print(ls)
        p.set_missing_host_key_policy(paramiko.AutoAddPolicy())
        p.connect("%s"%ls[0],port =22, username = "%s"%ls[1], password="%s"%ls[2])
        stdin, stdout, stderr = p.exec_command("uname -a")
        opt = stdout.readlines()
        opt ="".join(opt)
        print(opt)
        temp=open("%s.txt"%ls[0],"w")
        temp.write(opt)
        temp.close()
        msg= MIMEMultipart('alternative')
        msg['Subject'] = 'Test Mail'
        From = "fromemailaddress@gmail.com"
        To = "toemailaddress@yahoo.co.in"
        Cc = "ccemailaddress@yahoo.co.in"
        text = "Info Collector"
        data = open("%s.txt"%ls[0],"r").read()
        part1 = MIMEText(text, 'plain')
        part2 = MIMEText(data, 'plain')
        msg.attach(part1)
        msg.attach(part2)
        s=smtplib.SMTP('smtp.gmail.com', 587)
        s.ehlo()
        s.starttls()
        gmail_cred = open("gmail_cred.txt","r").read().split(",")
        s.login(gmail_cred[0],gmail_cred[1])
        s.sendmail(From, To ,msg.as_string())
        s.quit()
    except Exception as error:
       print(error)
cred.close()


                    

Zoning In Cisco MDS SAN Switch In Command Line

Zoning In Cisco MDS SAN Switch In Command Line Zoning is a process of grouping initiator and target ports WWPN which is performed in SAN ...