|
| 1 | +Investigating a Failed Ceph Drive |
| 2 | +--------------------------------- |
| 3 | + |
| 4 | +After deployment, when a drive fails it may cause OSD crashes in Ceph. |
| 5 | +If Ceph detects crashed OSDs, it will go into `HEALTH_WARN` state. |
| 6 | +Ceph can report details about failed OSDs by running: |
| 7 | + |
| 8 | +.. code-block:: console |
| 9 | +
|
| 10 | + ceph# ceph health detail |
| 11 | +
|
| 12 | +A failed OSD will also be reported as down by running: |
| 13 | + |
| 14 | +.. code-block:: console |
| 15 | +
|
| 16 | + ceph# ceph osd tree |
| 17 | +
|
| 18 | +Note the ID of the failed OSD. |
| 19 | + |
| 20 | +The failed hardware device is logged by the Linux kernel: |
| 21 | + |
| 22 | +.. code-block:: console |
| 23 | +
|
| 24 | + storage-0# dmesg -T |
| 25 | +
|
| 26 | +Cross-reference the hardware device and OSD ID to ensure they match. |
| 27 | +(Using `pvs` and `lvs` may help make this connection). |
| 28 | + |
| 29 | +Removing a Failed Ceph Drive |
| 30 | +---------------------------- |
| 31 | + |
| 32 | +If a drive is verified dead, stop and eject the osd (eg. `osd.4`) |
| 33 | +from the cluster: |
| 34 | + |
| 35 | +.. code-block:: console |
| 36 | +
|
| 37 | + storage-0# systemctl stop ceph-osd@4.service |
| 38 | + storage-0# systemctl disable ceph-osd@4.service |
| 39 | + ceph# ceph osd out osd.4 |
| 40 | +
|
| 41 | +.. ifconfig:: deployment['ceph_ansible'] |
| 42 | + |
| 43 | + Before running Ceph-Ansible, also remove vestigial state directory |
| 44 | + from `/var/lib/ceph/osd` for the purged OSD, for example for OSD ID 4: |
| 45 | + |
| 46 | + .. code-block:: console |
| 47 | +
|
| 48 | + storage-0# rm -rf /var/lib/ceph/osd/ceph-4 |
| 49 | +
|
| 50 | +Remove Ceph OSD state for the old OSD, here OSD ID `4` (we will |
| 51 | +backfill all the data when we reintroduce the drive). |
| 52 | + |
| 53 | +.. code-block:: console |
| 54 | +
|
| 55 | + ceph# ceph osd purge --yes-i-really-mean-it 4 |
| 56 | +
|
| 57 | +Unset noout for osds when hardware maintenance has concluded - eg. |
| 58 | +while waiting for the replacement disk: |
| 59 | + |
| 60 | +.. code-block:: console |
| 61 | +
|
| 62 | + ceph# ceph osd unset noout |
| 63 | +
|
1 | 64 | Inspecting a Ceph Block Device for a VM |
2 | 65 | --------------------------------------- |
3 | 66 |
|
|
0 commit comments