安装过程中整理的相关文档和rpms包下载连接:
http://download.csdn.net/detail/skdkjxy/8192825
centOS 7修改hostname
localectl set-locale LANG=要修改的语言
hostnamectl set-hostname 你要修改到的hostname
0.87源码安装配置问题汇总
./configure
ceph 0.87源码安装后,./configure
yum -y install libuuid*
yum -y install libblkid-devel
yum -y install libudev-devel
yum -y install keyutils-libs-devel[libkeyutils notfound]
rpm -ivhcryptopp-5.6.2-2.el6.x86_64.rpm
rpm -ivhcryptopp-devel-5.6.2-2.el6.x86_64.rpm[no suitable cryptolibrary found]
yum -y install fuse-devel [no FUSE found (use --without-fuse todisable)]
安装gperftools-2.1.tar.gz(ftp://ftp.fr.freebsd.org/mirrors/rsync.frugalware.org/frugalware-current/source/devel-extra/gperftools/gperftools-2.1.tar.gz) [no tcmalloc found (use --without-tcmalloc todisable)]
rpm –ivhleveldb-1.7.0-2.el6.x86_64.rpm
rpm –ivhleveldb-devel-1.7.0-2.el6.x86_64.rpm[libevel-db not found]
rpm down siteàhttp://ceph.com/rpm/el6/x86_64/
yum –y install libaio-devel [laio not found]
yum -y install libedit-devel[No usable version of libedit found.]
yum -y install libatomic_ops-devel[no libatomic-ops found (use --without-libatomic-opsto disable)]
yum -y install snappy-devel[libsnappy not found]
yum -y install xfsprogs-devel[xfs/xfs.h not found (--without-libxfs to disable)]
yum -y install boost* ["Can't find boost spirit headers"]
mkcephfs问题
0.82之后,就没有mkcephfs命令了
方法一:需要编译安装0.80.1,在0.80.1的src下面执行mkcephfs
方法二:如果只是拷贝之前mkcephfs到/sbin下面,执行mkcephfs,则会输出/usr/local/bin/ceph-osd:error while loading shared libraries: libtcmalloc.so.4: cannot open sharedobject file: No such file or directory
解决方式:
echo /usr/local/lib> /etc/ld.so.conf.d/libtcmalloc.conf
ldconfig
service ceph启动问题
1、service ceph提示说没有
进入0.87的src,执行cp –rdpf init-ceph/etc/init.d/ceph
2、如果执行service ceph 提示:The service command supports only basic LSB actions (start, stop, restart,try-restart, reload, force-reload, status). For other actions, please try touse systemctl.
解决方式:新建/lib/lsb,从别的节点拷贝/lib/lsb/init-functions到/lib/lsb/即可
3、如果执行service ceph 启动时提示/etc/init.d/ceph: line 490:ceph-disk: command not found
执行cp -rfdp/usr/local/sbin/ceph-* /sbin/
ceph -s
启动后ceph -s提示找不到rados
解决方式:
[root@node66 ~]# cp -rfdp/usr/local/lib/python2.7/site-packages/* /usr/lib64/python2.7/
ceph-fuse挂载
挂载不成功现象:被卡住,无法进行
ceph-fuse -c /root/ceph.conf/mnt/ceph
2014-11-10 14:03:39.108960 7f287b161780 -1ceph-fuse[26142]: starting ceph client
init, newargv = 0x4455750 newargc=11
解决方式:
rados df应该有3个池子。所以手动建立metadata和data
ceph osd pool create metadata 256 256
pool 'metadata' created
cephosd pool create data 256 256
pool 'data' created
cephfs new filesystemNew metadata data
new fs with metadata pool 1 and data pool 2
即可正常挂载
挂载成功后,mdsmap出现
附录:ceph.conf
{//begin
[global]
# authcluster required = cephx
# authservice required = cephx
# authclient required = cephx
auth supported = none
# osd crush chooseleaf type = 0
osd pool default size = 1
[mon]
# mon data =/home/inspur/data/skdkjzz/$name
mon data = /data/$name
[mon.a]
host = skdkjzz-inspur
mon addr = 100.2.1.56:6789
[mds.a]
host = skdkjzz-inspur
[osd]
#osddata = /home/inspur/data/skdkjzz/$name
osd data = /data/$name
osd crush update on start = 0
osd mkfs type = xfs
osd mkfs options xfs = -f
osd mount options xfs =rw,noatime
[osd.0]
host = skdkjzz-inspur
devs = /dev/vg_ceph/lv_osd1
osd journal = /dev/vg_ceph/lv_jour1
[osd.1]
host = skdkjzz-inspur
devs = /dev/vg_ceph/lv_osd2
osd journal = /dev/vg_ceph/lv_jour2
}//end
注:
1、 文档中rpm包在目录rpms中可以找到
2、 文档中init-functions以及mkcephfs在目录tools中可以找到
3、 文档中ceph最小配置文件ceph.conf在目录tools中可以找到
4、 文档中tcmalloc源码安装包在目录rpms可以找到