blob: 6a75f50763eb3cc56e497e037e66fb3fbc8a8517 [file] [log] [blame]
#!/bin/sh
# Unmounts (but keeps) the PV's ZFS dataset. Runs in the host's mount
# namespace; see setup.sh.
set -eu
absolutePath=${VOL_DIR:-}
while getopts "m:s:p:" opt
do
case $opt in
p)
absolutePath=$OPTARG
;;
s)
sizeInBytes=$OPTARG
;;
m)
volMode=$OPTARG
;;
esac
done
[ -n "$absolutePath" ] || { echo "teardown: no volume path given" >&2; exit 1; }
nsenter -t 1 -m -- zfs set mountpoint=none "rpool${absolutePath}"