alte OSD's aus Ceph löschen

aGro

Active Member
Feb 22, 2021
92
6
28
46
Proxmox-Version 8.4.1

Bei einem unserer Server hatte sich die Boot-Disk verabschiedet, worauf er sich nicht mehr starten ließ. Daraufhin hatte ich den Node komplett aus dem Cluster entfernt und habe auch die OSD's übers GUI entfernt. Nachdem ich eine neue Boot-Disk erstellt habe und anschließend den Node wieder ins Cluster integriert habe, sehe ich im Ceph-Dashboard noch 6 OSD's ,die down sein sollen. In der OSD-Übersicht werden sie aber nicht angezeigt. Ich hatte es schon mit ceph osd crush rm osd.xx probiert, da existiert die OSD aber nicht mehr.
Wie bekomme ich die OSD's aus dem Ceph gelöscht?
 
Es gibt eine Anleitung um Nodes aus dem Cluster zu entfernen. Bist du die schon durchgegangen? Z.B. die Ceph.conf angepasst?
 
Die Node ist nicht das Problem....diese ist sauber entfernt....die wird auch nirgends mehr angezeigt. Es sind einzig und allein 6 OSD's, die auch nur im Ceph-Dashboard als down angezeigt werden.
Die Ceph.conf ist auch angepasst.
 
Wenn die nur down sind, sind die OSDs denn in? Hast du die Disks gewiped bevor du den Host in den Cluster aufgenommen hast?
 
Ja ich hatte die Disks gewiped. Danach den Raid auf dem Server platt gemacht und nochmal komplett neu konfiguriert.
 
Um das Problem mal bildlich darzustellen....(die eine Platte, die down ist bitte ignorieren)
1747142269485.png
Die 6 OSD, die hier als Out gekennzeichnet werden, gibt es im unteren Bild nicht, weil ich diese damals ordnungsgemäß entfernt habe.

1747142210912.png
Der pve04 ist der Server, den ich wieder neu ins Cluster geholt habe und auch da sieht man bei den OSD's, dass der Zähler nicht bei osd.12 weiterzählte, sondern erst bei 18. Die 6 dazwischen sind noch irgendwo im System hinterlegt.
 
Code:
root@wsg-pve04:/var/log/ceph# ceph osd tree
ID  CLASS  WEIGHT    TYPE NAME           STATUS  REWEIGHT  PRI-AFF
-1         27.83563  root default                                 
-3          9.82434      host wsg-pve03                           
 0    hdd   1.63739          osd.0           up   1.00000  1.00000
 1    hdd   1.63739          osd.1           up   1.00000  1.00000
 2    hdd   1.63739          osd.2           up   1.00000  1.00000
 3    hdd   1.63739          osd.3           up   1.00000  1.00000
 4    hdd   1.63739          osd.4           up   1.00000  1.00000
 5    hdd   1.63739          osd.5           up   1.00000  1.00000
-7          8.18695      host wsg-pve04                           
18    hdd   1.63739          osd.18          up   1.00000  1.00000
19    hdd   1.63739          osd.19          up   1.00000  1.00000
20    hdd   1.63739          osd.20          up   1.00000  1.00000
21    hdd   1.63739          osd.21          up   1.00000  1.00000
22    hdd   1.63739          osd.22        down   1.00000  1.00000
-5          9.82434      host wsg-pve05                           
 6    hdd   1.63739          osd.6           up   1.00000  1.00000
 7    hdd   1.63739          osd.7           up   1.00000  1.00000
 8    hdd   1.63739          osd.8           up   1.00000  1.00000
 9    hdd   1.63739          osd.9           up   1.00000  1.00000
10    hdd   1.63739          osd.10          up   1.00000  1.00000
11    hdd   1.63739          osd.11          up   1.00000  1.00000
12                0  osd.12                down         0  1.00000
13                0  osd.13                down         0  1.00000
14                0  osd.14                down         0  1.00000
15                0  osd.15                down         0  1.00000
16                0  osd.16                down         0  1.00000
17                0  osd.17                down         0  1.00000

Der Artikel hilft mir leider nicht weiter. Man sieht im osd tree die sechs alten Platten.
Wie bekommt man diese gelöscht?
 
ceph osd out osd.3
# Warten, bis Cluster wieder HEALTH_OK ist
systemctl stop ceph-osd@3
ceph osd crush remove osd.3
ceph auth del osd.3
ceph osd rm osd.3

ich habe ein wenig recherchiert - hast du das hier schon mal probiert ob du hier zu einem Ergebniss kommst. osd dementsprechend anpassen
 
Die OSD's gehörten zu keiner Node mehr, weil es die Node nicht mehr gibt. Von daher brauche ich wohl auch nicht rebooten ;)

