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

View file

@ -9,6 +9,10 @@ tmpdir=$(mktemp -d)
# XFS based partition scheme # XFS based partition scheme
for dev in $(fdisk -l | awk '$6 ~/Ceph/ { print $1 }'); do 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" mount "$dev" "$tmpdir"
id=$(cat "${tmpdir}/whoami") id=$(cat "${tmpdir}/whoami")