HOWTO Install Ceph On FC12, FC上安装Ceph分布式文件系统(2)

; osd
; You need at least one. Two if you want data to be replicated.
; Define as many as you like.
[osd]
sudo = true
; This is where the btrfs volume will be mounted.
osd data = /data/osd$id

; Ideally, make this a separate disk or partition. A few GB
; is usually enough; more if you have fast disks. You can use
; a file under the osd data dir if need be
; (e.g. /data/osd$id/journal), but it will be slower than a
; separate disk or partition.
;osd journal = /data/osd$id/journal

[osd0]
host = ceph_osd
btrfs devs = /dev/sdb1

[osd1]
host = ceph_osd1
btrfs devs = /dev/sdb1

; access control
[group everyone]
; you probably want to limit this to a small or a list of
; hosts. clients are fully trusted.
addr = 0.0.0.0/0

[mount /]
allow = %everyone

 

3.2 fetch_config 脚本

该文件同样位于刚才ceph.conf所在目录里面,用来把ceph.conf文件复制到集群里面的各个节点上.

[root@ceph_mds ceph]# cat fetch_config
#!/bin/sh
conf="$1"

## fetch ceph.conf from some remote location and save it to $conf.
##
## make sure this script is executable (chmod +x fetch_config)

##
## examples:
##

## from a locally accessible file
# cp /path/to/ceph.conf $conf

## from a URL:
# wget -q -O $conf

## via scp
# scp -i /path/to/id_dsa user@host:/path/to/ceph.conf $conf
scp root@ceph_mds:/usr/local/etc/ceph/ceph.conf $conf

 

在这个文件里面,我们使用scp的方法,除此还可以使用nfs把ceph.conf文件共享,总之目的就是将在整个集群里面使用同一份ceph.conf


3.3 /etc/init.d/ceph 脚本

该脚本在编译ceph的时候,会在src/里生成一个init-ceph文件,由init-ceph.in模板来生成
如果需要开机自动启动ceph集群的话,将该脚本复制到/etc/init.d/目录下,并使用chkconfig命令来添加该服务.
这个服务应该只需要在monitor端上安装即可.

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/8c5b794a1892eb2c1fdc9fa6338067ff.html