Удаление osd в proxmox ceph osdmap
osds exist in the crush map but not in the osdmap если есть запись в логе ceph значит остались в CRUSH map не удалённые osd
# devices
device 0 osd.0 class hdd
device 1 osd.1 class hdd
device 2 device.2 class hdd <-----
device 3 osd.3 class hdd
device 4 osd.4 class hdd
device 5 device.5 class hdd <-----
Чтобы их удалить не с веб интерфейса proxmox не получится так как нету доступа к физическому устройству и через командную строку не получится вся карта находится в временем файле /tmp/crushmap есть способ его выгрузить в файл отредактировать и загрузить обратно в /tmp/crushmap
Вот моя карта которая была crushmap для примера
# begin crush map
tunable choose_local_tries 0
tunable choose_local_fallback_tries 0
tunable choose_total_tries 50
tunable chooseleaf_descend_once 1
tunable chooseleaf_vary_r 1
tunable chooseleaf_stable 1
tunable straw_calc_version 1
tunable allowed_bucket_algs 54
# devices
device 0 osd.0 class hdd
device 2 device.2 class hdd
device 1 osd.1 class hdd
device 3 osd.3 class hdd
device 4 osd.4 class hdd
device 5 device.5 class hdd
# types
type 0 osd
type 1 host
type 2 chassis
type 3 rack
type 4 row
type 5 pdu
type 6 pod
type 7 room
type 8 datacenter
type 9 zone
type 10 region
type 11 root
# buckets
host WebFeo {
id -3 # do not change unnecessarily
id -4 class hdd # do not change unnecessarily
# weight 1.365
alg straw2
hash 0 # rjenkins1
item osd.0 weight 0.455
item osd.3 weight 0.910
}
host WebFeo2 {
id -5 # do not change unnecessarily
id -6 class hdd # do not change unnecessarily
# weight 1.365
alg straw2
hash 0 # rjenkins1
item osd.1 weight 0.455
item osd.4 weight 0.910
}
host WebFeo3 {
id -3 # do not change unnecessarily
id -4 class hdd # do not change unnecessarily
# weight 1.365
alg straw2
hash 0 # rjenkins1
item osd.2 weight 0.455
item osd.5 weight 0.910
}
host webfeo {
id -9 # do not change unnecessarily
id -10 class hdd # do not change unnecessarily
# weight 0.000
alg straw2
hash 0 # rjenkins1
}
host webfeo2 {
id -11 # do not change unnecessarily
id -12 class hdd # do not change unnecessarily
# weight 0.000
alg straw2
hash 0 # rjenkins1
}
root default {
id -1 # do not change unnecessarily
id -2 class hdd # do not change unnecessarily
# weight 2.728
alg straw2
hash 0 # rjenkins1
item WebFeo weight 1.364
item WebFeo2 weight 1.364
item webfeo weight 0.000
item webfeo2 weight 0.000
}
# rules
rule replicated_rule {
id 0
type replicated
min_size 1
max_size 10
step take default
step chooseleaf firstn 0 type host
step emit
}
# end crush map
Выгружаем его этими командами
~# ceph osd getcrushmap -o /tmp/crushmap
~# crushtool -d /tmp/crushmap -o crush_map
Появится выгруженный конфиг crushmap
Редактируем его crushmap
# begin crush map
tunable choose_local_tries 0
tunable choose_local_fallback_tries 0
tunable choose_total_tries 50
tunable chooseleaf_descend_once 1
tunable chooseleaf_vary_r 1
tunable chooseleaf_stable 1
tunable straw_calc_version 1
tunable allowed_bucket_algs 54
# devices
device 0 osd.0 class hdd
device 1 osd.1 class hdd
device 3 osd.3 class hdd
device 4 osd.4 class hdd
# types
type 0 osd
type 1 host
type 2 chassis
type 3 rack
type 4 row
type 5 pdu
type 6 pod
type 7 room
type 8 datacenter
type 9 zone
type 10 region
type 11 root
# buckets
host WebFeo {
id -3 # do not change unnecessarily
id -4 class hdd # do not change unnecessarily
# weight 1.365
alg straw2
hash 0 # rjenkins1
item osd.0 weight 0.455
item osd.3 weight 0.910
}
host WebFeo2 {
id -5 # do not change unnecessarily
id -6 class hdd # do not change unnecessarily
# weight 1.365
alg straw2
hash 0 # rjenkins1
item osd.1 weight 0.455
item osd.4 weight 0.910
}
host webfeo {
id -9 # do not change unnecessarily
id -10 class hdd # do not change unnecessarily
# weight 0.000
alg straw2
hash 0 # rjenkins1
}
host webfeo2 {
id -11 # do not change unnecessarily
id -12 class hdd # do not change unnecessarily
# weight 0.000
alg straw2
hash 0 # rjenkins1
}
root default {
id -1 # do not change unnecessarily
id -2 class hdd # do not change unnecessarily
# weight 2.728
alg straw2
hash 0 # rjenkins1
item WebFeo weight 1.364
item WebFeo2 weight 1.364
item webfeo weight 0.000
item webfeo2 weight 0.000
}
# rules
rule replicated_rule {
id 0
type replicated
min_size 1
max_size 10
step take default
step chooseleaf firstn 0 type host
step emit
}
# end crush map
Я удалил умерший сервер и диски которые были на этом сервере.
Копируем отредактированный конфиг обратно
~# crushtool -c crush_map -o /tmp/crushmap
~# ceph osd setcrushmap -i /tmp/crushmap
После этого если все правильно слали должен запуститься процесс восстановления, и теперь устройства-призраки исчезли.

Частично помог материл с сайта