3 . /usr/share/ganeti/extstorage/zfs/defaults.sh
5 # lvrename ffzgvg cc9b16d9-7d14-452a-9150-74521bd8e721.disk0 d275c91f-70a7-4270-972c-b020fde9580b.disk0_data
7 if [ "$EXTP_VG" = "$1" ] ; then
8 # delete snapshots which can't be renamed
10 zfs rename $EXTP_ZFS/$2 $EXTP_ZFS/$3 || (
11 # rename filesystems with snapshots using clone/promote
12 zfs snap $EXTP_ZFS/$2@$3
13 zfs clone $EXTP_ZFS/$2@$3 $EXTP_ZFS/$3
14 zfs promote $EXTP_ZFS/$3 # new zvol is now origin
15 zfs destroy -R $EXTP_ZFS/$3@$3