转载请注明原文地址 (). 由于从ppt内容里粘贴过来, 格式稍微有些乱了.
?Fresh
install your two linux . One for server , One for client.
?Import
the public key:
–rpm
--import
?To
install ELRepo for RHEL-5, SL-5 or CentOS-5:
–rpm
-Uvh
?To
make use of our mirror system, please also install yum-fastestmirror.
To install ELRepo for RHEL-6, SL-6 or CentOS-6:
–rpm
-Uvh
?To
make use of our mirror system, please also install yum-plugin-fastestmirror.
?Yum
search kernel-lt and install
–yum
--enablerepo=elrepo-kernel
search kernel-lt
Notice: You ‘d
better to update your kernel
Ceph
supports both kernel objects (KO) and a QEMU hypervisor that uses librbd directly–avoiding the kernel object overhead for
virtualized systems.
安装ceph, 不要使用tarball 自行安装, 非常耗时. 笔者,花了2个小时, tar 包安装,最后也没有成功. 因为依赖了太多的3方库.
安装好后, 至少你需要一个ceph server和ceph clients.
那么,我们就来练习一下. 创建rbd 块设备.
?rbd create foo --size 4096 (default unit is MB)
?modprobe rbd
?rbd map foo --name client.admin (if disable authentication, please
remove –name parameter)
?mkfs.ext4 -m0 /dev/rbd0 (here –m0 with no reserved blocks, because ceph is object store)
? mkdir /mnt/myrbd
? mount /dev/rbd0 /mnt/myrbd
?umount /dev/rbd0
?Rbd unmap /dev/rbd0
ceph fs 文件系统 ( 支持fuse) .
?ount Ceph
FS as a kernel driver.
–sudo mkdir /mnt/mycephfs
–sudo mount -t ceph {ip-address-of-monitor}:6789:/ /mnt/mycephfs
?Note
Mount the CephFS filesystem on the client machine, not the
cluster machine. See for
details.
?FILESYSTEM IN USER SPACE (FUSE)
–Mount
Ceph FS as with FUSE. Replace {username}
with your username.
–sudo mkdir
/home/{username}/cephfs sudo ceph-fuse -m {ip-address-of-monitor}:6789
/home/{username}/ce
?