From 4ca17edf61f2368f8479ef2eea01d4f0bb2852a0 Mon Sep 17 00:00:00 2001 From: Pim van Pelt Date: Sun, 19 Nov 2023 17:06:49 +0000 Subject: [PATCH] Assume vol0 on the hypervisors, not ssd-vol0 --- README.md | 4 ++-- command | 4 ++-- create | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index ba2d6d0..a1db41a 100644 --- a/README.md +++ b/README.md @@ -36,11 +36,11 @@ will watch this replication endpoint, and if they see new snapshots arrive, they do an incremental pull of the data to their own ZFS filesystem as a snapshot. Old/current running labs will not be disrupted, as they will be cloned off of old snapshots. -You will find the image as `ssd-vol0/hvn0.chbtl0.ipng.ch/ssd-vol0/vpp-proto-disk0`: +You will find the image as `vol0/hvn0.chbtl0.ipng.ch/ssd-vol0/vpp-proto-disk0`: ``` lab:~$ ssh -A root@hvn0.lab.ipng.ch 'zfs list -t snap' NAME USED AVAIL REFER MOUNTPOINT -ssd-vol0/hvn0.chbtl0.ipng.ch/ssd-vol0/vpp-proto-disk0@20221013-release 0B - 6.04G - +vol0/hvn0.chbtl0.ipng.ch/ssd-vol0/vpp-proto-disk0@20221013-release 0B - 6.04G - ``` ## Install diff --git a/command b/command index 2933789..97997a2 100755 --- a/command +++ b/command @@ -27,7 +27,7 @@ for VM in $VMS; do echo "[$VM] Destroying VM" ssh root@$HVN "/usr/bin/virsh list --all | grep $VM.*running >/dev/null && virsh destroy $VM" echo "[$VM] Rolling VM back to pristine snapshot" - ssh root@$HVN "zfs rollback ssd-vol0/${VM}@pristine" + ssh root@$HVN "zfs rollback vol0/${VM}@pristine" ;; start|shutdown) echo "[$VM] Sending $CMD to VM" @@ -37,7 +37,7 @@ for VM in $VMS; do echo "[$VM] Destroying VM" ssh root@$HVN "/usr/bin/virsh list --all | grep $VM.*running >/dev/null && virsh destroy $VM" echo "[$VM] Destroying ZFS image" - ssh root@$HVN "zfs destroy -r ssd-vol0/$VM" + ssh root@$HVN "zfs destroy -r vol0/$VM" ;; esac done diff --git a/create b/create index 9411e7e..a04fc3d 100755 --- a/create +++ b/create @@ -15,7 +15,7 @@ ## * Unmount the staging directories ## * Start the VMs -BASE=${BASE:=ssd-vol0/hvn0.chbtl0.ipng.ch/ssd-vol0/vpp-proto-bookworm-disk0@20231015-release} +BASE=${BASE:=vol0/hvn0.chbtl0.ipng.ch/ssd-vol0/vpp-proto-bookworm-disk0@20231015-release} BUILD=${BUILD:=frr} LAB=${LAB:=0} @@ -33,13 +33,13 @@ VMS=$(ls -1 build/${BUILD}/${HVN}/) for VM in $VMS; do echo "[$VM] Cloning base" - ssh root@$HVN "mkdir -p $STAGING/$VM; zfs clone $BASE ssd-vol0/$VM" + ssh root@$HVN "mkdir -p $STAGING/$VM; zfs clone $BASE vol0/$VM" echo "[$VM] Mounting in staging" - ssh root@$HVN "mount /dev/zvol/ssd-vol0/$VM-part1 $STAGING/$VM" + ssh root@$HVN "mount /dev/zvol/vol0/$VM-part1 $STAGING/$VM" echo "[$VM] Rsyncing build" rsync -aIcg build/$BUILD/$HVN/$VM/ root@${HVN}:$STAGING/$VM/ echo "[$VM] Running lab-build snippets" ssh root@$HVN "cd $STAGING/$VM; for s in root/lab-build/*; do chroot $STAGING/$VM /bin/bash /\$s; done" echo "[$VM] Unmounting and snapshotting pristine state" - ssh root@$HVN "umount $STAGING/$VM; zfs snapshot ssd-vol0/${VM}@pristine" + ssh root@$HVN "umount $STAGING/$VM; zfs snapshot vol0/${VM}@pristine" done