It's surprisingly simple to do df by vg. It's a matter of combining two commands: lsvgfs and df.
Command 1: lsvgfs
You can use lsvgfs to list all the file systems belonging to a volume group.
# lsvgfs rootvgCommand 2: df with arguments
And df can take arguments. You can use the df command to display a specific file system or set of file systems:
df /usr /tmp
Combine these two commands and you can do a df for all file systems in a volume group.
df -m $(lsvgfs rootvg)I have an LPAR with other volume groups, but I'm only interested in the rootvg file systems for the moment. Here's how it looks:
Looks like I've got some cleaning up to do in /opt.
This combination of two commands: df and lsvgfs, has got to be easier than the usual ways of narrowing down the file systems:
- df with grep (and stripping out the other vgs and NFS mounts).
- lsvg -l VGNAME and awk (but make sure you exclude dump devices, paging space, jfslogs etc.)
Your fingers, my nightmares
df and lsvgfs. Please start using this. It will save me waking up in a cold sweat worrying about your fingers wearing out, especially if they're outside their warranty period. I don't want your precious little fingertips making a special guest appearance in my nightmares.