ceph

单机Ceph从Firefly升级到Hammer

Deadly 提交于 2019-12-12 12:54:43
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 单机上部署了Firefly版的Ceph集群,其中包括:mon(一个)、osd(三个)和mds(一个)。单机上使用的操作系统是ubuntu-14.04-server-amd64版。此次升级的要求是数据不能丢失且不能停机升级。 由于当前Firefly版本使用的是mkcephfs部署的,而新版本的ceph已经用ceph-deploy代替了mkcephfs,因此在Hammer版本中已经没有了mkcephfs。升级部署可以使用ceph-deploy工具进行升级,也可以通过包管理的方法进行升级。这里我才用ceph-deploy工具进行升级。 具体升级操作流程如下: 1、安装ceph-deploy工具。 1)更新新版本的软件源。 # wget -q -O- 'https://git.ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc' | sudo apt-key add - # apt-add-repository 'deb http://download.ceph.com/debian-hammer/ trusty main' # echo deb https://download.ceph.com/debian-hammer/ $(lsb_release

ceph中的Pools、PGs和OSDs介绍(tmp)

我们两清 提交于 2019-12-12 12:39:30
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> How are Placement Groups used ? A placement group (PG) aggregates objects within a pool because tracking object placement and object metadata on a per-object basis is computationally expensive–i.e., a system with millions of objects cannot realistically track placement on a per-object basis. The Ceph client will calculate which placement group an object should be in. It does this by hashing the object ID and applying an operation based on the number of PGs in the defined pool and the ID of the pool. See Mapping PGs to OSDs for details. The object’s contents

Ceph 中的 Placement Group 状态详解

*爱你&永不变心* 提交于 2019-12-12 12:21:26
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> Creating Peering Activating Active Backfilling Backfill-toofull Backfill-wait Incomplete Inconsistent Peered Recovering Recovering-wait Remapped Scrubbing Unactive Unclean Stale Undersized Down Creating 含义:PG正在创建 引起原因:创建pool的时候,根据指定的pg数量进行创建pg时出现的状态,正常状态 后果:无 解决方案:无需解决,正常状态之一 Peering 含义:PG之间进行互联,就其中的对象和元数据状态达成一致 引起原因:当pg被creating之后,会进行互联,存储归置组副本的 OSD 之间就其中的对象和元数据状态达成一致。 后果:无 解决方案:无需解决,正常状态之一 Activating 含义:pg在完成peering过程后,会对之前的结果进行固化,等待所有pg同步,尝试进入active状态 引起原因:pg进入active前的准备状态 后果:如果长期卡在该状态,会影响该PG无法读写,进而影响整个pool可用性 解决方案: 停掉PG所在所有OSD 用ceph-object-tool进行pg数据备份

源码编译安装ganesha

自作多情 提交于 2019-12-12 02:27:20
源码编译安装 ganesha 简介 系统环境:CentOS 7.5 ceph:luminous nfs-ganesha:v2.6 stable 安装步骤 安装依赖 首先需要安装编译会用到的公共库 1 yum install gcc git cmake autoconf libtool bison flex doxygen openssl-devel gcc-c++ krb5-libs krb5-devel libuuid-devel nfs-utils -y 如果是使用 Ubuntu 系统,主要有以下几个包不同 gcc-c++ -> g++ libuuid-devel -> uuid-dev nfs-utils -> nfs-kernel-server 如果要生成 FSAL_RGW 模块,需要安装 librgw2-devel 1 yum install librgw2-devel -y 如果要生成 FSAL_CEPH 模块,需要安装 libcephfs1-devel 1 yum install libcephfs-devel -y 源码下载 克隆源码到本地 1 git clone -b V2.6-stable https://github.com/nfs-ganesha/nfs-ganesha.git --recursive 编译 cmake nfs-ganesha 源码

Mount rexray/ceph volume in multiple containers on Docker swarm

主宰稳场 提交于 2019-12-11 15:43:19
问题 What I have done I have built a Docker Swarm cluster where I am running containers that have persistent data. To allow the container to move to another host in the event of failure I need resilient shared storage across the swarm. After looking into the various options I have implemented the following: Installed a Ceph Storage Cluster across all nodes of the Swarm and create a RADOS Block Device (RBD). http://docs.ceph.com/docs/master/start/quick-ceph-deploy/ Installed Rexray on each node and

JClouds and OpenStack : IllegalStateException: Expected BEGIN_ARRAY but was STRING

