Sunday, 23 June 2013

NetApp Controller Scripts Overview for a DTA2800 FC SAN Migration

Introduction

This post covers setting up the aggregates, volumes, qtrees, LUNs, igroups, post migration snapshots… all NetApp FAS controller steps involved when migrating an FC SAN to NetApp. The script outlined here is written with a specific scenario in mind, and here we are starting from a newly installed NetApp FAS2240-4 HA pair after the initial setup script has been run. This is Data ONTAP 7-Mode.

Image: DTA2800 Data Migration Topologies - SAN-Attached Data Migration
Beginnings

Firstly: if you’ve run the NetApp DataCollector from http://synergy.netapp.com/disclaimer.htm, imported the information into Synergy, and completed the design, much of this script can be obtained as an output from Synergy.

Secondly: copying and pasting commands into PuTTY doesn’t always go smoothly, a much better method is to download/copy the script to your controller, and with CIFS this is very easy:

FAS1&2> cifs shares -add tmp /etc/tmp
FAS1&2> cifs access tmp root “Full Control”
FAS1&2> wrfile -a /etc/usermap.cfg DOMAIN\USER1 => root

Then simply map a drive to tmp, copy the script over and run with:

FAS1&2> source /etc/tmp/the_script

Note: From this point, all the commands below will need to be run on both heads (with modification for controller2)

###########################
## SETTING UP AGGREGATES ##
###########################

# Here were have SAS and Flashpool (SATA + SSD) aggregates
# Creating SAS aggregate
aggr create aggr_cont1_450sas -B 64 -t raid_dp -T SAS -r 11 22

# Moving the root vol off SATA (root vol cannot be in a Flashpool!)
vol create newrootvol -s volume aggr_cont1_450sas 162g
ndmpd on
ndmpcopy /vol/vol0 /vol/newrootvol
vol options newrootvol root
reboot

## REBOOTS!!! ##

# Destroy old root vol and rename new
vol offline vol0
vol destroy vol0
vol rename newrootvol vol0

# Configure Flashpool
aggr rename aggr0 aggr_cont1_flashpool
aggr add aggr_cont1_flashpool 5@847
aggr options aggr_cont1_flashpool hybrid_enabled on
aggr add aggr_cont1_flashpool -T SSD 3

##########################
## LICENSING, FCP, TIME ##
##########################

# Repeat for to add all licenses
license add LICENSECODE

# Configure FCP ports as target (FC SAN)
fcadmin config -d 1a
fcadmin config -t target 1a
fcadmin config -d 1a
fcadmin config -t target 1a
fcp set

# Set time, data, and NTP
date 1200
options timed.servers 10.10.10.11,10.10.10.12
options timed.enable on

####################################
## CREATING VOLUMES, QTREES, LUNS ##
####################################

# REPEAT for as many LUNs as is required
# minra on for databases only
vol create          v_sql_data -s none aggr_cont1_450sas 420g
snap reserve        v_sql_data 0
vol options         v_sql_data fractional_reserve 0
snap sched          v_sql_data 0 0 0
vol options         v_sql_data convert_ucode on
vol options         v_sql_data create_ucode on
vol options         v_sql_data minra on
vol lang            v_sql_data en_US.UTF-8
qtree security /vol/v_sql_data ntfs
vol options         v_sql_data  try_first volume_grow
vol autosize        v_sql_data v_sql_data  -m 500g -i 25g on
sis on         /vol/v_sql_data
qtree create   /vol/v_sql_data /q_sql_data
lun create -t windows_2008 -s 279g /vol/v_sql_data/q_ sql_data/ sql_data.lun

#######################################
## CREATING IGROUPS AND LUN MAPPINGS ##
#######################################

# DTA igroup
igroup create -t linux -f i_temp_dta 21:00:00:c0:dd:XX:XX:02 21:00:00:c0:dd:XX:XX:04
# Note: Similar required on the legacy storage to see the DTA

# LUN mappings (LUN, igroup, LUN ID)
lun map /vol/v_sql_data/q_sql_data/sql_data.lun i_temp_dta 11
# …
# REPEAT for as many LUN mappings as required

# Host Server igroups
igroup create -t windows -f sql 50:01:43:80:90:ab:cd:01 50:01:43:80: 90:ab:cd:02
igroup set sql alua yes
# …
# REPEAT for as many host igroups are required
# Note: Hosts are mapped after the migration is complete

####################
## POST MIGRATION ##
####################

# Post Migration Snapshots
snap create -V v_sql_data postMigration
# …
# REPEAT for as many volumes as required

# Unmapping the DTA
lun unmap /vol/v_sql_data/q_sql_data/sql_data.lun i_temp_dta
# …
# REPEAT for as many LUN unmappings as required

