From 0a28dd0348b94f40f6a061eee8103fa9a7026fa7 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 11 Jun 2019 08:39:29 -0500 Subject: [PATCH] doc/rados/operations: add safe-to-destroy check to OSD replacement workflow Signed-off-by: Sage Weil --- doc/rados/operations/add-or-rm-osds.rst | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/rados/operations/add-or-rm-osds.rst b/doc/rados/operations/add-or-rm-osds.rst index 90de75484653a..3361587acedb0 100644 --- a/doc/rados/operations/add-or-rm-osds.rst +++ b/doc/rados/operations/add-or-rm-osds.rst @@ -140,6 +140,10 @@ backend, for instance, for switching from FileStore to BlueStore, OSDs need to be replaced. Unlike `Removing the OSD`_, replaced OSD's id and CRUSH map entry need to be keep intact after the OSD is destroyed for replacement. +#. Make sure it is safe to destroy the OSD:: + + while ! ceph osd safe-to-destroy osd.{id} ; do sleep 10 ; done + #. Destroy the OSD first:: ceph osd destroy {id} --yes-i-really-mean-it @@ -151,7 +155,7 @@ need to be keep intact after the OSD is destroyed for replacement. #. Prepare the disk for replacement by using the previously destroyed OSD id:: - ceph-volume lvm prepare --osd-id {id} --data /dev/sdX + ceph-volume lvm prepare --osd-id {id} --data /dev/sdX #. And activate the OSD:: @@ -160,7 +164,7 @@ need to be keep intact after the OSD is destroyed for replacement. Alternatively, instead of preparing and activating, the device can be recreated in one call, like:: - ceph-volume lvm create --osd-id {id} --data /dev/sdX + ceph-volume lvm create --osd-id {id} --data /dev/sdX Starting the OSD -- 2.39.5