projects
/
ganeti-extstorage-zfs
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d4feff1
)
begin work on gnt-instance move
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Tue, 24 Jun 2014 23:16:12 +0000
(
01:16
+0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Tue, 24 Jun 2014 23:16:12 +0000
(
01:16
+0200)
sbin/pvs
[new file with mode: 0755]
patch
|
blob
diff --git a/sbin/pvs
b/sbin/pvs
new file mode 100755
(executable)
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
+