df by volume group (saving those precious fingertips)
AnthonyEnglish 270000RKFN Comment (1) Visits (10695)
df command. But what if you want to run df just for the file systems in a single volume group? You may want to identify the culprites filling up a LUN, for example.
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:
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:
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.