disko/disk-deactivate/disk-deactivate
2024-03-13 09:58:33 +01:00

9 lines
267 B
Bash
Executable File

#!/usr/bin/env bash
set -efux -o pipefail
# dependencies: bash jq util-linux lvm2 mdadm zfs gnugrep
disk=$(realpath "$1")
lsblk -a -f >&2
lsblk --output-all --json | jq -r --arg disk_to_clear "$disk" -f "$(dirname "$0")/disk-deactivate.jq" | bash -x
lsblk -a -f >&2