From: Dobrica Pavlinusic Date: Tue, 24 Jun 2014 23:16:12 +0000 (+0200) Subject: begin work on gnt-instance move X-Git-Url: http://git.rot13.org/?p=ganeti-extstorage-zfs;a=commitdiff_plain;h=3ea7fc206c2d91e6ffc0ceeef916f1b0b75d4aa5;ds=sidebyside begin work on gnt-instance move --- diff --git a/sbin/pvs b/sbin/pvs new file mode 100755 index 0000000..3571ea3 --- /dev/null +++ b/sbin/pvs @@ -0,0 +1,14 @@ +#!/bin/sh + +. /usr/share/ganeti/extstorage/zfs/defaults.sh + +/sbin/lvm pvs $* + +# pvs --noheadings --nosuffix --units=m --unbuffered '--separator=|' -opv_name,vg_name,pv_free,pv_attr,pv_size,pv_name + +if echo $* | grep -q pv_name,vg_name,pv_free,pv_attr,pv_size,pv_name ; then + + zfs list $EXTP_ZFS -H -p -o avail,used | sed "s:$EXTP_ZFS::" | awk '{ print " '$EXTP_ZFS'|'$EXTP_VG'|" $1 / 1024 / 1024 "|a--|" ( $1 + $2 ) / 1024 / 1024 "|'$EXTP_ZFS'" }' + +fi +