Fix create-block-db-symlink to use activate-osd volume

Use the OSD-specific activate-osd volume mount instead of rook-data
parent directory. Multiple old OSD dirs exist on each node and the
script was creating the symlink in the wrong (stale LVM) directory.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Scooby Husky
2026-03-10 22:25:31 -05:00
co-authored by Claude Opus 4.6
parent 550ee8fd13
commit e1960d7071
@@ -61,19 +61,18 @@ spec:
exit 0
fi
echo "BlueStore label found on /dev/sdb"
# Find OSD data directory under rook data path
for d in /var/lib/rook/rook-ceph/*/; do
if [ -L "$d/block" ]; then
ln -sf /dev/sdb "$d/block.db"
echo "Created block.db -> /dev/sdb in $d"
break
fi
done
# Use activate-osd mount (OSD-specific data directory)
if [ -e "/osd-data/block" ]; then
ln -sf /dev/sdb /osd-data/block.db
echo "Created block.db -> /dev/sdb in /osd-data/"
else
echo "No block device found in /osd-data/, skipping"
fi
securityContext:
privileged: true
runAsUser: 0
volumeMounts:
- name: rook-data
mountPath: /var/lib/rook
- name: activate-osd
mountPath: /osd-data
- name: devices
mountPath: /dev