部署准备 - 宿主机配置
step1:
pid最大线程数
/etc/sysctl.conf
kernel.pid_max = 4194303
# sysctl -p
禁用swap
vm.swappiness=0
# sysctl -p
step2:
时钟同步
运维人员统一配置ntp server
step3:
用户
创建ceph用户
sudo useradd -d /home/ceph -m ceph
sudo passwd ceph
配置ceph用户权限
vim /etc/pam.d/su
auth sufficient pam_wheel.so trust use_uid
配置权限
# usermod -G wheel ceph
# echo "ceph ALL = (root) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/ceph
# chmod 0440 /etc/sudoers.d/ceph
配置ssh
# su - ceph
# ssh-keygen
# 配置 ~/.ssh/authorized_keys (在ceph0001机器的ceph用户的公钥粘贴进去)
# chmod 600 authorized_keys
step4:
安装CEPH
ceph-deploy install --release nautilus ceph8006 --repo-url http://10.27.22.6/ceph/rpm-nautilus/el7 --nogpgcheck
step5:
OSD扩容
HDD
/dev/sdc(根据实际情况修改)
ceph-deploy disk zap ceph8006 /dev/sdc
ceph-deploy osd create --data /dev/sdc ceph8006
ceph osd crush reweight osd.6 0
ceph osd in osd.6
# 根据实际情况调整weight
ceph osd crush reweight osd.6 0.3
SDD
/dev/sdd(根据实际情况修改)
ceph-deploy disk zap ceph8006 /dev/sdd
ceph-deploy osd create --data /dev/sdd ceph8006
ceph osd crush reweight osd.7 0
ceph osd crush rm-device-class osd.7
ceph osd crush set-device-class ssd osd.7
ceph osd in osd.7
# 根据实际情况调整weight
ceph osd crush reweight osd.7 0.3
Harbor专用tree
ceph osd crush add-bucket harbor root
Harbor独立节点
# 新建两个ceph存储节点及osd存储,假定为ceph0007和ceph0008
# 调整节点归属
ceph osd crush link ceph0007 root=harbor
ceph osd crush link ceph0008 root=harbor