fixed adopt tests - still need hand-holding
[ganeti-extstorage-zfs] / bin / adopt
1 #!/bin/sh
2
3 . /usr/share/ganeti/extstorage/zfs/defaults.sh
4
5 zfs list -t snapshot -r -r $EXTP_ZFS -o name -H \
6 | iselect -p 1 -a -n 'adopt snapshot' \
7 | 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'