安装
./configure --prefix=/usr/local/ceph --with-debug
// ./configure --with-tss --without-tcmalloc --with-debug
1. yum install yasm
2. configure: error: no tcmalloc found (use --without-tcmalloc to disable)
#wget https://gperftools.googlecode.com/files/gperftools-2.1.zip
#unzip gperftools-2.1.zip
#./configure
#make
#make install
wget http://download.savannah.gnu.org/releases/libunwind/libunwind-1.1.tar.gz
#./configure
#make
#make install
3.configure: error: libleveldb not found
wget https://leveldb.googlecode.com/files/leveldb-1.14.0.tar.gz
make
//cp libleveldb.* /usr/lib( 软连接不能直接拷贝)
tar -zcvf libleveldb.tgz libleveldb.*
cp libleveldb.tgz /usr/lib
cp -r include/leveldb /usr/local/include
#yum install -y libudev libudev-devel
4. cannot find -lboost_thread-mt
>> 方法一
ln -s libboost_thread.so.1.55.0 libboost_thread-mt.so
ln -s libboost_system.so.1.55.0 libboost_system-mt.so
>> 方法二
重新完整安装
./bjam --build-type=complete --layout=tagged
#make ceph
make -j 4 //n 选择为 ncpu + 1
编译cehp的时候 开多个线程 编译会快些
//单元测试
make check
5. ceph启动报错
[root@vm ceph]# ceph osd create
Traceback (most recent call last):
File "/usr/local/ceph/bin/ceph", line 53, in <module>
import argparse
ImportError: No module named argparse
下载解压python-pip.tgz
python setup.py install
pip install argparse
pip install rados
6. copy sample.*
7. mkdir -p /var/run/ceph
mkdir -p /var/log/ceph
8. cp src/pybin/*.py /usr/local/bin
8. cp ./src/init-ceph /etc/init.d/ceph
src
./mkcephfs -a -c /etc/ceph/ceph.conf --mkfs
./init-ceph -c /etc/ceph/ceph.conf -a start
ssh免验证
./init-ceph -a stop
/etc/ceph/ceph.conf是默认路径
[root@bogon init.d]# chkconfig --add ceph
[root@bogon init.d]# chkconfig --level 35 ceph on
[root@bogon init.d]# chkconfig --list ceph
/******************************* health_warn 解决 ************************/
[root@bogon data]# ceph health
HEALTH_WARN 576 pgs degraded; 576 pgs stuck unclean
ceph pg dump_stuck stale && ceph pg dump_stuck inactive && ceph pg dump_stuck unclean
HEALTH_WARN 384 pgs degraded; 384 pgs stuck unclean; recovery 21/42degraded (50.000%)
则说明osd数量不够,Ceph默认至少需要提供两个osd
/******************************* 测试上传一个对象 ************************/
准备一个test.txt文件然后利用rados上传
rados put {object-name} {file-path} --pool=data
#rados put test.txt test.txt --pool=data
查看上传的结果
#rados -p data ls (这里会列举pool中的对象名称)
查看对象的位置
ceph osd map {pool-name} {object-name}
#ceph osd map data test.txt
首先通过rados命令查看pool如下:
#rados lspools
#ceph osd pool set data min_size 1
//--------------------------------------
npm ERR! weird error 8
npm ERR! not ok code 0
make[1]: *** [build-stamp] 错误 1
make[1]: Leaving directory `/home/ceph/calamari/calamari-clients/manage'
make: *** [build-ui] 错误 2
//---------------------------------------
npm install --loglevel warn
npm WARN package.json
[email protected] No repository field.
//-------------监控
yum install rvm