Ceph: 使用 QEMU-UTILS 对 RBD 实例进行快照

shan

快速提示,执行 RBD 镜像的完整快照。(只有 MtG 玩家才能认出这张图片!)

bash $ qemu-img convert -O raw rbd:<pool>/<rbd-images> <destination-snapshot-file>

qemu-img 工具支持多个参数

  • 如果您想使用特定用户进行身份验证,可以使用:id=<username>
  • 如果您想指向特定的 Ceph 配置文件,可以使用:conf=/etc/ceph/ceph.conf

显然,您的 ceph.conf 具有一个专门的部分,指向用户密钥文件(其中文件包含密钥)

[client.leseb]
    keyring = /etc/ceph/ceph.client.leseb.keyring

最后说明,每个选项都用 : 分隔,因此这将为您提供例如

bash $ qemu-img convert -O raw rbd:instances/vmdisk01:id=leseb:conf=/etc/ceph/ceph-leseb.conf /tmp/snap