Ubuntu安装Ceph

We regularly build debian packages for both the stable and unstable versions. To apt-get install ceph, you need to update /etc/apt/sources.list to include one of the blocks below.

Packages should be PGP signed by my public key, available at http://newdream.net/~sage/pubkey.asc

For the stable version (generally, the last full release):

deb http://ceph.newdream.net/debian/ lenny ceph-stable
deb-src http://ceph.newdream.net/debian/ lenny ceph-stable

Or, for the latest testing release (a recent snapshot from git that includes just bug fixes)

deb http://ceph.newdream.net/debian/ lenny ceph-testing
deb-src http://ceph.newdream.net/debian/ lenny ceph-testing

Or, for the unstable version (a recent snapshot of git with the bleeding edge):

deb http://ceph.newdream.net/debian/ lenny ceph-unstable
deb-src http://ceph.newdream.net/debian/ lenny ceph-unstable

Note that 'lenny' can be replaced with any debian dist: lenny, squeeze, sid, or an alias (stable, unstable, testing).

First make sure your apt-get may read .bz2 compressed files. This works for Debian Lenny 5.0.3:

$ apt-get install bzip2

Then

$ apt-get update
$ apt-get install ceph ceph-kclient-source

The kernel client module source is available separately in the ceph-kclient-source package, and installed at /usr/src/modules/ceph. You will need the kernel headers to compile it. To install the kernel headers for your current running kernel do:

$ apt-get install linux-headers-$(uname -r)

Then

$ cd /usr/src/modules/ceph
$ make
$ make modules_install
$ depmod
$ modprobe ceph

At the moment only amd64 and i386 binary packages are available.

 

First follow the instructions for installing from Debian packages or install the latest and greatest version manually.

Then create a configuration file. Here is an example (based on the sample configuration file) for two nodes, node1 and node2.

[global]
pid file = /var/run/ceph/$name.pid
debug ms = 1
[mon]
mon data = /data/mon$id
[mon0]
host = node1
mon addr = 10.0.0.1:6789
[mon1]
host = node2
mon addr = 10.0.0.2:6789
[mds]
[mds0]
host = node1
[mds1]
host = node2
[osd]
sudo = true
osd data = /data/osd$id
[osd0]
host = node1
[osd1]
host = node2

Then distribute the configuration file to all nodes and create the directory where to mount ceph and the directory where to store data.

for i in node1 node2 ; do
scp /etc/ceph/ceph.conf $i:/etc/ceph/ceph.conf
ssh $i mkdir /data /ceph
ssh $i mount -o remount,user_xattr /
done

Now you should be able to create the file system

$ /usr/sbin/mkcephfs --allhosts -v

Start Ceph and mount file system.

$ /etc/init.d/ceph -a start
$ mount 10.0.0.1:/ /ceph

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值