{"id":291,"date":"2020-09-29T00:32:04","date_gmt":"2020-09-28T23:32:04","guid":{"rendered":"http:\/\/192.168.8.14\/?p=291"},"modified":"2020-10-17T20:32:36","modified_gmt":"2020-10-17T19:32:36","slug":"handy-ontap-commands","status":"publish","type":"post","link":"https:\/\/www.jasonstreet.com\/?p=291","title":{"rendered":"Handy Ontap Commands"},"content":{"rendered":"\n<p>In my line of work I get to play with a lot of NetApp FASs running Ontap from versions 8  up to 9.7. In that time I have complied a handy little list of console commands that I use often.<\/p>\n\n\n\n<p>The following commands are mainly used when setting up (or re-purposing) aFAS (or AFF)<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Configure config backup to FTP server<\/h4>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nset -privilege advanced\nsystem configuration backup settings modify -destination ftp:\/\/&#x5B;FTP-IP] -username NETAPP\nsystem configuration backup settings set-password\nset -privilege admin\n<\/pre><\/div>\n\n\n<h4 class=\"wp-block-heading\">Manually run that config backup to FTP server<\/h4>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsystem configuration backup create -node &#x5B;nodename] -backup-name &#x5B;backup-name] -backup-type cluster\n--- wait a couple on minutes ---\nsystem configuration backup upload -node &#x5B;nodename] -backup &#x5B;backup-name].7z -destination ftp:\/\/&#x5B;FTP-IP]\n<\/pre><\/div>\n\n\n<h4 class=\"wp-block-heading\">Change ownership of disks<\/h4>\n\n\n\n<p>Very handy if you want maximumise storage. Good luck finding this info out on the internet if you are not sure how to word the question.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nset -privilege advanced\nstorage disk show\nstorage disk assign -force -data1 -owner &#x5B;target-node] -disk &#x5B;id]\nstorage disk assign -force -data2 -owner &#x5B;target-node] -disk &#x5B;id]\nor\nstorage disk assign -force -owner &#x5B;target-node] -disk &#x5B;id]\nset -privilege admin\n<\/pre><\/div>\n\n\n<h4 class=\"wp-block-heading\">Move cluster LIF to e0M port<\/h4>\n\n\n\n<p>Not best practice but I have been asked to do that in the past.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nNetwork interface show\nNetwork interface modify  -vserver &#x5B;cluster] -lif &#x5B;lifname] -home-node &amp;lt;e0M&gt; -home-port &amp;lt;e0M&gt;\n<\/pre><\/div>\n\n\n<h4 class=\"wp-block-heading\">Create Service Processor<\/h4>\n\n\n\n<p>Configuring up the Service Processors is one of the the first things you should do.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsystem node service-processor network modify -node &#x5B;node] -address-type IPv4 -enable true -ip-address &#x5B;IP] -netmask &#x5B;Mask] -gateway &#x5B;Gateway]\n<\/pre><\/div>\n\n\n<h4 class=\"wp-block-heading\">Configure email alerting<\/h4>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nevent config modify -mail-server smtp.work.net -mail-from &#x5B;fasname]@work.net\nevent notification destination create -name storage-alerts -email fas@work.net\nevent notification create -filter-name important-events -destinations storage-alerts\n<\/pre><\/div>\n\n\n<h4 class=\"wp-block-heading\">Increase inodes<\/h4>\n\n\n\n<p>If you have ever got an out of space error on a CIFs volume when you have plenty of space. Its iNodes you have really run out of.<\/p>\n\n\n\n<p>I was advised by NetApp to keep adding 5 or 10% to the iNode maximum. When I asked why should I just not set it to something stupidly high I was told no, but one at NetApp seemed to know why.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nvolume show \u2013vserver &amp;lt;vserver name&gt; -volume &amp;lt;volume name&gt; -fields files\nvolume modify \u2013vserver &amp;lt;vserver name&gt; -volume &amp;lt;volume name&gt; -files &amp;lt;number of files&gt;\n<\/pre><\/div>\n\n\n<h4 class=\"wp-block-heading\">re-ip node \/ cluster mgt<\/h4>\n\n\n\n<p>Handy when quickly re-purposing or moving a SAN. Needles to say (type) its best done from the service processor.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nset -privilege advanced\nnetwork interface modify -vserver &#x5B;vserver] -lif &#x5B;LIFNAME] -home-node &#x5B;HOMENODE] -home-port &#x5B;PortName] -address &#x5B;IPADDRESS] -netmask &#x5B;NETMASK]\nset -privilege admin\n<\/pre><\/div>\n\n\n<h4 class=\"wp-block-heading\">Change Default Gateway<\/h4>\n\n\n\n<p>Handy when quickly re-purposing or moving a SAN. Needles to say (type) its best done from the service processor. <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nroute create -vserver &#x5B;vserver] -destination 0.0.0.0\/0 -gateway &#x5B;GW]\nroute delete -vserver &#x5B;vserver] -destination 0.0.0.0\/0 -gateway &#x5B;GW]\n<\/pre><\/div>\n\n\n<h4 class=\"wp-block-heading\">Rename lif<\/h4>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nnetwork interface rename -vserver &#x5B;vServer] -lif &#x5B;lif] -newname &#x5B;new lif name]\n<\/pre><\/div>\n\n\n<h4 class=\"wp-block-heading\">Firewall<\/h4>\n\n\n\n<p>Did you know OnTap has a firewall? I didn&#8217;t for a very frustrating couple of days. Sometimes it will set a data LIF to a firewall policy of mgt, you will need to change it to data.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nnetwork interface show\nnetwork interface show -lif &#x5B;lif] -fields firewall-policy\nnetwork interface modify -lif &#x5B;lif]  -firewall-policy data -vserver &#x5B;vserver]\n<\/pre><\/div>\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In my line of work I get to play with a lot of NetApp FASs running Ontap from versions 8 up to 9.7. In that time I have complied a handy little list of console commands that I use often. The following commands are mainly used when setting up (or re-purposing) aFAS (or AFF) Configure&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[58,59],"tags":[65,66,68,61,62,64,60,67,38,63],"class_list":["post-291","post","type-post","status-publish","format-standard","hentry","category-netapp","category-ontap","tag-backup","tag-config","tag-disk","tag-inode","tag-lif","tag-move","tag-netapp","tag-ownership","tag-rename","tag-service-processer"],"_links":{"self":[{"href":"https:\/\/www.jasonstreet.com\/index.php?rest_route=\/wp\/v2\/posts\/291","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jasonstreet.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jasonstreet.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jasonstreet.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jasonstreet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=291"}],"version-history":[{"count":6,"href":"https:\/\/www.jasonstreet.com\/index.php?rest_route=\/wp\/v2\/posts\/291\/revisions"}],"predecessor-version":[{"id":541,"href":"https:\/\/www.jasonstreet.com\/index.php?rest_route=\/wp\/v2\/posts\/291\/revisions\/541"}],"wp:attachment":[{"href":"https:\/\/www.jasonstreet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=291"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jasonstreet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=291"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jasonstreet.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=291"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}