{"id":859,"date":"2011-06-26T05:45:37","date_gmt":"2011-06-25T19:45:37","guid":{"rendered":"https:\/\/www.penguinpunk.net\/blog\/?p=859"},"modified":"2011-06-24T11:46:51","modified_gmt":"2011-06-24T01:46:51","slug":"emc-naviseccli-using-chglun-to-modify-lun-cache-settings","status":"publish","type":"post","link":"https:\/\/www.penguinpunk.net\/blog\/emc-naviseccli-using-chglun-to-modify-lun-cache-settings\/","title":{"rendered":"EMC &#8211; naviseccli &#8211; Using chglun to modify LUN cache settings"},"content":{"rendered":"<p>Friday\u00a0morning I\u00a0had cause to &#8220;fiddle&#8221; with the LUN cache settings on 312 component LUNs across 2 arrays and needed to turn on read and write cache on each component LUN. Via Unisphere I would have to find the MetaLUN, right-click, select Show Components, expand the Component 0, right-click on the component, select Properties, select the Cache tab, tick the radio boxes for SP Read Cache and SP Write Cache, click OK, then re-expand the Component 0, rinse and repeat. On a few components this is tolerable, but for 312 not so much.<\/p>\n<p>So I thought that maybe I could do something with <em><strong>naviseccli<\/strong><\/em>. You can change the cache properties of a LUN, amongst other things, using the\u00a0<em><strong>chglun<\/strong><\/em> command.<\/p>\n<p><strong>chglun -l &lt;LUN-ID&gt; -c none |\u00a0caching read | write\u00a0| rw<\/strong> &#8211; where you can select no cache, read cache, write cache or read-write cache. So the command I used to enable rw cache on the LUN was<\/p>\n<p><strong>naviseccli -h 256.256.256.256 chglun -l 24047 -c rw<\/strong><\/p>\n<p>Note that if you have FAST Cache installed you can also use this command to set FAST Cache for a LUN using the <strong>-fastcache 0 | 1<\/strong> switch.<\/p>\n<p>My next issue was that, even though these components had normal LUN IDs like 3, 8 and so forth, their actual LUN ID when they were used as MetaLUN Components was changed to something else by Unisphere. So I ran a report for each array to list the configured MetaLUNs. I then opened the .xml file in Excel and copied the Component LUN IDs into a different column. Put some commands before and after the column and then saved it as a txt file that I could then run as a script. It took a little time to run, but a lot less time than it would have taken to change these settings by hand. If you are checking the resultas in Unisphere you should make sure that you&#8217;ve refreshed your screen, because it least in our environment it can take a while to show up.<\/p>\n<p>One other thing to note is that, as the manual says, &#8220;The <em><strong>chglun<\/strong><\/em> command does not support thin LUNs&#8221;. Fair enough, so I can do <em><strong>chglun<\/strong><\/em> operations on Pool LUNs? Well, mostly.\u00a0Here&#8217;s one we tried earlier:<\/p>\n<p><strong>c:\\&gt;naviseccli -h 256.256.256.256 chglun -l 130 -c rw<\/strong><br \/>\n<strong>Error: chglun command failed<\/strong><br \/>\n<strong>Switch not supported: -c<\/strong><br \/>\n<strong>One or more of the specified switches is not supported for the input Pool lun.<\/strong><\/p>\n<p><strong>c:\\&gt;<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Friday\u00a0morning I\u00a0had cause to &#8220;fiddle&#8221; with the LUN cache settings on 312 component LUNs across 2 arrays and needed to turn on read and write cache on each component LUN. Via Unisphere I would have to find the MetaLUN, right-click, select Show Components, expand the Component 0, right-click on the component, select Properties, select the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[125,60,5],"tags":[371,24,170,200,21,400,324,110,158,40,787],"class_list":["post-859","post","type-post","status-publish","format-standard","hentry","category-clariion-emc-storage-storage","category-emc-storage","category-storage","tag-cache","tag-clariion","tag-cx4","tag-cx4-960","tag-emc","tag-excel","tag-fast-cache","tag-howto","tag-naviseccli","tag-san","tag-storage"],"_links":{"self":[{"href":"https:\/\/www.penguinpunk.net\/blog\/wp-json\/wp\/v2\/posts\/859","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.penguinpunk.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.penguinpunk.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.penguinpunk.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.penguinpunk.net\/blog\/wp-json\/wp\/v2\/comments?post=859"}],"version-history":[{"count":7,"href":"https:\/\/www.penguinpunk.net\/blog\/wp-json\/wp\/v2\/posts\/859\/revisions"}],"predecessor-version":[{"id":898,"href":"https:\/\/www.penguinpunk.net\/blog\/wp-json\/wp\/v2\/posts\/859\/revisions\/898"}],"wp:attachment":[{"href":"https:\/\/www.penguinpunk.net\/blog\/wp-json\/wp\/v2\/media?parent=859"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.penguinpunk.net\/blog\/wp-json\/wp\/v2\/categories?post=859"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.penguinpunk.net\/blog\/wp-json\/wp\/v2\/tags?post=859"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}