#!/bin/sh set -e ORGA=$1 usage() { printf "usage: %s \n" $0 } # check if we where correctly called [ $# != 1 ] && usage && exit 1 # remove storage from storage pool pveum pool modify "${ORGA}" --storage "${ORGA}-images" --delete # remove proxmox storage object pvesm remove "${ORGA}-images" # nuke zfs filesystem with isos and backups zfs destroy rpool/customer/${ORGA}-images # delete resource pool for the organisation pveum pool delete "${ORGA}" # delete group pveum group delete "${ORGA}"