帅比萌擦擦* 提交于 2019-12-11 12:37:46
问题 I'm trying to access OpenStack Swift using Apache JClouds 1.9.2 library. Maven dependency : <dependency> <groupId>org.apache.jclouds</groupId> <artifactId>jclouds-all</artifactId> <version>1.9.2</version> </dependency> I began with the getting started guide and its code sample. In general, I have no problem to connect and persist a blob. But when I try to list the list of containers (or the contents of a container) I get the following error : SEVERE: Error parsing input: java.lang

Flink with Ceph as the persistent storage

我的未来我决定 提交于 2019-12-10 17:52:17
问题 Flink documents suggests that Ceph can be used as a persistent storage for states. https://ci.apache.org/projects/flink/flink-docs-release-1.3/dev/stream/checkpointing.html Considering that Ceph is a transactional database, wouldn't it have adverse effect on Flink's performance? 回答1: Ceph describes itself as a "unified, distributed storage system" and provides a network file system API. As such, it such should be seamlessly working with Flink's state backends that persist checkpoints to a

Ceph集群缩容及相关故障处理

匆匆过客 提交于 2019-12-10 00:37:35
引言 由于目前机器比较紧张,需要将我集群中的一批机器提供给其他业务使用,这时问题来了,集群机器的退出意味着数据要重新分布,数据迁移的过程中比较容易出故障。 处理过程 处理测试POOL对应的机器 集群中有很多POOL, 有些POOL是客户数据,这非常重要;有些POOL是我测试用,这些POOL对应的OSD可以直接删除,即时集群报pg异常,也无需关心,在删除对应OSD后将对应POOL删除即可,相应的pg异常也消失。 注:为了避免关闭OSD的过程中发生数据迁移,请设置norecover标记。 ceph osd set norecover 删除对应主机上的所有OSD信息的命令如下: killall -9 ceph-osd for i in {108..119} do ceph osd out osd.$i; ceph osd crush remove osd.$i; ceph auth del osd.$i; ceph osd rm $i; ceph auth del osd.$i; done ceph osd crush remove hostname removed item id -10 name 'hostname' from crush map 处理业务需要的POOL对应的机器 对于业务用到的POOL分布在了10台机器上,现在要从这10台机器中释放出五台,这需要涉及到数据迁移了

Ceph集群搬迁后的恢复过程

牧云@^-^@ 提交于 2019-12-10 00:24:24
引言 由于机房搬迁,我的Ceph集群也要迁走。按照关闭rgw, osd, mon的顺序依次关闭ceph进程后关机即可。但是在恢复的过程中确实花费了一些精力,主要有如下问题。 机器重启后硬盘没有自动挂载,需要将硬盘挂载到对应目录; 整个集群IP修改,如果让集群适应新IP 本文主要以解决这两个问题为主,并说明集群恢复的完整过程。 恢复过程 修改各主机中集群IP信息 由于集群IP发生了修改,所以/etc/hosts中的配置文件中集群的IP地址信息也要更新。集群中的每台主机都应该更新。 1*0.57.148.*6 ceph0 1*0.57.148.*7 ceph1 1*0.57.148.*8 ceph2 1*0.57.148.*9 ceph3 1*0.57.148.*0 ceph4 mon恢复 整个集群的恢复的首要条件是恢复MON, 也是解决IP改变的需要,OSD本身并没有跟IP相关,这个问题的解决可以查看我以前的博客 Ceph由于更换IP地址导致MON异常 此处需要注意的是要更新ceph.conf文件中mon_host信息以及public network / cluster network的网段信息。 mon_initial_members = ceph0,ceph1,ceph2 mon_host = your mon ip addrs osd恢复 由于我的硬盘并没有自动挂载的功能

ceph基础操作记录

末鹿安然 提交于 2019-12-09 10:11:22
### 解决too many PGs per OSD ceph tell 'mon.*' injectargs "--mon_pg_warn_max_per_osd 0" 原因:osd过少或者pool过多,可以清理不用的pool或者增加osd,也可以调节pool的pg数量,这个警告暂时无伤大雅 清理磁盘raid信息 mdadm --stop /dev/md0 mdadm --remove /dev/md127 mdadm /dev/md127 --remove /dev/sdc mdadm --zero-superblock /dev/sda 对cephfs中特定的目录进行授权 ceph auth get-or-create client.code mon 'allow r' mds 'allow r, allow rw path=/xxxx ' osd 'allow rw pool=cephfs_data' 来源: oschina 链接: https://my.oschina.net/u/2770034/blog/794945