ceph J版与Xenserver6.5集成

集成原理

1
2
3
4
5
6
7
8
9
+-----------+
| |
| |
| | +-- ISCSI SR ----+
| XenServer | +---------+ | | +------------+
| | ------> |SR Driver| -----+-- NFS SR ----+-----| XenCenter |
| | +---------+ | | +------------+
| | +-- RBD SR ----+
+-----------+ ( Fork ISCSI SR)

步骤

1. 搭建ceph J版集群

详细请见:

2. 调整ceph集群crush tunables与XenServer内核匹配

针对XenServer6.5,需要调整crush tunables 为 bobtail

1
ceph osd crush tunables bobtail

查看更改

1
ceph osd crush show-tunables

3. 创建ceph rbd块设备

  • 为了保证快设备可映射、可快照、可克隆,必须使用format 2
  • ceph J版必须指定feature 为 layering
  • 快设备名称必须使用uuid(不带“-”分隔)
1
2
uuidgen | sed 's/-//g'     # 生成无“-”分隔符的rbd名称
rbd create --size {size} {rbd名称} --image-feature layering

4. XenServer节点安装RBDSR patch

详细请见:
RBDSR README

5. 使用XenCenter创建SR

同上

注意

  • ceph J版 开始抛弃KRBD
  • ceph J版 tunables会引发集群告警“crush map has legacy tunables (require bobtail, min is firefly)”(可忽略)
  • 创建rbd快设备必须使用format 2 格式,否则不能正常映射(map)
  • ceph J版 rbd格式feature中只能包含layering,不能包含其他feature,否则不能正常映射(map)

参考&鸣谢