ceph: on activation, skip already mounted OSDs

This commit is contained in:
Nico Schottelius 2021-09-12 07:42:39 +02:00
parent 9aaf1eb733
commit 2dcfce1035
1 changed files with 4 additions and 0 deletions

View File

@ -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")