X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=gnt-rbd.sh;h=ec14d486dbd57e60f7a9691e0c9c01d3dcf7e317;hb=985e9c8ea3e02f40bffeca33275e0db76d1f3ea4;hp=ff966936f2f8fe0484153e4d625ae97b099da895;hpb=64b52a0af04a069a99ed445778ce45ca1b18661d;p=gnt-info diff --git a/gnt-rbd.sh b/gnt-rbd.sh index ff96693..ec14d48 100755 --- a/gnt-rbd.sh +++ b/gnt-rbd.sh @@ -9,8 +9,8 @@ gnt-instance list -o name,disk_template | grep ' rbd$' | cut -d' ' -f1 | while r fi done -grep --with-filename logical_id /dev/shm/instance/* | sed "s/^.*\///; s/:.*, '/ /; s/'.*$//;" | tee /dev/shm/instance-rbd | while read instance disk ; do +grep --with-filename 'logical_id.*rbd' /dev/shm/instance/* | sed "s/^.*\///; s/:.*, '/ /; s/'.*$//;" | tee /dev/shm/instance-rbd | while read instance disk ; do echo "$instance $disk" - rbd snap ls $disk | sed "s/^/# /" + rbd snap ls $disk | grep -v SNAPID | awk -v instance=$instance -v disk=$disk '{ print instance,disk"@"$2,"#"$1,$3,$4 }' done