find VG with FS

Hi All,

When ever I need to increase the FS,

I need to list VG first with:

lsvg
rootvg
vg2

It will give the list of VG, then I will do this:

lsvg -l rootvg | grep FS
lsvg -l vg2 | grep FS

If I find in vg2 then I can verify the VG free space and then I can compute how much space I can add.

Is there someone already have a script for this?

If I were thinking of scripting this, I think it's a little difficult because I need to do this "lsvg > listvg" and from that, I need to loop on the file listvg. I can do that but I know someone might have a trick on this with simple bash/korn shell scripting without file reading.

Thanks in advance
itik

I'm not sure I totally understand what you're trying to do, but have you ever tried using smit ?

smit stands for System Management Interface Tool. Unless I'm mistaken, it's an IBM product that ships with AIX. I.E. Only AIX has it. It provides a simple menu structure to a lot of the seldom used system management stuff.

A neat thing about it is, it creates a log of the actual commands used to do what you've asked it to do. Therefore, you could actually look at THAT and create a script if there's something complicated you do often.

While not too complicated, that's how I created a script to add users.

I got it although some VG are displaying:

lsvg | awk '{print "lsvg -l "$1" | grep -e "$1" -e usr"}' | ksh

Note: you should replace the usr according to what you need to find.

BTW, you could use smit or smitty if your AIX is just a few, I'm managing 6. Needs to script it.

Maybe someone could simplify that script! Thanks.

You don't need to use a script. lsvg will accept a list of VGs at <stdin>, therefore (for example):

# lsvg -o | lsvg -l | grep FS

This will cycle through all the active VGs (lsvg -o) and do an "lsvg -l" on each of them.

I hope this helps.

bakunin