From: Alfredo Deza Date: Thu, 6 Dec 2018 20:30:22 +0000 (-0500) Subject: doc/ceph-volume add zapping by osd-id examples X-Git-Tag: v12.2.11~10^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=362e2a524d4ea78d37bb9c86c17ae1efb84f0a06;p=ceph.git doc/ceph-volume add zapping by osd-id examples Signed-off-by: Alfredo Deza (cherry picked from commit f82304f4b5f5ecd865b6a208f894b59cec6386e2) --- diff --git a/doc/ceph-volume/lvm/zap.rst b/doc/ceph-volume/lvm/zap.rst index 2236ad4efbc4..367d7469308a 100644 --- a/doc/ceph-volume/lvm/zap.rst +++ b/doc/ceph-volume/lvm/zap.rst @@ -15,18 +15,51 @@ on the given lv or partition will be removed and all data will be purged. Zapping a logical volume:: - ceph-volume lvm zap {vg name/lv name} + ceph-volume lvm zap {vg name/lv name} Zapping a partition:: - ceph-volume lvm zap /dev/sdc1 + ceph-volume lvm zap /dev/sdc1 -If you are zapping a raw device or partition and would like any vgs or lvs created -from that device removed use the ``--destroy`` flag. A common use case is to simply -deploy OSDs using a whole raw device. If you do so and then wish to reuse that device for -another OSD you must use the ``--destroy`` flag when zapping so that the vgs and lvs that -ceph-volume created on the raw device will be removed. +Removing Devices +---------------- +When zapping, and looking for full removal of the device (lv, vg, or partition) +use the ``--destroy`` flag. A common use case is to simply deploy OSDs using +a whole raw device. If you do so and then wish to reuse that device for another +OSD you must use the ``--destroy`` flag when zapping so that the vgs and lvs +that ceph-volume created on the raw device will be removed. + +.. note:: Multiple devices can be accepted at once, to zap them all Zapping a raw device and destroying any vgs or lvs present:: - ceph-volume lvm zap /dev/sdc --destroy + ceph-volume lvm zap /dev/sdc --destroy + + +This action can be performed on partitions, and logical volumes as well:: + + ceph-volume lvm zap /dev/sdc1 --destroy + ceph-volume lvm zap osd-vg/data-lv --destroy + + +Finally, multiple devices can be detected if filtering by OSD ID and/or OSD +FSID. Either identifier can be used or both can be used at the same time. This +is useful in situations where multiple devices associated with a specific ID +need to be purged. When using the FSID, the filtering is stricter, and might +not match other (possibly invalid) devices associated to an ID. + +By ID only:: + + ceph-volume lvm zap --destroy --osd-id 1 + +By FSID:: + + ceph-volume lvm zap --destroy --osd-fsid 2E8FBE58-0328-4E3B-BFB7-3CACE4E9A6CE + +By both:: + + ceph-volume lvm zap --destroy --osd-fsid 2E8FBE58-0328-4E3B-BFB7-3CACE4E9A6CE --osd-id 1 + + +.. warning:: If the systemd unit associated with the OSD ID to be zapped is + detected as running, the tool will refuse to zap until the daemon is stopped.