笔者在使用ceph做块存储应用时,让KVM虚拟机中虚拟的硬盘使用ceph存储,ceph搭建步骤不再累赘,本文主要是做一个错误解决的记录过程。
在客户机安装好ceph客户端环境,软件包为ceph-common
,命令正常安装,软件可以。但笔者在为虚拟机创建磁盘镜像时,报了以下错误:
➜ ~ rbd create vm2-image --image-feature layering --size 10G
rbd: strict_strtoll: garbage at end of string. got: '10G'
第一时间在网上查阅资料,并没有找到相关的解决方案,在这种情况下,只能尝试着自己找出问题所在了。
查看ceph-common
软件的安装过程历史:
➜ ~ yum -y install ceph-common
已加载插件:fastestmirror, langpacks
base | 3.6 kB 00:00
elrepo | 2.9 kB 00:00
epel/x86_64/metalink | 6.2 kB 00:00
epel | 3.2 kB 00:00
extras | 3.4 kB 00:00
rhel7 | 4.1 kB 00:00
updates | 3.4 kB 00:00
(1/2): epel/x86_64/updateinfo | 932 kB 00:01
(2/2): epel/x86_64/primary | 3.5 MB 00:02
Loading mirror speeds from cached hostfile
* elrepo: repos.lax-noc.com
* epel: mirrors.sohu.com
epel 12587/12587
正在解决依赖关系
--> 正在检查事务
---> 软件包 ceph-common.x86_64.1.0.94.5-2.el7 将被 安装
--> 正在处理依赖关系 python-rbd = 1:0.94.5-2.el7,它被软件包 1:ceph-common-0.94.5-2.el7.x86_64 需要
--> 正在处理依赖关系 python-rados = 1:0.94.5-2.el7,它被软件包 1:ceph-common-0.94.5-2.el7.x86_64 需要
--> 正在处理依赖关系 hdparm,它被软件包 1:ceph-common-0.94.5-2.el7.x86_64 需要
--> 正在检查事务
---> 软件包 hdparm.x86_64.0.9.43-5.el7 将被 安装
---> 软件包 python-rados.x86_64.1.0.94.5-2.el7 将被 安装
---> 软件包 python-rbd.x86_64.1.0.94.5-2.el7 将被 安装
--> 解决依赖关系完成
依赖关系解决
==========================================================================
Package 架构 版本 源 大小
==========================================================================
正在安装:
ceph-common x86_64 1:0.94.5-2.el7 base 6.2 M
为依赖而安装:
hdparm x86_