| Matthias Andreas Benkard | 05e482e | 2026-11-04 11:05:51 +0100 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | # Unmounts (but keeps) the PV's ZFS dataset. Runs in the host's mount | ||||
| 3 | # namespace; see setup.sh. | ||||
| 4 | set -eu | ||||
| 5 | |||||
| 6 | while getopts "m:s:p:" opt | ||||
| 7 | do | ||||
| 8 | case $opt in | ||||
| 9 | p) | ||||
| 10 | absolutePath=$OPTARG | ||||
| 11 | ;; | ||||
| 12 | s) | ||||
| 13 | sizeInBytes=$OPTARG | ||||
| 14 | ;; | ||||
| 15 | m) | ||||
| 16 | volMode=$OPTARG | ||||
| 17 | ;; | ||||
| 18 | esac | ||||
| 19 | done | ||||
| 20 | |||||
| 21 | nsenter -t 1 -m -- zfs set mountpoint=none "rpool${absolutePath}" | ||||