{"id":1677,"date":"2025-03-27T23:18:53","date_gmt":"2025-03-27T23:18:53","guid":{"rendered":"\/blog\/?p=1677"},"modified":"2025-03-27T23:18:53","modified_gmt":"2025-03-27T23:18:53","slug":"get-disk-info-for-all-solaris-zones-including-zfs-and-vxfs-disks","status":"publish","type":"post","link":"\/blog\/index.php\/get-disk-info-for-all-solaris-zones-including-zfs-and-vxfs-disks\/","title":{"rendered":"get disk info for all solaris zones, including zfs and vxfs disks"},"content":{"rendered":"\n<p><code>#!\/bin\/bash <\/code><br><code>for z in `zoneadm list -cv | grep -iv global | grep -v NAME|awk '{ print $2 }'` ;do <\/code><br><code>zonecfg -z $z info | grep -i vx | grep -i rdsk | awk -F'\/' '{ print $5 }' | sort | uniq | while read dg;do <\/code><br><code># echo \"----------------- $z : $dg\" <\/code><br><code>dgs=$dg <\/code><br><code>vxdisk -o alldgs list | egrep \"$dgs\"| awk '{ print $1 \" \" $4 }' | while read -r d g;do D=`\/usr\/sbin\/vxdisk list $d | egrep '^c.t.*' | awk '{ print $1 }'` <\/code><br><code>NOS2=`echo $D | sed 's\/s2$\/\/g'` <\/code><br><code>SIZE=`grep -i $NOS2 format.txt | awk '{ print $NF }' | awk -F'-' '{ print $NF }' | sed 's\/>\/\/g;s\/GB\/\/g'` <\/code><br><code>echo \"$z : $g : $NOS2 : $SIZE : $d\" <\/code><br><code>done <\/code><br><code>done <\/code><br><code>done<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>#!\/bin\/bash for z in `zoneadm list -cv | grep -iv global | grep -v NAME|awk &#8216;{ print $2 }&#8217;` ;do zonecfg -z $z info | grep -i vx | grep -i rdsk | awk -F&#8217;\/&#8217; &#8216;{ print $5 }&#8217; | sort | uniq | while read dg;do # echo &#8220;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; $z : $dg&#8221; dgs=$dg vxdisk [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1677","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1677","targetHints":{"allow":["GET"]}}],"collection":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=1677"}],"version-history":[{"count":1,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1677\/revisions"}],"predecessor-version":[{"id":1678,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1677\/revisions\/1678"}],"wp:attachment":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=1677"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=1677"},{"taxonomy":"post_tag","embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=1677"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}