【个人记录】Ceph添加OSD

目标

  • 1.已存在Ceph集群
  • 2.添加node1盘 /dev/nvme1n1 /dev/nvme2n1进入ceph集群

步骤

  • 1.格式化磁盘
ceph-deploy disk zap node1 /dev/nvme1n1 /dev/nvme2n1
  • 2.添加磁盘到osd
ceph-deploy osd create --data /dev/nvme1n1 node1
ceph-deploy osd create --data /dev/nvme2n1 node1
  • 3.修改存储规则
#!/bin/bash
DATE=$(date +%Y-%m-%d-%H-%M-%S)
ceph osd getcrushmap -o /etc/ceph/crushmap-$DATE
crushtool -d /etc/ceph/crushmap-$DATE > /etc/ceph/decrushmap-$DATE
vi /etc/ceph/decrushmap-$DATE
crushtool -c /etc/ceph/decrushmap-$DATE -o /etc/ceph/newcrushmap-$DATE
ceph osd setcrushmap -i /etc/ceph/newcrushmap-$DATE
  • 4.查看是否生效
ceph osd tree

你可能感兴趣的:(ceph集群,文件系统,Linux,ceph)