# LUN Host mappings (LUN, igroup, LUN ID)
lun map /vol/v_sql_data/q_sql_data/sql_data.lun sql 11
# …
# REPEAT for as many LUN mappings as required

# Delete Post Migration Snapshots
snap delete -V v_sql_data postMigration
# …
# REPEAT for as many volumes as required

# Enabling autosupport (SMTP)
options autosupport.mailhost IP
options autosupport.from cont1@domain.com
options autosupport.to email1@domain.com,email2@domain.com
options autosupport.support.transport smtp
options autosupport.doit "Post DTA Migration"

# http.enable
options httpd.enable on
options httpd.admin.enable on

25 comments:

  1. I like this blog and This content is very useful for me. I was very impressed by your written style and thanks for your brief explanation. Good job...! CCNA Certification in Chennai|

    ReplyDelete
  2. very useful really good information thanks for posting such a good information it will hepls the people a lot keep it up , Regards, Best PMP Certification In Chennai|

    ReplyDelete
  3. very nice post what a fantastic information you sharing. Keep sharing your post regularly.. Best CISM Certification in Chennai |

    ReplyDelete
  4. This post was quite awesome and interesting to read. Congrats for your work. Thanks a lot for providing this with us. Keep on updating this with us regularly: Best CISA Certification in Chennai |

    ReplyDelete
  5. Excellant post!!!. The strategy you have posted on this technology helped me to get into the next level and had lot of information in it. Best Tally Training Center in chennai |

    ReplyDelete
  6. Nice Post! It is really interesting to read from the beginning & I would like to share your blog to my circles, keep your blog as updated. Best CCNP Training institute in chennai |

    ReplyDelete
  7. Really it was an awesome article...very interesting to read..You have provided an nice article....Thanks for sharing.. Best Software Testing Training Center in chennai
    |

    ReplyDelete
  8. Good one, it is very useful for me to learn and understand, thanks for sharing your information and ideas.. keep rocks.. Best Agile Scrum Master Exam center in chennai|

    ReplyDelete
  9. Great tips and its so easy to understand. really You explain everything in detailed manner and it was very interesting to read. Thank you. Best Data Science Training in chennai|

    ReplyDelete
  10. We are really grateful for your blog post. You will find a lot of approaches after visiting your post. Great work. Best Matlab Training Center in Chennai |

    ReplyDelete
  11. Great the given information and after refer that post,i get new energy because of all given information very excellent and real words to implemented for you.Thank you so much shared that valuable information. PCB Design Training Center in Chennai ! velachery|

    ReplyDelete
  12. thank you for such a great article with us. hope it will be much useful for us. please keep on updating.. Advanced JAVA Training Center in Chennai |

    ReplyDelete
  13. thank you for such a great article with us. hope it will be much useful for us. please keep on updating.. Advanced JAVA Training Center in Chennai |

    ReplyDelete
  14. Very happy to see this blog. Gives a wonderful information with coded explanaion. Thank you for this blog. very useful to me. Prince2 Certification Center in Chennai |

    ReplyDelete
  15. Well Said, you have furnished the right information that will be useful to anyone at all time. Thanks for sharing your Ideas. Selenium Automation Training center in chennai |

    ReplyDelete
  16. Amazing write up. You have delivered useful information. Thanks for posting and keep blogging. PCB Design Training Center in Chenna |

    ReplyDelete
  17. This was a worthy blog. I enjoyed reading this blog and got an idea about it. Keep sharing more like this. MS Office Training Institute in Chennai|

    ReplyDelete
  18. Brilliant article. The information I have been searching precisely. It helped me a lot, thanks. Keep coming with more such informative article. Would love to follow them. Graphic design Training Institute in Chennai|

    ReplyDelete
  19. Thanks for sharing this valuable information to our vision. You have posted a trust worthy blog keep sharing.Regards, Data Science Training Institute in Chennai |

    ReplyDelete
  20. In the beginning, I would like to thank you much about this great post.I like your writing style and I hope you will keep doing this good working AWS Exam Center in Chennai |

    ReplyDelete
  21. Wow...Excellent informative blog, really helpful. Thank you. Final Year Projects For Phd in Chennai |

    ReplyDelete
  22. Excellant post!!!. The strategy you have posted on this technology helped me to get into the next level and had lot of information in it. Final year projects For CS in Chennai |

    ReplyDelete
  23. Very interesting and good article, it is very useful to me... keep rocks.. thanks for sharing your valuable time and views.... Final year projects For Embedded Systems in Chennai |

    ReplyDelete
  24. this blog is really useful and it is very interesting thanks for sharing , it is really good and exclusive. PMP Certification Center in Chennai |

    ReplyDelete
  25. Really an awesome post. I wondered by reading this blog post. Thanks a lot for posting this unique post which you have shared with us. Keep on posting like this exclusive post with us.Python Training institute in Chennai |

    ReplyDelete