install windows 10 using ide disk and virtio.iso drivers
[gnt-info] / gnt-lvs-usage.sh
1 #!/bin/sh -e
2
3 gnt-cluster command -M lvs -o vg_name,name,size,tags --unit g --noheadings | grep -v '^return' | grep -v '^--*$' | tee /dev/shm/gnt-lvs.clean
4
5 echo "# total by inacnes (with replicas):"
6 cat /dev/shm/gnt-lvs.clean | awk -F ' ' '{a[$5] += $4} END{for (i in a) print i, a[i]}' | tee /dev/shm/lvs.instance.replicas
7
8 echo "# total by inacnes (without replicas):"
9 cat /dev/shm/gnt-lvs.clean | awk -F ' ' '{a[$5]  = $4} END{for (i in a) print i, a[i]}' | tee /dev/shm/lvs,instancs.data
10
11 echo "# total by nodes:"
12 cat /dev/shm/gnt-lvs.clean | awk -F ' ' '{a[$1] += $4} END{for (i in a) print i, a[i]}' | tee /dev/shm/lvs.nodes
13