ceph-disk: support osd removal / ceph-disk remove
There should be a ceph-disk remove to cleanup an OSD and the associated device / directory. This is not something a system administrator would want to do on a production system because Ceph supports removing the device associated the OSD without the need to notify the cluster and it probably explains why it has not been implemented.
However, in the context of integration testing or debuging puppet, chef, etc. being able to reliably reset a device without nuking the machine is helpful.
Without explicit support from ceph-disk, it is possible but fragile because the logic to determine if a device contains a particular OSD file system is coded in ceph-disk and not easily accessible.
#2 Updated by Travis Rhoden over 4 years ago
- Status changed from New to In Progress
- Assignee set to Travis Rhoden
Current plan is to add two new sub-commands: "deactivate" and "destroy".
Deactivate is intended to mirror activate, so that they can be run in succession with each other and maintain a working OSD.
Destroy will undefine the disk from the cluster, and optionally zap the disk.
#3 Updated by Wei-Chung Cheng over 4 years ago
I just want to mention one thing about the zap subcommand.
Sometimes I will hit some problem with zap subcommand and need to try again
(It means use zap sub command twice for cleanup.)
Should we make this problem clearer?
(I will record the error log next time I hit this problem.)