实例介绍
ceph-cognize-docs_zh-v1.3,很好的讲解了关于ceph的部署以及运维,中英文对照可以使用读者更好的理解原始原味的ceph经典。
3.1.2.3元变量….…………………45 31.24共有设置 45 3.1.2.5网络 46 3.1.2.6监观器 省省省着看·44普番番番番着非垂非非自着着着普着着普普鲁非非番非垂帝壶非非非鲁鲁普普普普普,非非垂垂布非非。着鲁鲁鲁鲁番番垂垂 47 3.1.2.7OSDs ···a::::::·中.·a·::::::44:··········::·· 47 3.1.28日志、调试 49 31.2.9 ceph. conf实例,… 50 3.1.2.10运行时更改 50 31211查看运行时配置.1 313通用配置选项参考 51 3.14监视器配置选项参考…....154 3.1.5OSD犯置选项参考. 57 3.1.6文件存储配置参考 64 3161扩展属性... 64 3.1.62同步间隔…64 31.6.3同步器 ““ 65 3.1.64队列 3.1.6.5超时冼项…...………………66 3.1.66B-ree文件系统 66 3.1.6.7日志67 3.1.68其他选项… 春鲁看看看垂 67 317日志配置参考 31.8日志和调试配置参考 69 3.1.8.1日志记录 69 3.1.8.2OSD调试冼项….…71 318.3 FILESTORE调试选项 72 31.8.4MDS调试选项… 72 31.85 RADOS网关…… 72 3.1.9消息传递..………74 32CFPH的部署… .75 32.1用 mkcephfs配置… 75 3.2.1.1允许以root身份登录集群主机 32.1.2把配置文件拷贝到所有主机… 76 3.2.13创建默认目录 76 3.2.1.4把硬盘挂载到数据目录…… 3.2.1.5运行 mkcephfs..,,……………………………………77 22cph部署7 3.23安装chef.… 3.2.3.1创建一个chef用户 3232为chef客户端生成Sh密钥 78 3233安装Rby… 78 3234安装chef和chef服务器 3.2.3.5在剩余机器上安装chef. ∴79 3.2.3.6配置 knife. 80 3.23.7菜谱路径…...…. ….81 3.2.3.8把 validation.pem拷刀到所有节点,…,, 81 323.9在每个节点运行 chef-client 81 3.23.10检查节点 …81 3.24用chef部署 2 324.1克隆必需的菜谱.. 2 3.2.4.2添加必需的菜谱路径 82 3.24.3安装菜谱 82 3.244配置ceph环境 82 3245配置角色………………………84 3.24.6配置节点 84 3.247准备OSD硬盘 .84 3248在每个书点运行 chef-client… 85 3.2.4.9继续集群运维:) 3.3运维 85 3.3.1操作一个集群…… 86 33.1.1启动集群.………………87 33.1.2停止集群 87 332监控集群… 3.3.2.1交互模式 87 3.322检查集群健康状况…..……………………88 3.3.2.3观察集群 88 3324检查一个集群的状态… 88 3.32.5检查OSD状态… …………189 3.326检查监视器状态 ∴.89 3327检查MDS状态 3.328检查归置组状态….. 90 333CPU剖析 ……90 3331启动 oprofile ·····.·.·.·.··.·················· 91 3.33.2停止 oprofile 91 3.3.3.3查看 oprofile运行结果 91 3334重置 oprofile. 91 334故障排除 中中中中:++中中·.中中中中中中中中中中中 91 33.4.1OSD失败.…………91 3.34.11单个Osd失败...,,…………92 3.34.1.2集群没有空闲硬盘空间. 92 3.3.4.13无艰归置组 92 3.3414卡住的归置组 ,看··看看看 着普垂音普D·非音··非 .93 3.3.4.1.5归置组挂了—连接建立失败 音音音者鲁音鲁DDDD壶垂 鲁普音 …94 3.3416未找到的对象 94 3.34.17龟速或反应迟钝的OSD.…96 3.34.1.8打摆子的OSD. 96 334.2监视器失败恢复....97 33.5调试和日志记录……………………………………97 3.35.1数据归置 98 336数据归置概览… 9 337存储池 9 3.3.7.1列出衣储池 3.37.2创建一个存伟池..100 3.37.3删除一个存储池 100 3374重命名一个存储池 …100 3.375显示衣储池统计信息 。自音自·音着非。。。。看··自自音非···着着看看 11 3.37.6拍下储池快照 101 337.7刪除衣储池快照 …101 3.378设置存储池的值..……101 3379获取存储池的值 102 3.3.7.10设置对象副本数 102 337.11获取对象副本数 3.3.8归置组 …13 3.38.1设置归置组数量… ∴…………104 3.38.2获取归置组数量… …104 338.3获取归置组统计信息 104 3.38.4获取卡住的归置组统计信息… 104 3.3.85获取归置组图 ∴……………,,,105 338.6获取一个PG的统计信息105 3.38.7洗一个归置组 105 3.3.88恢复丢失的.105 3.3.9 CRUSH图.…106 3.3.9.1编辑 CRUSH图 3.3.91.1获取 CRUSH图 107 3.39.1.2反编译 CRUSH图 107 3.3.9.1.3编译 CRUSH图… 107 3.3.9.1.4设置 CRUSH图..108 3.3.9.2 CRUSH图参数.108 3.3921 CRUSH图之设备 3.3922 CRUSH图之桶 108 3.3.923 CRUSH图之规则 ,,垂,,垂鲁着普着着着香垂垂 ,110 3.393增加/移动OSD. 112 3.3.9.4调整OSD的 CRUSH权重................ 112 339.5删除OSD 113 3.39.6移动桶… 鲁垂垂垂垂垂 113 3397可调选项…..114 3.3.97.1选留值的影响 114 3.3.97.2哪个客户端版本支持可调参数… 114 3.3.9.7.3一些要点…15 3.3.9.7.4调整 CRUSH.. 115 3.3.97.5遗留值…… 115 33.10ceph认证及授权 ····································································································· 116 3310.1ceph认证( ceph)…………………….116 3.3.10.2ceph授权(能力) 118 3310.3 ceph的局限性… 120 33.11 ceph手册.120 3311.1配置 ceph.0121 3.3.111.1 client admin密钥. n121 3.3.11.1.2监枧器密钥环 鲁····看着省看看普着看着音音 121 3311.1.3启用 ceph 122 3.311.14禁用 ceph.… 3.3.11.15守护进程密钥环 ∴123 33112 ceph管…………………………,124 3.3.11.2.1增加一个密钥 124 33.11.22删除密钥… 124 3.3.11.2.3列出集群内的密钥......124 33.113 ceph命令行选项 125 33114向后兼容性. 126 3.3.12添加/删除OSD. ...············.·.········ 127 3.3.121添加OSD.127 3.3.12.1.1部署硬件 ∴127 33.121.2安装推荐软件 127 33.12.13添加OSD(手动) 3.3.12.14添加OSD(chef)…130 331215启动OSD 130 3.3.121.6把OSD推进集群. 130 3.3.12.1.7观察效据迁移. ∴131 3.3.12.2删除OSD 131 3.3.12.2.1把OSD踢出集群...131 3.3.122.2观察欻据移 131 3.3.12.2.3停止OSD.………131 3.3.122.4删除一个OSD(手动)…132 3.3.13增加/删除监视器 132 3.3.13.1增加监视器… ∴133 3.3.13.1.1部署硬件.……… 133 3.3.13.1.2安装必要软件. 133 3.3.13.1.3增加监视器(手动) 133 3.3.132删除监视器.......134 3.3.13.21删除监视器(手动) 135 3.3.13.2.2从不健康集群删除监视器 135 3.3.14更改监视IP地 普着 DDDDDDDD D量 DDDDDDD看看看垂垂看垂看着看着鲁看鲁看看自音音看 136 33.14.1一致性要求 136 3.3.14.2更改监视器IP地址(正确方法) 444 137 3.3.14.3更改监视器P地址(错误方法) .137 3.3.15控制命令.… ........……139 3.3.15.1监视器命令…… 139 33.152系统命含令 ·····非·非 139 3.3.15.3认证子系统…… ……139 3.3.15.4归置组子系统… 3.3.15.5OSD子系统 ::44:4 140 3.3.156MDS子系统… 144 3.3157监视器子系统 ,…,,…,…,,,………11441 34手册页… 鲁鲁鲁鲁DD鲁 145 3.5API接口… 145 3.5.1 librados(C).,,,,……………146 3.51.1实例:连接并写入一个对象146 3512异步IO 147 3.51.3API调用.…148 35.13.1 rados pool stat t数据结构… ∴148 35.1.32 rados cluster stat t数据结构…… 149 3.51.3.3定义 149 3.5.1.3.4类…… 150 3.5.1.3.5函数 ∴151 3.5.2 libradospp(c+ + 173 4 CEPH FS …173 4.1用为咳驱动挂载ceph文件系统… 173 4.2用户空间挂载ceph文件系统…… …174 4.3从 fstab挂载 …174 4.4让 hadoop使用 cephas ………175 44.1 hadoop配置…… ::·:::··;·:·4:::.4:::········ ……175 44.2对每文件定制复制的支持.175 4.4.3存储池选择语X... 176 4.4.4存储池选择调试 176 4.5mds配置参考, 444·44;::···:·;··::.:::4················:···:::·····;··;·····;···;·············· BDD自D音D音,音·音垂垂 4.6 cephfs-ceph文件系统选项工具. 183 4.6.1概述 …184 4.6.2描述 ∴184 4.6.3选项 184 4.6.4限制条件 185 4.6.5可用范围.....185 4.7ceph- fuse--ceph的用户空间客户端 185 4.7.1概述.185 4.7.2描述… 185 4.7.3选项 186 4.7.4可用范围.………186 48 mount ceph—挂载ceph文件系统 4.8.1概述 186 4.8.2描述…186 4.8.3选项 ∴187 4.84实. .188 4.8.5可用范围 188 4.9 libcephfs javadoc) 189 5块设备 ·*·***·· ·======= 189 6 RADOS网关 190 7API文档 190 8体系结构 191 8.1消除局限性 ·中中中中·中.中中中中·.中中中中:中中中. 191 8.2ceph如何伸缩…… 192 8.3邻居感应节点………………194 84智能OSD .195 8.5监视器法定人数 8.6 mds …………196 8.7客户端接口.… 196 87.1认证和授权 ∴196 8.7.2 librados 8.7.3RBD. 197 8.7.4RGW. .197 8.7.5 cephas.… 11198 1开始 115分钟快速入门 Thank you for trying Ceph! Petabyte-scale data clusters are quite an undertaking. Before delving deeper into Ceph, we recommend setting up a cluster on a single host to explore some of the functionality. The Ceph 5 Minute Quick Start deploys a Ceph object store cluster on one server machine and a Ceph client on a separate machine, each with a recent Debian/Ubuntu operating system. The intent of this Quick Start is to help you exercise Ceph object store functionality without the configuration and deployment overhead associated with a production-ready object store cluster. Once you complete this quick start, you may exercise Ceph commands on the command line. You may also proceed to the quick start guides for block devices, CephFS filesystems, and the restful gateway. 感谢慾尝试ceph!PB级数据集群是很大的挑战,在深λceph前,我们推荐悠在单机上安装一个集群来发掘 它的功能。5分钟快速入门在单机上詺署了一套ceph对象存储集群服务器端,在另一台机器上郭署了ceph客 户端,二者都基于最新的 Debian/ Ubuntu操作系统。这篇伕速入门意在帮您练习ceph对象存功能,而无需 配置、部署生产级的对象存储集群。完成本篇快速入门后,您就可以在命令行练习ceph命令了,也可以继续 尝试块设各、 CephAS文件系统、和 RESTful网关。 Clent machine Server Machine Ceph Commands ceph ilon Block Device ceph- osd Ceph is ceph - mds 11.1安装 Debian/ Ubuntu Install Debian/Ubuntu Install a recent release of Debian or Ubuntu(e. g. 12.04 precise 安装 Debian或 Ubuntu的最新版(如12.10) 1.12安装ceph软件包 Add Ceph Packages To get the latest Ceph packages, add a release key to aPt, add a source location to your /etc/apt/sources list, update your system and install Ceph 耍安装最新的ceph包,先扣发布公钥添加到APT中,再把源位置添加到/etc/apt/ sourceslist中,更新系统 安装ceph。以下是命令 wget-q-0-https://raw.github.com/ceph/ceph/master/keys/release.ascIsudoapt-keyadd echodebhttp://ceph.com/debian/$(lsb_release-sc)mainIsudotee /etc/apt/sources list. d/ceph list sudo apt-get update & sudo apt-get install ceph Check the Ceph version you are using and make a note of it so that you have the correct settings in your configuration file 检查下你安装的ceph版本,记下来,以便稍后正确地配置 ceph -v If ceph-v reflects an earlier version from what you installed, your ceph-common library may be using the version distributed with the kernel. Once youve installed Ceph, you may also update and upgrade your packages to ensure you have the latest ceph-common library installed. 如果 ceph-V显示您安装了较者的版本,但 ceph- common库可能是随内核发布约。所以安装ceph后,最好更 新并升级软件包,以确保你安装了最新的 ceph-common库。 sudo apt-get update & sudo apt-get upgrade If you want to use a version other than the current release, see Installing Debian/Ubuntu packages for further details 如果你不想用当前发布的版本,参见 Installing debian,/ Ubuntu Packages 1.1.3写配置文件 Add a Configuration File The example configuration file will configure Ceph to operate a monitor, two osd daemons and one metadata server on your Ceph server machine. To add a configuration file to Ceph, we suggest copying the contents of the example file below to an editor. Then, follow the steps below to modify it 栏板配置文件将为ceph集群配置1个监视器、2个OSD守护进浧、和1个元数据服务器。我们建议您把下面 的配置样⌒持贝到文本编辑器,然后按下列步骤修改它。 [global H For version 0.55 and beyond, you must explicitly enable or disable authentication with auth" entries in [global auth cluster required ceph auth service required ceph auth client required cephx osd] osd journal size =1000 #The following assumes ext4 filesystem filestore xattr use omap true For Bobtail (v 0.56)and subsequent versions, you may add settings for mkcephfs so that it will create and mount the file system on a particular oSD for you. Remove the comment# t character for the following settings and replace the values in braces with appropriate values, or leave the following settings commented out to accept the default values. You must specify the # --mkfs option with mkcephfs in order for the deployment script to utilize the following settings, and you must define the devs option for each osd instance; see below #osd mkfs type = [fs-type #osd mkfs options ifs-type)=imkfs options default for xfs is "-f #osd mount options [fs-type]=mount options]# default mount option is "rw, noatime For example, for ext4, the mount option might look like this tosd mkfs options ext4 user xattr, rw, noatime Execute hostname to retrieve the name of your host, and replace (hostname with the name of your host #t For the monitor, replace fip-address with the IP address of your host host =hostname] mon addr tip-address: 6789 [osd. e host hostname] For Bobtail (v 0.56)and subsequent versions, you may add settings for mkcephfs so that it will create and mount the file system on a particular oSd for you. Remove the comment# character for the following setting for each OSD and specify a path to the device if you use mkcephfs with the --mkfs option #devs =ipath-to-device) Losd. 1 Hostname) #devs = ipath-to-device] I mds.a host=hostname 1. Open a command line on your Ceph server machine and execute hostname-s to retrieve the name of your Ceph server machine 在ceph服务器机器上打开一个终端,执行 hostname-s获取其主机名。 2. Replace hostname] in the sample configuration file with your host name 用你的主机名替挨配置样本中的{ hostname}。 3. Execute ifconfig on the command line of your Ceph server machine to retrieve the IP address of your Ceph server machine 执行 ifconfig获取ceph服务器的IP地址。 4. Replace fip-addressf in the sample configuration file with the ip address of your Ceph server host 用你找到的ceph服务器P地替换配置样本中的{ip- address} 5. Save the contents to /etc/ceph/ceph. conf on Ceph server host 把修改后的内容保存到ceph服务器的/etc/ceph/ ceph. conf文件 6. Copy the configuration file to /etc/ceph/ceph. conf on your client host 把那份配置文件乜持贝到客户端的/ec/ceph/ ceph. conf sudo scp fuser ]@iserver-machine]: /etc/ceph/ceph. conf /etc/ceph/ceph. conf Tip: Ensure the ceph. conf file has appropriate permissions set (e.g. chmod 644) on your client machine 提示:确保客户端上的 ceph. conf权限位设置得当,如: chmod644 New in version 0.55 Ceph vO. 55 and above have authentication enabled by default. You should explicitly enable or disable authentication with version 0.55 and above. The example configuration provides auth entries for authentication. For details on Ceph authentication see Ceph Configuration Reference and Ceph guide 0.55新增 ceph vO.55及以上版⌒默认启用了认证,使用这些版夲时应该显式地启凨或禁用认证。配置样本提供了auth 条目用于配置认证,详情参见 Cephx Configuration Reference和 Ceph guide 1.14部署配置 Deploy the configuration You must perform the following steps to deploy the configuration 你必须执行下列步骤来实现之前的配置。 1. On your Ceph server host, create a directory for each daemon. For the example configuration, execute the following 在ceph服务器主机上,给每个进程创建相应目录。比如对样本配置,执行下面的命令 sudo mkdir /var/lib/ceph/osd/ceph-0 sudo mkdir /var/lib/ceph/osd/ceph-1 sudo mkdir /var/lib/ceph/mon/ceph-a sudo mkdir /var/lib/ceph/mds / ceph-a 2. Execute the following on the Ceph server host: 在ceph康务器上执行下列命令 cd /etc/ceph udo mkcephfs -a -c/etc/ceph/ceph. conf -k ceph keyring Among other things, mkcephfs will deploy ceph and generate a client admin user and key. For Bobtail and subsequent versions (v 0.56 and after), the mkcephfs script will create and mount the filesystem for you provided you specify osd mkfs osd mount and devs settings in your Ceph configuration file 除此之外, mkcephfs会部署并生成一个 client admin用户及其密钥。对于 Bobtail及之后版本(v0.56及以 上),如炅你在配置文件里配置了 osd mkfs、 osd mount和dews, mkcephfs脚本会帮你创建并挂载文件系统。 115启动ceph集群 Start gepi h 【实例截图】
【核心代码】
标签:
小贴士
感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。
- 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
- 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
- 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
- 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。
关于好例子网
本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明
网友评论
我要评论