Ceph的客户端安装
| Contents [hide] |
|---|
参考
- MOUNT.CEPH – MOUNT A CEPH FILE SYSTEM
- MMOUNT CEPH FS WITH THE KERNEL DRIVER
- MOUNT CEPH FS AS A FUSE
- MOUNT CEPH FS IN YOUR FILE SYSTEMS TABLE
ceph端口访问控制
成都ceph环境做为数据备份空间,因未启用授权机制,为确保数据安全,现已添加端口访问控制。
若需增加访问点请在172.17.35.241:/usr/local/bin/default.iptables中进行设置:
|
1
2
3
4
5
6
7
8
9
|
# 若增加ceph节点,请将节点ip添加到LAN_IPs中LAN_IPs=172.17.35.240,172.17.35.241,172.17.35.242,172.17.35.243# 若增加访问客户端,请将客户端IP添加到CEPH_IPs中CEPH_IPs="$NMC_IPs,172.17.46.0/24"CEPH_IPs="$CEPH_IPs,192.168.0.131,192.168.0.133,192.168.0.233,192.168.0.23,192.168.0.247"# 修改完成default.iptables后,执行下面的命令加载策略:setiptables.sh load default.iptables |
用Kernel方式挂载
该方式需要更换系统内核、并重启系统以支持ceph文件系统挂载。
经试用以方式挂载后,存在某些目录丢失,重新mount后丢失目录又出现的现象,而使用fuse方式挂载未发生这一现象。
安装ELRepo及kernel-lt
|
1
2
3
4
5
6
7
8
9
10
11
12
|
# 首先你要做的就是导入public key#rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.orgrpm --import http://www.elrepo.org/RPM-GPG-KEY-elrepo.org# 然后安装ELRepo到CentOS-6.5中rpm -ivh http://www.elrepo.org/elrepo-release-6-5.el6.elrepo.noarch.rpm# 安装kernel-lt(lt=long-term)yum --enablerepo=elrepo-kernel install kernel-lt -y# 你也可以装kernel-ml(ml=mainline)kernel-lt、kernel-mt二者选一个就可以了!#yum --enablerepo=elrepo-kernel install kernel-ml -y |
修改Grub引导顺序并重启动
vim/etc/grub.conf
设置default值(从0开始),一般新安装的内核在第一个位置,所以设置default=0。
目前内核为:title CentOS (3.10.59-1.el6.elrepo.x86_64)
重启,这时候你的内核就成功升级了,你可以删除你的旧内核了!
- 重启后内核为:
uname -a Linux yunwei2.timait 3.10.59-1.el6.elrepo.x86_64 #1 SMP Thu Oct 30 23:46:31 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux
- 重启失败参考(经在192.168.0.82上测试此方法无效)
CentOS 6 will not boot on KVM with elrepo kernel 3.13 / 3.14
You can work around it by booting into your working stock kernel and running these two commands:
|
1
2
|
yum install -y device-mapper-libs libudevfor X in $(cd /boot ; ls -1 config-*elrepo* | sed 's/config-//' ) ; do dracut --add-drivers virtio_blk -f /boot/initramfs-$X.img $X ; done |
添加ceph源
公司内部源、第三方源选择添加一个即可。
- 公司内部源
内部源ceph版本为:0.67.5-16.g69a99e6.el6
|
1
2
3
4
5
6
|
cat > /etc/yum.repos.d/nailgun.repo <<EOF[nailgun]name=Nailgunbaseurl=http://172.17.45.15:8080/centos/fuelweb/x86_64/gpgcheck=0EOF |
- 第三方源
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
# ceph_release# v0.67.9 dumpling# v0.87 giantceph_release=giant# distro:CentOS 6.4是el6distro=el6cat > /etc/yum.repos.d/ceph.repo <<EOF[ceph]name=Ceph packages for \$basearchbaseurl=http://ceph.com/rpm-${ceph_release}/${distro}/\$basearchenabled=1gpgcheck=1type=rpm-mdgpgkey=https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc[ceph-noarch]name=Ceph noarch packagesbaseurl=http://ceph.com/rpm-${ceph_release}/${distro}/noarchenabled=1gpgcheck=1type=rpm-mdgpgkey=https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc[ceph-source]name=Ceph source packagesbaseurl=http://ceph.com/rpm-${ceph_release}/${distro}/SRPMSenabled=0gpgcheck=1type=rpm-mdgpgkey=https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.ascEOFcat > /etc/yum.repos.d/ceph-extras.repo <<EOF[ceph-extras]name=Ceph Extras Packagesbaseurl=http://ceph.com/packages/ceph-extras/rpm/centos6/\$basearchenabled=1priority=2gpgcheck=1type=rpm-mdgpgkey=https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc[ceph-extras-noarch]name=Ceph Extras noarchbaseurl=http://ceph.com/packages/ceph-extras/rpm/centos6/noarchenabled=1priority=2gpgcheck=1type=rpm-mdgpgkey=https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc[ceph-extras-source]name=Ceph Extras Sourcesbaseurl=http://ceph.com/packages/ceph-extras/rpm/centos6/SRPMSenabled=1priority=2gpgcheck=1type=rpm-mdgpgkey=https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.ascEOF# 加载一个第三方依赖的repo、下载cephrpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm |
安装ceph客户端
|
1
|
yum -y install ceph |
[root@FTP-Maven ~]# rpm -qa|grep ceph
libcephfs1-0.67.5-16.g69a99e6.el6.x86_64
python-ceph-0.67.5-16.g69a99e6.el6.x86_64
ceph-0.67.5-16.g69a99e6.el6.x86_64
挂载ceph卷
- 命令行挂载
|
1
2
|
mkdir -p /cephdatamount -t ceph 172.17.35.241:6789:/ /cephdata |
- 添加/etc/fstab自动挂载
|
1
2
|
#172.17.35.241:6789:/ /cephdata172.17.35.241:6789:/ /cephdata ceph defaults 0 0 |
- 注意:开启SELinux可能引起挂载ceph卷后进入子目录报没有权限错误。
fuse方式挂载ceph卷
因ceph-fuse使用64位的inode,在32位系统中会出现问题,因此仅限在64位系统中使用。
安装epel源
|
1
2
3
|
yum -y install epel-release# epel-release-6-8.noarch |
若安装后yum工作异常,修改/etc/yum.repos.d/epel.repo,取消mirrorlist、启用baseurl即可。
安装ceph-fuse
|
1
2
3
4
5
6
7
|
yum -y install ceph-fuse# ceph-0.80.5-9.el6.x86_64# ceph-common-0.80.5-9.el6.x86_64# libcephfs1-0.80.5-9.el6.x86_64# python-ceph-0.80.5-9.el6.x86_64# ceph-fuse-0.80.5-9.el6.x86_64 |
测试挂载ceph卷
|
1
2
3
4
|
mkdir /mnt/cephdata_backupsceph-fuse -m 172.17.35.241:6789 -r /backups /mnt/cephdata_backupsumount /mnt/cephdata_backups |
通过fstab自动挂载
- ceph-fuse挂载脚本bug修复:/sbin/mount.fuse.ceph
|
1
2
3
|
# convert device string to options#cephargs='--'`echo $1 | sed 's/,/ --/g'`cephargs='-'`echo $1 | sed -e 's/,/ -/g' -e 's/=/ /g'` |
- 建立挂载点目录
|
1
|
mkdir -p /mnt/cephdata_backups |
- 设置/etc/fstab
|
1
2
|
# 设置挂载ceph中的backups目录m=172.17.35.241:6789,r=/backups /mnt/cephdata_backups fuse.ceph defaults 0 0 |
- 测试挂载、卸载
|
1
2
3
|
mount /mnt/cephdata_backupsumount /mnt/cephdata_backups |
- 基于ceph集群未正常的情况下,openstack集群开机自mount时该机器会无法启动,当前先去掉该自动mount,改为手动方式
Ceph的客户端安装的更多相关文章
- Ceph的客户端丢失文件夹的解决办法
原来的解决办法 更新linux内核,使用linux内核级的mount方式,一段时间后将会在客户端看不到部分长期不使用的文件夹 更正后的解决办法 参考Ceph的客户端安装设置ceph-fuse方式挂载c ...
- Ceph rgws客户端验证
修改/etc/ceph/ceph.conf文件,加入rados gw监听的端口 [client.rgw.rgws] rgw_frontends = "civetweb port=80&quo ...
- Centos 6.5 SNMP客户端安装及配置版本net-snmp-5.7.3
Centos 6.5 SNMP客户端安装及配置SNMP版本:net-snmp-5.7.3.tar.gz1.下载软件cd /usr/local/srcyum -y install gccwget htt ...
- Oracle 客户端安装配置
电脑上安装了Oracle11G,我远程导出一个10g的数据库数据时,报了错误,猜测可能是我的11G客户端版本的问题.所以下载了10G的客户端 安装. 其实客户端的配置读取的是两个文件监听配置文件lis ...
- Oracle客户端安装及配置
Oracle客户端安装及配置 1.安装orcale客户端(Oracle_client_10 )选择inst...方式安装(不是管理员方式) 2.在安装路径下新建目录network\admin 然后新建 ...
- svn服务器及客户端安装使用
一.服务器安装: 1.yum install subversion 2.输入rpm -ql subversion查看安装位置,如下图: 我们知道svn在bin目录下生成了几个二进制文件. 输入 ...
- 开源入侵检测系统OSSEC搭建之二:客户端安装
上一篇文章中已经将OSSEC服务端的安装以及客户端的Key导出操作做了解说,接下来在另一台虚拟机中安装客户端,与安装服务端类似同样需要安装ossec,步骤如下. 一.下载ossec-hids-2.8. ...
- window下版本控制工具Git 客户端安装
安装使用 1.下载msysgit http://code.google.com/p/msysgit/ 2.下载tortoisegit客户端安装 http://code.google.com/p/tor ...
- Oracle 客户端安装 + pl/sql工具安装配置
Oracle 客户端安装 + pl/sql工具安装配置 下载oracle客户端,并在本地安装. 11g下载地址为: http://www.oracle.com/technetwork/databas ...
随机推荐
- 对于限制UITextView输入的字符数
对于限制UITextView输入的字符数.相信大家在网上见得最多的是实现UITextViewDelegate 摘自:方法 - (void)viewDidLoad { self.titleText = ...
- oracle 中的游标
oracle 中的游标 通俗易懂的sql代码直接上! --简单的游标使用滴呀 --使用FOR OBJ IN OBJS LOOP ......END LOOP; DECLARE CURSOR C_JOB ...
- .NET 中的委托
1.1.1 定义 委托是一种引用方法的类型.一旦为委托分配了方法,委托将与该方法具有完全相同的行为.委托方法的使用可以像其他任何方法一样,具有参数和返回值,如下面的示例所示: //Code in C# ...
- APP源码集中打包大放送!十一个千万级别APP源码随意处置!
小伙伴们还在一个一个苦苦寻找各类APP源码吗?此贴集中打包最常用APP的源码,你想得到的APP,这里都有! 想做商城?这里有天猫! 想做同城服务?这里有大众点评! 想做外卖?这里有饿了么! 想做视频? ...
- lodash的运用
Object 对象 1._.merge(object, [sources]) 此方法类似于_.assign,除了它递归地将源对象的自有和继承的可枚举字符串键控属性合并到目标对象中. 如果存在目标值,将 ...
- 浅谈负载均衡SLB、CLB和综合应用
SLB 服务器负载均衡(Server Load Balancing),可以看作HSRP(热备份路由器协议)的扩展,实现多个服务器之间的负载均衡. 虚拟服务器代表的是多个真实服务器的群集 ...
- RouterOS软路由设置固定IP+PPPOE
内网: IP:192.168.10.254/24 网关:192.168.10.254 外网: IP:218.17.172.17/28 子网掩码:255.255.255.240 网关:218.17.17 ...
- redis tcp-backlog配置
在redis2.8版本中有一个tcp-backlog配置, 说明如下: # TCP listen() backlog.## In high requests-per-second environmen ...
- SWIFT Button的基本用法
import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: ...
- tengine安装lua
转子: http://www.cnblogs.com/shengshuai/p/4244851.html 参考: http://www.ttlsa.com/nginx/nginx-lua/ 学习:ht ...