#!/bin/sh

if [ $# -eq 0 ]; then
	for tmp in /dev/*/group
	do
		for tmp2 in `dirname "$tmp"`/*
		do
			[ x`basename "$tmp2"` != xgroup ] &&
			set -- "$@" "$tmp2"
		done
	done
fi
for tmp
do
	lvdisplay -v "$tmp" |
sed -ne '/^--- Logical volume ---$/,/^$/{
/^LV Name /p
/^LV # /p
/^LV Size /p
/^Allocated LE /p
}
/^   --- Distribution of logical volume on [1-9][0-9]* physical volumes\{0,1\}  ---$/,/^$/{
/^$/!p
}'
done
