diff --git a/lib/jeannie/commands.sh b/lib/jeannie/commands.sh index 67a7e84..3462679 100644 --- a/lib/jeannie/commands.sh +++ b/lib/jeannie/commands.sh @@ -3498,8 +3498,15 @@ EOF kubectl --kubeconfig "${kubeconfig}" -n "${namespace}" patch pvc "${pvc}" --type merge -p "{\"spec\":{\"resources\":{\"requests\":{\"storage\":\"${size}\"}}}}" ;; rebalance) + if (($# > 0)); then + echo "Storage rebalance accepts no mutation flags; it is intentionally plan-only." >&2 + return 2 + fi echo "Storage rebalance is plan-only: OpenEBS LocalPV volumes are node-local and cannot be moved safely by a generic command." kubectl --kubeconfig "${kubeconfig}" get pv -o wide 2>/dev/null || true + kubectl --kubeconfig "${kubeconfig}" get blockdevice -A \ + -o custom-columns='NAMESPACE:.metadata.namespace,NAME:.metadata.name,NODE:.spec.nodeAttributes.nodeName,CLAIMED:.status.claimState,SIZE:.spec.capacity.storage,STATE:.status.state' \ + 2>/dev/null || true echo "Use an explicit migration plan after identifying the owning workload and a target node." ;; *)