done
if [ $stop_all -eq 1 ]; then
- if "${CEPH_BIN}"/rbd device list -c $conf_fn >/dev/null 2>&1; then
- "${CEPH_BIN}"/rbd device list -c $conf_fn | tail -n +2 |
+ if "${CEPH_BIN}"/rbd device list -c $conf_fn --no-mon-config >/dev/null 2>&1; then
+ "${CEPH_BIN}"/rbd device list -c $conf_fn --no-mon-config | tail -n +2 |
while read DEV; do
# While it is currently possible to create an rbd image with
# whitespace chars in its name, krbd will refuse mapping such
# same goes for whitespace chars in names of the pools that
# contain rbd images).
DEV="$(echo "${DEV}" | tr -s '[:space:]' | awk '{ print $5 }')"
- sudo "${CEPH_BIN}"/rbd device unmap "${DEV}" -c $conf_fn
+ sudo "${CEPH_BIN}"/rbd device unmap "${DEV}" -c $conf_fn --no-mon-config
done
- if [ -n "$("${CEPH_BIN}"/rbd device list -c $conf_fn)" ]; then
+ if [ -n "$("${CEPH_BIN}"/rbd device list -c $conf_fn --no-mon-config)" ]; then
echo "WARNING: Some rbd images are still mapped!" >&2
fi
fi