4 test -e $dir || mkdir $dir
6 gnt-instance list -o name,disk_template | grep ' rbd$' | cut -d' ' -f1 | while read instance ; do
7 if [ ! -e $dir/$instance ] ; then
8 gnt-instance info $instance | tee > $dir/$instance
12 grep --with-filename 'logical_id.*rbd' /dev/shm/instance/* | sed "s/^.*\///; s/:.*, '/ /; s/'.*$//;" | tee /dev/shm/instance-rbd | while read instance disk ; do
13 echo "$instance $disk"
14 rbd snap ls $disk | grep -v SNAPID | awk -v instance=$instance -v disk=$disk '{ print instance,disk"@"$2,"#"$1,$3,$4 }'