From 2dcfce10353942478fadda401320e7ba6715f49f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 12 Sep 2021 07:42:39 +0200 Subject: [PATCH] ceph: on activation, skip already mounted OSDs --- ceph/ceph-osd-activate-all | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ceph/ceph-osd-activate-all b/ceph/ceph-osd-activate-all index 8f696de..4a69fa0 100755 --- a/ceph/ceph-osd-activate-all +++ b/ceph/ceph-osd-activate-all @@ -9,6 +9,10 @@ tmpdir=$(mktemp -d) # XFS based partition scheme for dev in $(fdisk -l | awk '$6 ~/Ceph/ { print $1 }'); do + if mount | grep ^$dev ; then + echo Skipping $dev, already mounted + continue + fi mount "$dev" "$tmpdir" id=$(cat "${tmpdir}/whoami")