<p>Here is a quick and dirty script to remove failed MPIO paths.  You can end up with failed paths if you make some SAN connection changes.</p>
<pre><code>for disk in `lsdev -Cc disk | grep 2107 | awk '{ print $1 }'`
do
        for path in `lspath -l $disk -F "status connection" | grep Failed | awk '{ print $2 }'`
        do
                echo $disk
                rmpath -l $disk -w $path -d
        done
done</code></pre>
{"id":419,"date":"2009-11-23T12:14:22","date_gmt":"2009-11-23T16:14:22","guid":{"rendered":"http:\/\/patrickv.info\/wordpress\/?p=419"},"modified":"2009-11-23T12:14:22","modified_gmt":"2009-11-23T16:14:22","slug":"aix-remove-failed-mpio-paths","status":"publish","type":"post","link":"https:\/\/rootuser.ninja\/index.php\/2009\/11\/23\/aix-remove-failed-mpio-paths\/","title":{"rendered":"AIX &#8211; Remove failed MPIO paths"},"content":{"rendered":"<p>Here is a quick and dirty script to remove failed MPIO paths.  You can end up with failed paths if you make some SAN connection changes.<\/p>\n<pre><code>for disk in `lsdev -Cc disk | grep 2107 | awk '{ print $1 }'`\ndo\n        for path in `lspath -l $disk -F \"status connection\" | grep Failed | awk '{ print $2 }'`\n        do\n                echo $disk\n                rmpath -l $disk -w $path -d\n        done\ndone<\/code><\/pre>\n","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,7,1],"tags":[],"class_list":["post-419","post","type-post","status-publish","format-standard","hentry","category-aix-notes","category-san-notes","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/rootuser.ninja\/index.php\/wp-json\/wp\/v2\/posts\/419","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=419"}],"version-history":[{"count":0,"href":"https:\/\/rootuser.ninja\/index.php\/wp-json\/wp\/v2\/posts\/419\/revisions"}],"wp:attachment":[{"href":"https:\/\/rootuser.ninja\/index.php\/wp-json\/wp\/v2\/media?parent=419"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rootuser.ninja\/index.php\/wp-json\/wp\/v2\/categories?post=419"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rootuser.ninja\/index.php\/wp-json\/wp\/v2\/tags?post=419"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}