Hat evtl. jemand noch eine Idee was mit der osd.22 sein könnte. Im iLO wird diese Platte nicht als defekt angezeigt. Im Ceph ist diese aber down. Im log zu der Platte steht dieses...

Code:
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:        Options.write_buffer_size: 16777216
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:  Options.max_write_buffer_number: 64
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:          Options.compression: LZ4
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:                  Options.bottommost_compression: Disabled
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:       Options.prefix_extractor: nullptr
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:   Options.memtable_insert_with_hint_prefix_extractor: nullptr
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:             Options.num_levels: 7
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:        Options.min_write_buffer_number_to_merge: 6
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:     Options.max_write_buffer_number_to_maintain: 0
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:     Options.max_write_buffer_size_to_maintain: 0
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:            Options.bottommost_compression_opts.window_bits: -14
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:                  Options.bottommost_compression_opts.level: 32767
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:               Options.bottommost_compression_opts.strategy: 0
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:         Options.bottommost_compression_opts.max_dict_bytes: 0
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:         Options.bottommost_compression_opts.zstd_max_train_bytes: 0
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:         Options.bottommost_compression_opts.parallel_threads: 1
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:                  Options.bottommost_compression_opts.enabled: false
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:         Options.bottommost_compression_opts.max_dict_buffer_bytes: 0
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:         Options.bottommost_compression_opts.use_zstd_dict_trainer: true
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:            Options.compression_opts.window_bits: -14
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:                  Options.compression_opts.level: 32767
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:               Options.compression_opts.strategy: 0
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:         Options.compression_opts.max_dict_bytes: 0
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:         Options.compression_opts.zstd_max_train_bytes: 0
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:         Options.compression_opts.use_zstd_dict_trainer: true
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:         Options.compression_opts.parallel_threads: 1
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:                  Options.compression_opts.enabled: false
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:         Options.compression_opts.max_dict_buffer_bytes: 0
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:      Options.level0_file_num_compaction_trigger: 8
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:          Options.level0_slowdown_writes_trigger: 20
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:              Options.level0_stop_writes_trigger: 36
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:                   Options.target_file_size_base: 67108864
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:             Options.target_file_size_multiplier: 1
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:                Options.max_bytes_for_level_base: 1073741824
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb: Options.level_compaction_dynamic_level_bytes: 0
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:          Options.max_bytes_for_level_multiplier: 8.000000
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb: Options.max_bytes_for_level_multiplier_addtl[0]: 1
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb: Options.max_bytes_for_level_multiplier_addtl[1]: 1
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb: Options.max_bytes_for_level_multiplier_addtl[2]: 1
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb: Options.max_bytes_for_level_multiplier_addtl[3]: 1
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb: Options.max_bytes_for_level_multiplier_addtl[4]: 1
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb: Options.max_bytes_for_level_multiplier_addtl[5]: 1
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb: Options.max_bytes_for_level_multiplier_addtl[6]: 1
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:       Options.max_sequential_skip_in_iterations: 8
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:                    Options.max_compaction_bytes: 1677721600
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:   Options.ignore_max_compaction_bytes_for_input: true
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:                        Options.arena_block_size: 1048576
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:   Options.soft_pending_compaction_bytes_limit: 68719476736
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:   Options.hard_pending_compaction_bytes_limit: 274877906944
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:                Options.disable_auto_compactions: 0
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:                        Options.compaction_style: kCompactionStyleLevel
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:                          Options.compaction_pri: kMinOverlappingRatio
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb: Options.compaction_options_universal.size_ratio: 1
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb: Options.compaction_options_universal.min_merge_width: 2
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb: Options.compaction_options_universal.max_merge_width: 4294967295
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb: Options.compaction_options_universal.max_size_amplification_percent: 200
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb: Options.compaction_options_universal.compression_size_percent: -1
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb: Options.compaction_options_universal.stop_style: kCompactionStopStyleTotalSize
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb: Options.compaction_options_fifo.max_table_files_size: 1073741824
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb: Options.compaction_options_fifo.allow_compaction: 0
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:                   Options.table_properties_collectors: CompactOnDeletionCollector (Sliding window size >
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:                   Options.inplace_update_support: 0
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:                 Options.inplace_update_num_locks: 10000
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:               Options.memtable_prefix_bloom_size_ratio: 0.000000
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:               Options.memtable_whole_key_filtering: 0
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:   Options.memtable_huge_page_size: 0
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:                           Options.bloom_locality: 0
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:                    Options.max_successive_merges: 0
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:                Options.optimize_filters_for_hits: 0
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:                Options.paranoid_file_checks: 0
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:                Options.force_consistency_checks: 1
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:                Options.report_bg_io_stats: 0
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:                               Options.ttl: 2592000
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:          Options.periodic_compaction_seconds: 0
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:  Options.preclude_last_level_data_seconds: 0
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:    Options.preserve_internal_time_seconds: 0
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:                       Options.enable_blob_files: false
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:                           Options.min_blob_size: 0
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:                          Options.blob_file_size: 268435456
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:                   Options.blob_compression_type: NoCompression
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:          Options.enable_blob_garbage_collection: false
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:      Options.blob_garbage_collection_age_cutoff: 0.250000
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb: Options.blob_garbage_collection_force_threshold: 1.000000
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:          Options.blob_compaction_readahead_size: 0
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb:                Options.blob_file_starting_level: 0
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb: Options.experimental_mempurge_threshold: 0.000000
2025-05-12T13:41:52.965+0200 7e096d237840  4 rocksdb: [db/db_impl/db_impl.cc:3106] Created column family [p-0] (ID 4)
2025-05-12T13:41:52.971+0200 7e096d237840  2 rocksdb: [db/column_family.cc:578] Failed to register data paths of column family (id: 5, name: p-1)
2025-05-12T13:41:52.971+0200 7e096d237840  4 rocksdb: [db/column_family.cc:630] --------------- Options for column family [p-1]:

2025-05-12T13:41:52.971+0200 7e096d237840  4 rocksdb:               Options.comparator: leveldb.BytewiseComparator
2025-05-12T13:41:52.971+0200 7e096d237840  4 rocksdb:           Options.merge_operator: None
2025-05-12T13:41:52.971+0200 7e096d237840  4 rocksdb:        Options.compaction_filter: None
2025-05-12T13:41:52.971+0200 7e096d237840  4 rocksdb:        Options.compaction_filter_factory: None
2025-05-12T13:41:52.971+0200 7e096d237840  4 rocksdb:  Options.sst_partitioner_factory: None
2025-05-12T13:41:52.971+0200 7e096d237840  4 rocksdb:         Options.memtable_factory: SkipListFactory
2025-05-12T13:41:52.971+0200 7e096d237840  4 rocksdb:         Options.memtable_factory: SkipListFactory
2025-05-12T13:41:52.971+0200 7e096d237840  4 rocksdb:            Options.table_factory: BlockBasedTable
2025-05-12T13:41:52.971+0200 7e096d237840  4 rocksdb:            table_factory options:   flush_block_policy_factory: FlushBlockBySizePolicyFactory (0x63197f>
  cache_index_and_filter_blocks: 1
  cache_index_and_filter_blocks_with_high_priority: 0
  pin_l0_filter_and_index_blocks_in_cache: 0
  pin_top_level_index_and_filter: 1
  index_type: 0
  data_block_index_type: 0
  index_shortening: 1
  data_block_hash_table_util_ratio: 0.750000
  checksum: 4
  no_block_cache: 0
  block_cache: 0x63197f1fa850
  block_cache_name: BinnedLRUCache
  block_cache_options:
    capacity : 483183820
    num_shard_bits : 4
    strict_capacity_limit : 0
    high_pri_pool_ratio: 0.000
  block_cache_compressed: (nil)
  persistent_cache: (nil)
  block_size: 4096
  block_size_deviation: 10
  block_restart_interval: 16
  index_block_restart_interval: 1
  metadata_block_size: 4096
  partition_filters: 0
  use_delta_encoding: 1
  filter_policy: bloomfilter
  whole_key_filtering: 1
  verify_compression: 0
  read_amp_bytes_per_bit: 0
  format_version: 5
  enable_index_compression: 1
  block_align: 0
  max_auto_readahead_size: 262144
  prepopulate_block_cache: 0
  initial_auto_readahead_size: 8192
  num_file_reads_for_auto_readahead: 2

Vielleicht kann jemand hier einen Fehler herauslesen?
 
Irgendwie hat der Probleme um den Dienst richtig zu starten (bluestore)

Hast du schon mal probiert die OSD nochmals herauszunehmen, das System Replizieren zu lassen und wenn wieder alles grün ist die OSD wieder hinzuzufügen?
 
Down bedeutet der Deamon läuft nicht. Out Bedeutet Disk ist defekt oder offline. Also guck mal warum der Dienst nicht startet, sonst OSD removen und neu adden.
 
Ich habe die OSD entfernt und im Anschluss versucht, die OSD wieder neu hinzuzufügen. Beim Erstellen kam aber diese Fehlermeldung

ceph-volume lvm create --data /dev/sdf failed exit code 1
Nun habe ich etwas gesucht und ein paar Lösungen gefunden, wo User in einer Python-Datei ProgramCode hinzugefügt haben. Das ist mir aber ehrlich gesagt zu heiß.
Dann war noch eine Lösung mit ceph-volume lvm zap /dev/sdf --destroy. Das wurde erfolgreich ausgeführt aber nun sind alle OSD's auf der Node down und Out. Ein Neustart hat da leider auch nichts gebracht.
lsblk zeigt dies...

Code:
root@wsg-pve04:~# lsblk
NAME                                                                                                  MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda                                                                                                     8:0    0 238.4G  0 disk
├─sda1                                                                                                  8:1    0  1007K  0 part
├─sda2                                                                                                  8:2    0     1G  0 part /boot/efi
└─sda3                                                                                                  8:3    0 237.4G  0 part
  ├─pve-swap                                                                                          252:4    0     8G  0 lvm  [SWAP]
  ├─pve-root                                                                                          252:5    0  69.4G  0 lvm  /
  ├─pve-data_tmeta                                                                                    252:6    0   1.4G  0 lvm 
  │ └─pve-data                                                                                        252:8    0 141.2G  0 lvm 
  └─pve-data_tdata                                                                                    252:7    0 141.2G  0 lvm 
    └─pve-data                                                                                        252:8    0 141.2G  0 lvm 
sdb                                                                                                     8:16   0   1.6T  0 disk
└─ceph--7f56eafe--ee05--4e61--8068--5f755486ab74-osd--block--dccd74c2--c62d--4b65--8676--b4f44321f5b9 252:0    0   1.6T  0 lvm 
sdc                                                                                                     8:32   0   1.6T  0 disk
└─ceph--11ba6551--dbc3--4e6c--8b7c--0ef94564f343-osd--block--8de302c3--e7c6--4b56--915f--67a621f198a2 252:1    0   1.6T  0 lvm 
sdd                                                                                                     8:48   0   1.6T  0 disk
└─ceph--cda39aeb--e849--4f40--92ca--2b1d3f4380d3-osd--block--6434c349--21a3--4fed--a6da--e51d91067e95 252:3    0   1.6T  0 lvm 
sde                                                                                                     8:64   0   1.6T  0 disk
└─ceph--d0ae9439--e240--4ffd--b144--15c68867f71a-osd--block--0a7510d0--8027--4cc7--8a96--8bbb0373bd20 252:2    0   1.6T  0 lvm 
sdf

sdf ist die besagte Platte, die nicht mehr hinzugefügt werden kann.
Wie bekomme ich alle Platten auf der Node wieder online und wie kann ich die sdf-Platte als OSD wieder hinzufügen?
 
Ok, die restlichen OSD's sind inzwischen wieder online. Aber meine letzte Platte sdf kann nach wie vor nicht hinzugefügt werden.
1747210879308.png
Hat jemand dafür eine Lösung?
 
Noch ein Update....bei der Erstellung der OSD über die CLI bekomme ich folgende Fehlermeldung

Code:
root@wsg-pve04:~# pveceph osd create /dev/sdf
create OSD on /dev/sdf (bluestore)
wiping block device /dev/sdf
/dev/sdf: 8 bytes were erased at offset 0x00000200 (gpt): 45 46 49 20 50 41 52 54
/dev/sdf: 8 bytes were erased at offset 0x1a32bd35e00 (gpt): 45 46 49 20 50 41 52 54
/dev/sdf: 2 bytes were erased at offset 0x000001fe (PMBR): 55 aa
/dev/sdf: calling ioctl to re-read partition table: Success
200+0 records in
200+0 records out
209715200 bytes (210 MB, 200 MiB) copied, 0.371214 s, 565 MB/s
Running command: /bin/ceph-authtool --gen-print-key
Running command: /bin/ceph --cluster ceph --name client.bootstrap-osd --keyring /var/lib/ceph/bootstrap-osd/ceph.keyring -i - osd new 052b72a0-1783-460d-9a43-c416f0b01963
 stderr: 2025-05-14T10:32:58.744+0200 7be7404506c0 -1 auth: unable to find a keyring on /etc/pve/priv/ceph.client.bootstrap-osd.keyring: (2) No such file or directory
 stderr: 2025-05-14T10:32:58.744+0200 7be7404506c0 -1 AuthRegistry(0x7be738064298) no keyring found at /etc/pve/priv/ceph.client.bootstrap-osd.keyring, disabling cephx
 stderr: Error EEXIST: entity osd.12 exists but key does not match
-->  RuntimeError: Unable to create a new OSD id
command 'ceph-volume lvm create --data /dev/sdf' failed: exit code 1

Die osd.12 ist eine der OSD's, die ich gestern gelöscht habe, weil es diese nicht mehr gibt. Irgendwie ist sie auf der Platte aber noch hinterlegt, obwohl ich die Platte (dev/sdf) über die GUI formatiert habe.
 
Ok, ich konnte das Problem lösen
ceph auth del osd.12 hat geholfen. Nun konnte die OSD wieder erstellt werden.