{"id":268,"date":"2012-07-11T15:46:24","date_gmt":"2012-07-11T20:46:24","guid":{"rendered":"http:\/\/www.hpux.ws\/?p=268"},"modified":"2012-07-11T15:46:59","modified_gmt":"2012-07-11T20:46:59","slug":"online-jfs-filesystem-expansion-without-umount","status":"publish","type":"post","link":"https:\/\/www.hpux.ws\/?p=268","title":{"rendered":"Online JFS filesystem expansion without umount"},"content":{"rendered":"<p>This requires add in software from Veritas\/Symmantec that can be expensive on HP-UX.<\/p>\n<p>Lets say we want to extend \/var which is lvol8.<\/p>\n<p>It was originally 600 LE and we extended it as follows.<\/p>\n<p><strong>lvextend -l 800 \/dev\/vg00\/lvol8 \/dev\/disk\/disk25_p2<\/strong><\/p>\n<p>The 800 refers to LE logical extents. I prefer to use this rather than MB because it corresponds to the values displayed by most lvm utilities. -L &lt;value in megabytes&gt; can be used. I assume you can do the math here.<\/p>\n<p>[system099]\/root # <strong>lvdisplay \/dev\/vg00\/lvol8<\/strong><br \/>\n&#8212; Logical volumes &#8212;<br \/>\nLV Name\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/dev\/vg00\/lvol8<br \/>\nVG Name\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/dev\/vg00<br \/>\nLV Permission\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 read\/write<br \/>\nLV Status\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 available\/syncd<br \/>\nMirror copies\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 1<br \/>\nConsistency Recovery\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 MWC<br \/>\nSchedule\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 parallel<br \/>\nLV Size (Mbytes)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 12800<br \/>\nCurrent LE\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 800<br \/>\nAllocated PE\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 1600<br \/>\nStripes\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0<br \/>\nStripe Size (Kbytes)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0<br \/>\nBad block\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 on<br \/>\nAllocation\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 non-strict<br \/>\nIO Timeout (Seconds)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 default<\/p>\n<p>It was originally 600 LE and we extended it as follows.<\/p>\n<p><strong>lvextend -l 800 \/dev\/vg00\/lvol8 \/dev\/disk\/disk25_p2<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><strong> fsadm -F vxfs -b 12800M \/var<\/strong><\/p>\n<p>This command will use online JFS to extend the filesystem. The alternative is extendfs. But that requires a umount.\u00a0 Or perhaps xvumount -o force. Your choice, I don&#8217;t recommend it, but did test it the other day in the sandbox.<\/p>\n<p>Now if you want to be cute and use all your space, try this.<\/p>\n<p><strong>SIZE=$(lvdisplay \/dev\/vg00\/lvol8 | awk &#8216;\/LV Size\/ {print $NF}&#8217;);<\/strong><\/p>\n<p><strong>ESIZE=&#8221;${SIZE}M&#8221;<\/strong><\/p>\n<p><strong>fsadm -F vxfs -b $ESIZE \/var<\/strong><\/p>\n<p>You can get more cute and do it with a single command line but I&#8217;m not going to do that. I have not broken any systems this week and am trying to avoid that.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This requires add in software from Veritas\/Symmantec that can be expensive on HP-UX. Lets say we want to extend \/var which is lvol8. It was originally 600 LE and we extended it as follows. lvextend -l 800 \/dev\/vg00\/lvol8 \/dev\/disk\/disk25_p2 The 800 refers to LE logical extents. I prefer to use this rather than MB because [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"_kadence_starter_templates_imported_post":false,"footnotes":""},"categories":[],"tags":[],"class_list":["post-268","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/www.hpux.ws\/index.php?rest_route=\/wp\/v2\/posts\/268"}],"collection":[{"href":"https:\/\/www.hpux.ws\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hpux.ws\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hpux.ws\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hpux.ws\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=268"}],"version-history":[{"count":0,"href":"https:\/\/www.hpux.ws\/index.php?rest_route=\/wp\/v2\/posts\/268\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.hpux.ws\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=268"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hpux.ws\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=268"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hpux.ws\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=268"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}