blob: 6a75f50763eb3cc56e497e037e66fb3fbc8a8517 [file] [log] [blame]
Matthias Andreas Benkard05e482e2026-11-04 11:05:51 +01001#!/bin/sh
2# Unmounts (but keeps) the PV's ZFS dataset. Runs in the host's mount
3# namespace; see setup.sh.
4set -eu
5
Matthias Andreas Benkardea839162026-11-04 20:47:43 +01006absolutePath=${VOL_DIR:-}
Matthias Andreas Benkard05e482e2026-11-04 11:05:51 +01007while getopts "m:s:p:" opt
8do
9 case $opt in
10 p)
11 absolutePath=$OPTARG
12 ;;
13 s)
14 sizeInBytes=$OPTARG
15 ;;
16 m)
17 volMode=$OPTARG
18 ;;
19 esac
20done
Matthias Andreas Benkardea839162026-11-04 20:47:43 +010021[ -n "$absolutePath" ] || { echo "teardown: no volume path given" >&2; exit 1; }
Matthias Andreas Benkard05e482e2026-11-04 11:05:51 +010022
23nsenter -t 1 -m -- zfs set mountpoint=none "rpool${absolutePath}"