<p>Splitvg is a really cool feature of AIX 5L, but there is one problem. Each &#8220;copy&#8221;, must be on a different set of disks. Mirrored copies of each LV are numbered 1, 2, or 3 (1 for the first copy, 2 for the second, and 3 for the third). Splitvg has to be told which &#8220;copy&#8221; to split and recreate as a new VG. So, this means that all of the #1 copies must be on the same disks, and all of the #2 copies must be on different disks. Splitvg isn&#8217;t smart enough to work around this. So, there&#8217;s a quick little script to run on each PV in the volume group, if it&#8217;s all okay there won&#8217;t be any output:</p>{"id":72,"date":"2009-06-18T13:25:10","date_gmt":"2009-06-18T17:25:10","guid":{"rendered":"http:\/\/patrickv.info\/wordpress\/?p=38"},"modified":"2009-06-18T13:25:10","modified_gmt":"2009-06-18T17:25:10","slug":"validate-mirroring-for-splitvg","status":"publish","type":"post","link":"https:\/\/rootuser.ninja\/index.php\/2009\/06\/18\/validate-mirroring-for-splitvg\/","title":{"rendered":"Validate mirroring for splitvg"},"content":{"rendered":"<p>Splitvg is a really cool feature of AIX 5L, but there is one problem. Each &#8220;copy&#8221;, must be on a different set of disks. Mirrored copies of each LV are numbered 1, 2, or 3 (1 for the first copy, 2 for the second, and 3 for the third). Splitvg has to be told which &#8220;copy&#8221; to split and recreate as a new VG. So, this means that all of the #1 copies must be on the same disks, and all of the #2 copies must be on different disks. Splitvg isn&#8217;t smart enough to work around this. So, there&#8217;s a quick little script to run on each PV in the volume group, if it&#8217;s all okay there won&#8217;t be any output:<br \/>\n<!--more--><\/p>\n<pre><code>HDISK=\"hdisk25\"\nfor LV in `lspv -l $HDISK | tail +3 | awk '{ print $1 }'`\ndo\n     count=`lslv -m $LV | tail +3 | awk '{ print $3 }' | grep -v -c $HDISK`\n     if [ $count -gt 0 ]\n     then\n          echo $LV\n     fi\n     count=\"\"\ndone<\/code><\/pre>","protected":false},"excerpt":{"rendered":null,"protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,1],"tags":[],"class_list":["post-72","post","type-post","status-publish","format-standard","hentry","category-aix-notes","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/rootuser.ninja\/index.php\/wp-json\/wp\/v2\/posts\/72","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rootuser.ninja\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rootuser.ninja\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rootuser.ninja\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rootuser.ninja\/index.php\/wp-json\/wp\/v2\/comments?post=72"}],"version-history":[{"count":0,"href":"https:\/\/rootuser.ninja\/index.php\/wp-json\/wp\/v2\/posts\/72\/revisions"}],"wp:attachment":[{"href":"https:\/\/rootuser.ninja\/index.php\/wp-json\/wp\/v2\/media?parent=72"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rootuser.ninja\/index.php\/wp-json\/wp\/v2\/categories?post=72"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rootuser.ninja\/index.php\/wp-json\/wp\/v2\/tags?post=72"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}