# ceph 初始化
cephadm bootstrap --mon-ip $ip --cluster-network 10.90.90.0/24
# 查看可用设备
ceph orch device ls
# osd 预期
ceph orch apply osd --all-available-devices --dry-run
# osd 关闭自动发现
ceph orch apply osd --all-available-devices --unmanaged=truerue
# osd 开启自动发现
ceph orch apply osd --all-available-devices
# 查看所有osd
ceph orch ps
# 优化osd 内存消耗
ceph config set mgr mgr/cephadm/autotune_memory_target_ratio 0.2
ceph config set osd osd_memory_target_autotune true
# osd 操作 https://docs.ceph.com/en/quincy/cephadm/services/osd/#cephadm-deploy-osds
# 开关 dashboard 模块
ceph mgr module enable dashboard
ceph mgr module disable dashboard
# 关闭dashboard ssl
ceph config set mgr mgr/dashboard/ssl false
# 自定义 dashboard ip:port
ceph config set mgr mgr/dashboard/server_addr $ip
ceph config set mgr mgr/dashboard/server_port $port
# 查看mgr svc
ceph mgr services
# 创建dashboard 用户密码
ceph dashboard ac-user-create admin -i pd.key administrator
# 更改admin 用户密码
ceph dashboard ac-user-set-password admin -i pd.key
# 查看mgr 模块
ceph mgr module ls
ceph mgr module enable rgw
# ceph crash ls
# ceph crash archive-all
# 创建pool
ceph osd pool create rbd 512 512
# 更改pg数量
ceph osd pool set rbd pg_num 512
# 查看pool 容量
ceph df
ceph osd pool get-quota rgw
# 更改配额
ceph osd pool set-quota rdb 5000 150G