Enabling client.admin keyring and conf on hosts with "admin" label Enabling autotune for osd_memory_target You can access the Ceph CLI as following in case of multi-cluster or non-default config:
Welcome to fdisk (util-linux 2.34). Changes will remain in memory only, until you decide to write them. Be careful before using the write command.
Command (m for help): d Selected partition 1 Partition 1 has been deleted.
Command (m for help): M The size of this disk is 3.7 TiB (4000225165312 bytes). DOS partition table format cannot be used on drives for volumes larger than 2199023255040 bytes for 512-byte sectors. Use GUID partition table format (GPT).
Entering protective/hybrid MBR disklabel.
Command (m for help): d Selected partition 1 Partition 1 has been deleted.
# ceph orch device ls HOST PATH TYPE DEVICE ID SIZE AVAILABLE REFRESHED REJECT REASONS hostname1.cn /dev/sdb hdd PERC_H730P_Adp_64cd98f0a4fe92002d9812401ca4d590 3725G 13m ago Has a FileSystem, Insufficient space (<10 extents) on vgs, LVM detected hostname1.cn /dev/sdc hdd PERC_H730P_Adp_64cd98f0a4fe92002d9812411cad387a 3725G 13m ago Has a FileSystem, Insufficient space (<10 extents) on vgs, LVM detected hostname1.cn /dev/sdd hdd PERC_H730P_Adp_64cd98f0a4fe92002d9812411cb598f5 3725G 13m ago Has a FileSystem, Insufficient space (<10 extents) on vgs, LVM detected hostname1.cn /dev/sde hdd PERC_H730P_Adp_64cd98f0a4fe92002d9812421cbe4684 3725G 13m ago Has a FileSystem, Insufficient space (<10 extents) on vgs, LVM detected hostname1.cn /dev/sdf hdd PERC_H730P_Adp_64cd98f0a4fe92002d9812421cc767e2 3725G 13m ago Has a FileSystem, Insufficient space (<10 extents) on vgs, LVM detected hostname1.cn /dev/sdg hdd PERC_H730P_Adp_64cd98f0a4fe92002d9812431cd0b398 3725G 13m ago Has a FileSystem, Insufficient space (<10 extents) on vgs, LVM detected hostname1.cn /dev/sdh hdd PERC_H730P_Adp_64cd98f0a4fe92002d9812441cda2290 3725G 13m ago Has a FileSystem, Insufficient space (<10 extents) on vgs, LVM detected hostname1.cn /dev/sdi hdd PERC_H730P_Adp_64cd98f0a4fe92002d9812441ce4722d 3725G 13m ago Has a FileSystem, Insufficient space (<10 extents) on vgs, LVM detected hostname1.cn /dev/sdj hdd PERC_H730P_Adp_64cd98f0a4fe92002d9812451cee4fc2 3725G 13m ago Has a FileSystem, Insufficient space (<10 extents) on vgs, LVM detected hostname1.cn /dev/sdk hdd PERC_H730P_Adp_64cd98f0a4fe92002d9812461cf96559 3725G 13m ago Has a FileSystem, Insufficient space (<10 extents) on vgs, LVM detected hostname1.cn /dev/sdl hdd PERC_H730P_Adp_64cd98f0a4fe92002d9812461d039ab1 3725G 13m ago Has a FileSystem, Insufficient space (<10 extents) on vgs, LVM detected hostname1.cn /dev/sdm hdd PERC_H730P_Adp_64cd98f0a4fe92002d9812471d0ef7ce 3725G 13m ago Has a FileSystem, Insufficient space (<10 extents) on vgs, LVM detected hostname3.cn /dev/sdb hdd INSPUR_66c92bf0009ec3eb2d9811ff1b1354c2 3725G 12m ago Has a FileSystem, Insufficient space (<10 extents) on vgs, LVM detected hostname3.cn /dev/sdc hdd INSPUR_66c92bf0009ec3eb2d9812001b25f78d 3725G 12m ago Has a FileSystem, Insufficient space (<10 extents) on vgs, LVM detected hostname3.cn /dev/sdd hdd INSPUR_66c92bf0009ec3eb2d9812011b38cbe8 3725G 12m ago Has a FileSystem, Insufficient space (<10 extents) on vgs, LVM detected hostname3.cn /dev/sde hdd INSPUR_66c92bf0009ec3eb2d9812021b4d8768 3725G 12m ago Has a FileSystem, Insufficient space (<10 extents) on vgs, LVM detected hostname3.cn /dev/sdf hdd INSPUR_66c92bf0009ec3eb2d9812041b62310e 3725G 12m ago Has a FileSystem, Insufficient space (<10 extents) on vgs, LVM detected hostname3.cn /dev/sdg hdd INSPUR_66c92bf0009ec3eb2d9812051b7746ef 3725G 12m ago Has a FileSystem, Insufficient space (<10 extents) on vgs, LVM detected hostname3.cn /dev/sdh hdd INSPUR_66c92bf0009ec3eb2d9812061b8caf37 3725G 12m ago Has a FileSystem, Insufficient space (<10 extents) on vgs, LVM detected hostname3.cn /dev/sdi hdd INSPUR_66c92bf0009ec3eb2d9812081ba28dbc 3725G 12m ago Has a FileSystem, Insufficient space (<10 extents) on vgs, LVM detected hostname3.cn /dev/sdj hdd INSPUR_66c92bf0009ec3eb2d9812091bb84081 3725G 12m ago Has a FileSystem, Insufficient space (<10 extents) on vgs, LVM detected hostname3.cn /dev/sdk hdd INSPUR_66c92bf0009ec3eb2d98120b1bce9925 3725G 12m ago Has a FileSystem, Insufficient space (<10 extents) on vgs, LVM detected hostname3.cn /dev/sdl hdd INSPUR_66c92bf0009ec3eb2d98120c1be6c00c 3725G 12m ago Has a FileSystem, Insufficient space (<10 extents) on vgs, LVM detected hostname3.cn /dev/sdm hdd INSPUR_66c92bf0009ec3eb2d98120e1bfd630f 3725G 12m ago Has a FileSystem, Insufficient space (<10 extents) on vgs, LVM detected hostname2.cn /dev/sdb hdd MR-SAS3316_6f80f41ffa0bf0002d9812131b8c06ee 3725G 12m ago Has a FileSystem, Insufficient space (<10 extents) on vgs, LVM detected hostname2.cn /dev/sdc hdd MR-SAS3316_6f80f41ffa0bf0002d9812151ba5248b 3725G 12m ago Has a FileSystem, Insufficient space (<10 extents) on vgs, LVM detected hostname2.cn /dev/sdd hdd MR-SAS3316_6f80f41ffa0bf0002d9812171bbf19a8 3725G 12m ago Has a FileSystem, Insufficient space (<10 extents) on vgs, LVM detected hostname2.cn /dev/sde hdd MR-SAS3316_6f80f41ffa0bf0002d9812181bd9ada6 3725G 12m ago Has a FileSystem, Insufficient space (<10 extents) on vgs, LVM detected hostname2.cn /dev/sdf hdd MR-SAS3316_6f80f41ffa0bf0002d98121a1bf376a0 3725G 12m ago Has a FileSystem, Insufficient space (<10 extents) on vgs, LVM detected hostname2.cn /dev/sdg hdd MR-SAS3316_6f80f41ffa0bf0002d98121c1c10625c 3725G 12m ago Has a FileSystem, Insufficient space (<10 extents) on vgs, LVM detected hostname2.cn /dev/sdh hdd MR-SAS3316_6f80f41ffa0bf0002d98121e1c2c99c2 3725G 12m ago Has a FileSystem, Insufficient space (<10 extents) on vgs, LVM detected hostname2.cn /dev/sdi hdd MR-SAS3316_6f80f41ffa0bf0002d9812201c4a1b2d 3725G 12m ago Has a FileSystem, Insufficient space (<10 extents) on vgs, LVM detected hostname2.cn /dev/sdj hdd MR-SAS3316_6f80f41ffa0bf0002d9812221c667a2d 3725G 12m ago Has a FileSystem, Insufficient space (<10 extents) on vgs, LVM detected hostname2.cn /dev/sdk hdd MR-SAS3316_6f80f41ffa0bf0002d9812231c83366c 3725G 12m ago Has a FileSystem, Insufficient space (<10 extents) on vgs, LVM detected hostname2.cn /dev/sdl hdd MR-SAS3316_6f80f41ffa0bf0002d9812251ca09452 3725G 12m ago Has a FileSystem, Insufficient space (<10 extents) on vgs, LVM detected hostname2.cn /dev/sdm hdd MR-SAS3316_6f80f41ffa0bf0002d9812281cc1119d 3725G 12m ago Has a FileSystem, Insufficient space (<10 extents) on vgs, LVM detected
结果没问题,这里 AVAILABLE 列为空,REJECT REASONS 列显示 “Has a FileSystem, Insufficient space (<10 extents) on vgs, LVM detected”,指的就是这个设备已经给 OSD 用上了。
到这里 OSD 的基本配置就完成了。
2.6.5. 启用 libstoragemgmt (可选)
如果我们执行:
1
ceph orch device ls --wide
可能会看到这样的结果:
1 2 3 4 5
# ceph orch device ls --wide HOST PATH TYPE TRANSPORT RPM DEVICE ID SIZE HEALTH IDENT FAULT AVAILABLE REFRESHED REJECT REASONS ... tj5-s1-v6-tj5-128473-2yqgrsr3.kscn /dev/sdg hdd PERC_H730P_Adp_64cd98f0a4fe92002d9812431cd0b398 3725G N/A N/A 24m ago Has a FileSystem, Insufficient space (<10 extents) on vgs, LVM detected ...
Path | SCSI VPD 0x83 | Link Type | Serial Number | Health Status ---------------------------------------------------------------------------- /dev/sda | 50000396082ba631 | SAS | 15P0A0R0FRD6 | Good /dev/sdb | 50000396082bbbf9 | SAS | 15P0A0YFFRD6 | Good ...
如果结果形如(Link Type 是 No Support,Health Status 列是 Unknown),则不兼容:
1 2 3 4 5
Path | SCSI VPD 0x83 | Link Type | Serial Number | Health Status ----------------------------------------------------------------------------------------------------------- /dev/sda | 64cd98f0a4fe92002d9812391c3489f3 | No Support | 00f389341c3912982d0092fea4f098cd | Unknown /dev/sdb | 64cd98f0a4fe92002d9812401ca4d590 | No Support | 0090d5a41c4012982d0092fea4f098cd | Unknown ...
如果兼容,我们可以启用 libstoragemgmt:
1
ceph config set mgr mgr/cephadm/device_enhanced_scan true