From 2a300157b58faccd7f26eefe75ac5cbc532a60b2 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 5 Sep 2021 11:48:00 +0200 Subject: [PATCH] Use ceph-volume activate --all --- ceph/ceph-osd-activate-all | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/ceph/ceph-osd-activate-all b/ceph/ceph-osd-activate-all index 2765e93..0ed7a0f 100755 --- a/ceph/ceph-osd-activate-all +++ b/ceph/ceph-osd-activate-all @@ -28,10 +28,18 @@ for dev in $(fdisk -l | awk '$6 ~/Ceph/ { print $1 }'); do fi done -# LVM based -for osdid in $(lvs -o lv_tags | grep ceph.block_device| sed -e 's/.*ceph.osd_id=//' -e 's/,.*//'); do - ceph-volume lvm activate --no-systemd $osdid - /opt/ungleich-tools/monit-ceph-create-start "osd.$osdid" -done +# LVM based / manual does not work atm: +# + grep ceph.block_device +# + sed -e s/.*ceph.osd_id=// -e s/,.*// +# + ceph-volume lvm activate --no-systemd 112 +# --> UnboundLocalError: local variable 'tags' referenced before assignment + +#for osdid in $(lvs -o lv_tags | grep ceph.block_device| sed -e 's/.*ceph.osd_id=//' -e 's/,.*//'); do +# ceph-volume lvm activate --no-systemd $osdid +# /opt/ungleich-tools/monit-ceph-create-start "osd.$osdid" +#done + +# Using this with a fake /bin/systemctl +ceph-volume lvm activate --all rmdir "$tmpdir"