Originally posted by: tony.evans
That command probably works (not tested) and it certainly fits with the UNIX philosophy (provide commands which do one thing very well and quietly, and build complex commands by tying them together), but I would generally avoid using the ODM to get the data.
lsfs lists information about filesystems and their relationship to logical volumes.
lslv lists information about logical volumes and their relationship to volume groups.
I would go with,
lslv $(lsfs -c /filesystem/mount | tail -1 | awk -F
":"
'{print $2}' | awk -F
"/"
'{print $NF}') | awk
'/VOLUME GROUP/ {print $NF}'
Again, not a single command, but certainly the 'UNIX way'. We've both also demonstrated another UNIX truism, there's always more than one way.
(I expect the forum will now mangle my code and I'll be back to try posting it again in a second)
#AIX-Forum