Skip to content

Latest commit

 

History

History
40 lines (34 loc) · 1.2 KB

File metadata and controls

40 lines (34 loc) · 1.2 KB

cephos-disk-remove

Description

The cephos-disk-remove script removes a block device (OSD) from a Ceph cluster. It safely removes the OSD and purges all data from the device.

Options

  • -d <block_device>: Specify the block device to remove (e.g., /dev/sdb)
  • -h: Show this help message
  • -v: Enable verbose output

Examples

# Remove /dev/sdb from the cluster
cephos-disk-remove -d /dev/sdb

Attention

  1. Do not delete several disks in parallel
  2. Try not to delete disks while the cluster is actively working.

Functionality

  1. Validates that a block device is specified
  2. Checks if the block device exists and is valid
  3. Verifies that the block device is in use by Ceph
  4. Prompts for confirmation before proceeding
  5. Marks the OSD as out in the cluster
  6. Stops the OSD service
  7. Removes the OSD from the cluster
  8. Zaps the device to remove all Ceph data
  9. Purges the device

OSD Removal Process

  • Gets the OSD ID associated with the block device
  • Marks the OSD as out in the cluster
  • Stops the OSD service
  • Removes the OSD from the CRUSH map
  • Deletes OSD authentication keys
  • Removes the OSD from the cluster
  • Zaps the device to remove all Ceph data
  • Purges the device