OS: AIX 7100-04-1216
Então, basicamente, estou tentando escrever um loop for para ver quais volumegroups eu tenho em meu sistema, quais sistemas de arquivos residem nesses grupos de volumes e qual é o tamanho de cada um desses sistemas de arquivos.
Eu tenho o seguinte código:
for LINE in 'lsvg' ; do
echo "Volume Group: "${LINE}
for LINE2 in 'lsvgfs ${LINE}' ; do
echo "'lsvgfs ${LINE}' \n"
df -g ${LINE2}
done
done
A saída de lsvg
rootvg
nimvg
A saída do lsvgfs (para rootvg)
/
/usr
A saída de lsvgfs (para nimvg)
/export/nim/lpp_source
/export/nim/spot
A saída de df -g (para / em volumegroup rootvg)
Filesystem GB blocks Free %Used Iused %Iused Mounted on
/dev/hd4 5.25 2.86 46% 9957 2% /
A saída de df -g (para / usr no volumegroup rootvg)
Filesystem GB blocks Free %Used Iused %Iused Mounted on
/dev/hd2 2.00 0.17 92% 43194 50% /usr
A saída do df -g (para / export / nim / lpp_source no volumegroup nimvg)
Filesystem GB blocks Free %Used Iused %Iused Mounted on
/dev/fslv02 10.00 8.24 18% 597 1% /export/nim/lpp_source
A saída de df -g (para / export / nim / spot no volumegroup nimvg)
Filesystem GB blocks Free %Used Iused %Iused Mounted on
/dev/hd4 5.25 2.86 46% 9957 2% /
O que deve fazer:
Volume Group: rootvg
File System: /
/dev/hd4 5.25 2.86 46% 9957 2% /
File System: /usr
/dev/hd2 2.00 0.17 92% 43194 50% /usr
File System: /var
Volume Group: nimvg
File system: /export/nim/lpp_source
/dev/fslv02 10.00 8.24 18% 597 1% /export/nim/lpp_source
File system: /export/nim/spot
/dev/hd4 5.25 2.86 46% 9957 2% /
O que eu recebo:
Volume Group: rootvg
/
/usr
Filesystem GB blocks Free %Used Iused %Iused Mounted on
/dev/hd4 5.25 2.86 46% 9957 2% /
/
/usr
Filesystem GB blocks Free %Used Iused %Iused Mounted on
/dev/hd2 2.00 0.17 92% 43194 50% /usr
Volume Group: nimvg
/export/nim/lpp_source
/export/nim/spot
Filesystem GB blocks Free %Used Iused %Iused Mounted on
/dev/fslv02 10.00 8.24 18% 597 1% /export/nim/lpp_source
/export/nim/lpp_source
/export/nim/spot
Filesystem GB blocks Free %Used Iused %Iused Mounted on
/dev/hd4 5.25 2.86 46% 9957 2% /