How to build Ceph storage on CentOS7

Standard

Initialization

set disabled in /etc/selinux/config

yum update -y
yum install ntp -y

systemctl disable NetworkManager
sysetmctl disable firewalld
systemctl enable ntpd
systemctl start ntpd

BUILD PREREQUISITES (optional)

yum install make automake autoconf boost-devel fuse-devel gcc-c++ libtool libuuid-devel libblkid-devel keyutils-libs-devel cryptopp-devel fcgi-devel libcurl-devel expat-devel gperftools-devel libedit-devel libatomic_ops-devel snappy-devel leveldb-devel libaio-devel xfsprogs-devel git libudev-devel

 

Setup CEPH

yum install epel-release -y
yum install ceph ceph-deploy -y

ssh-copy-id ceph1
#(repeat the command for each Ceph node, like ceph2, ceph3 and so on…)

mkdir /root/ceph_config
cd /root/ceph_config

#on mngt node or primary monitor node.
ceph-deploy new ceph1 ceph2 ceph3

#install ceph software on node.
ceph-deploy -v install ceph1 ceph2 ceph3

#initial monitors and gather the keys. This will place the keys into your ceph-deploy directory.
ceph-deploy mon create-initial

#Define the admin node (in this case is ceph1 node)
ceph-deploy admin ceph1 ceph2 ceph3

#Prepare the disks and add osd to the cluster
#ceph-deploy -v osd create [osd_node:[disk(data):[disk(journal)]]
for i in ceph1 ceph2 ceph3; 
do
ceph-deploy -v osd create $i:sdb --zap;
done

 

Testing

ceph status
ceph osd lspools
ceph health
ceph osd tree
#check client.
ceph osd crush dump --format=json-pretty 
#check conf and status
ceph osd dump --format=json-pretty 
ceph-deploy disk list osd0

#Prepare for testing
yum install -y https://ceph.com/rpm-testing/rhel7/x86_64/kmod-libceph-3.10-0.1.20140702gitdc9ac62.el7.x86_64.rpm
yum install -y https://ceph.com/rpm-testing/rhel7/x86_64/kmod-rbd-3.10-0.1.20140702gitdc9ac62.el7.x86_64.rpm

#Mount RBD
modprobe rbd

For mount RBD to CentOS7 [Link]

 

 

 

REF:
http://blog.domb.net/?p=986
http://karan-mj.blogspot.fi/2013/12/ceph-storage-part-2.html
http://blog.zhaw.ch/icclab/deploy-ceph-and-start-using-it-end-to-end-tutorial-installation-part-13/
http://www.jamescoyle.net/how-to/1244-create-a-3-node-ceph-storage-cluster
http://www.virtualtothecore.com/en/adventures-ceph-storage-part-4-deploy-the-nodes-in-the-lab/
http://ceph.com/docs/master/rados/deployment/ceph-deploy-osd/
http://blog.mit.bme.hu/meszaros/en/unix/ceph-rbd-client
http://www.server-world.info/en/note?os=CentOS_6&p=ceph&f=2

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *