Strings
/etc/lvmtab will not have all info in Linux like HP-UX.
for VG in `strings /etc/lvmtab`
do
echo "
------------------------"
echo " /
${VG}"
LINES=`vgdisplay -v ${VG} 2>/dev/null | grep -e
"PV Name" | wc -l | awk '{print $1}'`
vgdisplay -v ${VG} 2>/dev/null | grep -e "PV
Name" | \
awk '{if($5 != "\*") print $1, $2, $3, $4 ;
else print $0}' 2>/dev/null | \
awk -v LT=${LINES} 'BEGIN {i=1} {if(i == LT) print "
\\ " $NF ; else print "| " $NF ; ++i}'
echo "
------------------------"
done
No comments:
Post a Comment