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:
b3e5cfc
)
exit 1 on existing, verbose receive
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Thu, 26 Jun 2014 13:50:06 +0000
(15:50 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Thu, 26 Jun 2014 13:50:06 +0000
(15:50 +0200)
bin/adopt
patch
|
blob
|
history
diff --git
a/bin/adopt
b/bin/adopt
index
030a56c
..
f9c2a93
100755
(executable)
--- a/
bin/adopt
+++ b/
bin/adopt
@@
-2,6
+2,8
@@
. /usr/share/ganeti/extstorage/zfs/defaults.sh
. /usr/share/ganeti/extstorage/zfs/defaults.sh
+test -e /dev/zvol/$EXTP_ZFS/adopt && exit 1
+
zfs list -t snapshot -r -r $EXTP_ZFS -o name -H \
| iselect -p 1 -a -n 'adopt snapshot' \
zfs list -t snapshot -r -r $EXTP_ZFS -o name -H \
| iselect -p 1 -a -n 'adopt snapshot' \
-| xargs -i sh -cx 'zfs send -R {} | zfs receive '$EXTP_ZFS'/adopt && zfs set ganeti:originstname="`zfs get ganeti:originstname -o value -p -H {}`+adopt" '$EXTP_ZFS'/adopt && zfs set lv:a="-" '$EXTP_ZFS'/adopt'
+| xargs -i sh -cx 'zfs send -R {} | zfs receive
-v
'$EXTP_ZFS'/adopt && zfs set ganeti:originstname="`zfs get ganeti:originstname -o value -p -H {}`+adopt" '$EXTP_ZFS'/adopt && zfs set lv:a="-" '$EXTP_ZFS'/adopt'