ceph-deploy命令应用

2023-11-05

记录:336

场景:在CentOS 7.9操作系统上,使用ceph-deploy创建ceph集群;部署集群的mon、mgr、mds、osd、rgw等组件。

版本:

操作系统:CentOS 7.9

ceph版本:ceph-13.2.10

名词:

ceph-deploy:Ceph部署集群的工具命令。

1.基础环境

在规划集群主机上需安装ceph-deploy、ceph、ceph-radosgw软件。

(1)集群主节点安装软件

安装命令:yum install -y ceph-deploy ceph-13.2.10

安装命令:yum install -y ceph-radosgw-13.2.10

解析:集群中主节点安装ceph-deploy、ceph、ceph-radosgw软件。

(2)集群从节点安装软件

安装命令:yum install -y ceph-13.2.10

安装命令:yum install -y ceph-radosgw-13.2.10

解析:集群中从节点安装ceph、ceph-radosgw软件。

2.命令应用

ceph-deploy命令,在集群主节点的/etc/ceph目录下使用。

(1)创建ceph集群

命令:ceph-deploy new app161 app162 app163

解析:创建由app161、app162、app163三个主机组成的集群。

(2)创建和初始化mon守护进程

命令:ceph-deploy mon create-initial

解析:在主节点执行,初始化集群中的mon守护进程。

(3)部署osd和指定磁盘

命令:ceph-deploy osd create --data /dev/sdb app161

解析:在指定主机创建osd;--data,指定磁盘;app161,部署的节点。

(4)创建mgr

命令:ceph-deploy mgr create app161 app162 app163

解析:在指定主机上创建mgr组件。

(5)创建mds

命令:ceph-deploy mds create app161 app162 app163

解析:在指定主机上创建mds组件。

(6)创建rgw

命令:ceph-deploy rgw create app161 app162 app163

解析:在指定主机上创建rgw组件。

(7)ceph dashboard create-self-signed-cert

命令:ceph mgr module enable dashboard

命令:ceph dashboard create-self-signed-cert

解析:ceph mgr module enable,开启dashboard功能;ceph dashboard,创建证书。

(8)同步配置文件到客户端主机

命令:ceph-deploy admin 192.168.19.166

解析:同步集群主节点的配置信息到客户端主机。

(9)查看主机磁盘信息

命令:ceph-deploy disk list app161

解析:查看主机磁盘信息。

(10)卸载集群

命令:ceph-deploy purge app161 app162 app163

命令:ceph-deploy purgedata app161 app162 app163

解析:卸载集群和卸载数据。

3.命令帮助手册

(1)ceph-deploy帮助命令

命令:ceph-deploy --help

解析:查看ceph-deploy支持全部命令和选项,在实际工作中,查看这个手册应该是必备之选。

usage: ceph-deploy [-h] [-v | -q] [--version] [--username USERNAME]
                   [--overwrite-conf] [--ceph-conf CEPH_CONF]
                   COMMAND ...

Easy Ceph deployment

    -^-
   /   \
   |O o|  ceph-deploy v2.0.1
   ).-.(
  '/|||\`
  | '|` |
    '|`

Full documentation can be found at: http://ceph.com/ceph-deploy/docs

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         be more verbose
  -q, --quiet           be less verbose
  --version             the current installed version of ceph-deploy
  --username USERNAME   the username to connect to the remote host
  --overwrite-conf      overwrite an existing conf file on remote host (if
                        present)
  --ceph-conf CEPH_CONF
                        use (or reuse) a given ceph.conf file

commands:
  COMMAND               description
    new                 Start deploying a new cluster, and write a
                        CLUSTER.conf and keyring for it.
    install             Install Ceph packages on remote hosts.
    rgw                 Ceph RGW daemon management
    mgr                 Ceph MGR daemon management
    mds                 Ceph MDS daemon management
    mon                 Ceph MON Daemon management
    gatherkeys          Gather authentication keys for provisioning new nodes.
    disk                Manage disks on a remote host.
    osd                 Prepare a data disk on remote host.
    repo                Repo definition management
    admin               Push configuration and client.admin key to a remote
                        host.
    config              Copy ceph.conf to/from remote host(s)
    uninstall           Remove Ceph packages from remote hosts.
    purgedata           Purge (delete, destroy, discard, shred) any Ceph data
                        from /var/lib/ceph
    purge               Remove Ceph packages from remote hosts and purge all
                        data.
    forgetkeys          Remove authentication keys from the local directory.
    pkg                 Manage packages on remote hosts.
    calamari            Install and configure Calamari nodes. Assumes that a
                        repository with Calamari packages is already
                        configured. Refer to the docs for examples
                        (http://ceph.com/ceph-deploy/docs/conf.html)

See 'ceph-deploy <command> --help' for help on a specific command

(2)ceph-deploy new帮助命令

命令:ceph-deploy new --help

解析:查看ceph-deploy new支持全部命令和选项,在实际工作中,查看这个手册应该是必备之选。

usage: ceph-deploy new [-h] [--no-ssh-copykey] [--fsid FSID]
                       [--cluster-network CLUSTER_NETWORK]
                       [--public-network PUBLIC_NETWORK]
                       MON [MON ...]

Start deploying a new cluster, and write a CLUSTER.conf and keyring for it.

positional arguments:
  MON                   initial monitor hostname, fqdn, or hostname:fqdn pair

optional arguments:
  -h, --help            show this help message and exit
  --no-ssh-copykey      do not attempt to copy SSH keys
  --fsid FSID           provide an alternate FSID for ceph.conf generation
  --cluster-network CLUSTER_NETWORK
                        specify the (internal) cluster network
  --public-network PUBLIC_NETWORK
                        specify the public network for a cluster

(3)ceph-deploy mon帮助命令

命令:ceph-deploy mon --help

解析:查看ceph-deploy mon支持全部命令和选项,在实际工作中,查看这个手册应该是必备之选。

usage: ceph-deploy mon [-h] {add,create,create-initial,destroy} ...

Ceph MON Daemon management

positional arguments:
  {add,create,create-initial,destroy}
    add                 Add a monitor to an existing cluster:
                        	ceph-deploy mon add node1
                        Or:
                        	ceph-deploy mon add --address 192.168.1.10 node1
                        If the section for the monitor exists and defines a `mon addr` that
                        will be used, otherwise it will fallback by resolving the hostname to an
                        IP. If `--address` is used it will override all other options.
    create              Deploy monitors by specifying them like:
                        	ceph-deploy mon create node1 node2 node3
                        If no hosts are passed it will default to use the
                        `mon initial members` defined in the configuration.
    create-initial      Will deploy for monitors defined in `mon initial
                        members`, wait until they form quorum and then
                        gatherkeys, reporting the monitor status along the
                        process. If monitors don't form quorum the command
                        will eventually time out.
    destroy             Completely remove Ceph MON from remote host(s)

optional arguments:
  -h, --help            show this help message and exit

(4)ceph-deploy osd帮助命令

命令:ceph-deploy osd --help

解析:查看ceph-deploy osd支持全部命令和选项,在实际工作中,查看这个手册应该是必备之选。

usage: ceph-deploy osd [-h] {list,create} ...

Create OSDs from a data disk on a remote host:

    ceph-deploy osd create {node} --data /path/to/device

For bluestore, optional devices can be used::

    ceph-deploy osd create {node} --data /path/to/data --block-db /path/to/db-device
    ceph-deploy osd create {node} --data /path/to/data --block-wal /path/to/wal-device
    ceph-deploy osd create {node} --data /path/to/data --block-db /path/to/db-device --block-wal /path/to/wal-device

For filestore, the journal must be specified, as well as the objectstore::

    ceph-deploy osd create {node} --filestore --data /path/to/data --journal /path/to/journal

For data devices, it can be an existing logical volume in the format of:
vg/lv, or a device. For other OSD components like wal, db, and journal, it
can be logical volume (in vg/lv format) or it must be a GPT partition.

positional arguments:
  {list,create}
    list         List OSD info from remote host(s)
    create       Create new Ceph OSD daemon by preparing and activating a
                 device

optional arguments:
  -h, --help     show this help message and exit

(5)ceph-deploy mgr帮助命令

命令:ceph-deploy mgr --help

解析:查看ceph-deploy mgr支持全部命令和选项,在实际工作中,查看这个手册应该是必备之选。

usage: ceph-deploy purgedata [-h] HOST [HOST ...]

Purge (delete, destroy, discard, shred) any Ceph data from /var/lib/ceph

positional arguments:
  HOST        hosts to purge Ceph data from

optional arguments:
  -h, --help  show this help message and exit

(6)ceph-deploy mds帮助命令

命令:ceph-deploy mds --help

解析:查看ceph-deploy mds支持全部命令和选项,在实际工作中,查看这个手册应该是必备之选。

usage: ceph-deploy mds [-h] {create} ...

Ceph MDS daemon management

positional arguments:
  {create}
    create    Deploy Ceph MDS on remote host(s)

optional arguments:
  -h, --help  show this help message and exit

(7)ceph-deploy rgw帮助命令

命令:ceph-deploy rgw --help

解析:查看ceph-deploy rgw支持全部命令和选项,在实际工作中,查看这个手册应该是必备之选。

usage: ceph-deploy rgw [-h] {create} ...

Ceph RGW daemon management

positional arguments:
  {create}
    create    Create an RGW instance

optional arguments:
  -h, --help  show this help message and exit

(8)ceph dashboard帮助命令

命令:ceph dashboard --help

解析:查看ceph dashboard支持全部命令和选项,在实际工作中,查看这个手册应该是必备之选。

General usage: 
 ==============
usage: ceph [-h] [-c CEPHCONF] [-i INPUT_FILE] [-o OUTPUT_FILE]
            [--setuser SETUSER] [--setgroup SETGROUP] [--id CLIENT_ID]
            [--name CLIENT_NAME] [--cluster CLUSTER]
            [--admin-daemon ADMIN_SOCKET] [-s] [-w] [--watch-debug]
            [--watch-info] [--watch-sec] [--watch-warn] [--watch-error]
            [--watch-channel {cluster,audit,*}] [--version] [--verbose]
            [--concise] [-f {json,json-pretty,xml,xml-pretty,plain}]
            [--connect-timeout CLUSTER_TIMEOUT] [--block] [--period PERIOD]

Ceph administration tool

optional arguments:
  -h, --help            request mon help
  -c CEPHCONF, --conf CEPHCONF
                        ceph configuration file
  -i INPUT_FILE, --in-file INPUT_FILE
                        input file, or "-" for stdin
  -o OUTPUT_FILE, --out-file OUTPUT_FILE
                        output file, or "-" for stdout
  --setuser SETUSER     set user file permission
  --setgroup SETGROUP   set group file permission
  --id CLIENT_ID, --user CLIENT_ID
                        client id for authentication
  --name CLIENT_NAME, -n CLIENT_NAME
                        client name for authentication
  --cluster CLUSTER     cluster name
  --admin-daemon ADMIN_SOCKET
                        submit admin-socket commands ("help" for help
  -s, --status          show cluster status
  -w, --watch           watch live cluster changes
  --watch-debug         watch debug events
  --watch-info          watch info events
  --watch-sec           watch security events
  --watch-warn          watch warn events
  --watch-error         watch error events
  --watch-channel {cluster,audit,*}
                        which log channel to follow when using -w/--watch. One
                        of ['cluster', 'audit', '*']
  --version, -v         display version
  --verbose             make verbose
  --concise             make less verbose
  -f {json,json-pretty,xml,xml-pretty,plain}, --format {json,json-pretty,xml,xml-pretty,plain}
  --connect-timeout CLUSTER_TIMEOUT
                        set a timeout for connecting to the cluster
  --block               block until completion (scrub and deep-scrub only)
  --period PERIOD, -p PERIOD
                        polling period, default 1.0 second (for polling
                        commands only)

 Local commands: 
 ===============

ping <mon.id>           Send simple presence/life test to a mon
                        <mon.id> may be 'mon.*' for all mons
daemon {type.id|path} <cmd>
                        Same as --admin-daemon, but auto-find admin socket
daemonperf {type.id | path} [stat-pats] [priority] [<interval>] [<count>]
daemonperf {type.id | path} list|ls [stat-pats] [priority]
                        Get selected perf stats from daemon/admin socket
                        Optional shell-glob comma-delim match string stat-pats
                        Optional selection priority (can abbreviate name):
                         critical, interesting, useful, noninteresting, debug
                        List shows a table of all available stats
                        Run <count> times (default forever),
                         once per <interval> seconds (default 1)
    

 Monitor commands: 
 =================
dashboard create-self-signed-cert                           Create self signed certificate
dashboard get-enable-browsable-api                          Get the ENABLE_BROWSABLE_API option value
dashboard get-rest-requests-timeout                         Get the REST_REQUESTS_TIMEOUT option value
dashboard get-rgw-api-access-key                            Get the RGW_API_ACCESS_KEY option value
dashboard get-rgw-api-admin-resource                        Get the RGW_API_ADMIN_RESOURCE option value
dashboard get-rgw-api-host                                  Get the RGW_API_HOST option value
dashboard get-rgw-api-port                                  Get the RGW_API_PORT option value
dashboard get-rgw-api-scheme                                Get the RGW_API_SCHEME option value
dashboard get-rgw-api-secret-key                            Get the RGW_API_SECRET_KEY option value
dashboard get-rgw-api-ssl-verify                            Get the RGW_API_SSL_VERIFY option value
dashboard get-rgw-api-user-id                               Get the RGW_API_USER_ID option value
dashboard set-enable-browsable-api <value>                  Set the ENABLE_BROWSABLE_API option value
dashboard set-login-credentials <username> <password>       Set the login credentials
dashboard set-rest-requests-timeout <int>                   Set the REST_REQUESTS_TIMEOUT option value
dashboard set-rgw-api-access-key <value>                    Set the RGW_API_ACCESS_KEY option value
dashboard set-rgw-api-admin-resource <value>                Set the RGW_API_ADMIN_RESOURCE option value
dashboard set-rgw-api-host <value>                          Set the RGW_API_HOST option value
dashboard set-rgw-api-port <int>                            Set the RGW_API_PORT option value
dashboard set-rgw-api-scheme <value>                        Set the RGW_API_SCHEME option value
dashboard set-rgw-api-secret-key <value>                    Set the RGW_API_SECRET_KEY option value
dashboard set-rgw-api-ssl-verify <value>                    Set the RGW_API_SSL_VERIFY option value
dashboard set-rgw-api-user-id <value>                       Set the RGW_API_USER_ID option value
dashboard set-session-expire <int>                          Set the session expire timeout

(9)ceph-deploy admin帮助命令

命令:ceph-deploy admin --help

解析:查看ceph-deploy admin支持全部命令和选项,在实际工作中,查看这个手册应该是必备之选。

usage: ceph-deploy admin [-h] HOST [HOST ...]

Push configuration and client.admin key to a remote host.

positional arguments:
  HOST        host to configure for Ceph administration

optional arguments:
  -h, --help  show this help message and exit

(10)ceph-deploy disk帮助命令

命令:ceph-deploy disk --help

解析:查看ceph-deploy disk支持全部命令和选项,在实际工作中,查看这个手册应该是必备之选。

usage: ceph-deploy disk [-h] {zap,list} ...

Manage disks on a remote host.

positional arguments:
  {zap,list}
    zap       destroy existing data and filesystem on LV or partition
    list      List disk info from remote host(s)

optional arguments:
  -h, --help  show this help message and exit

(11)ceph-deploy purge帮助命令

命令:ceph-deploy purge --help

解析:查看ceph-deploy purge支持全部命令和选项,在实际工作中,查看这个手册应该是必备之选。

usage: ceph-deploy purge [-h] HOST [HOST ...]

Remove Ceph packages from remote hosts and purge all data.

positional arguments:
  HOST        hosts to purge Ceph from

optional arguments:
  -h, --help  show this help message and exit

(12)ceph-deploy purgedata帮助命令

命令:ceph-deploy purgedata --help

解析:查看ceph-deploy purgedata支持全部命令和选项,在实际工作中,查看这个手册应该是必备之选。

usage: ceph-deploy purgedata [-h] HOST [HOST ...]

Purge (delete, destroy, discard, shred) any Ceph data from /var/lib/ceph

positional arguments:
  HOST        hosts to purge Ceph data from

optional arguments:
  -h, --help  show this help message and exit

以上,感谢。

2022年11月26日

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

ceph-deploy命令应用 的相关文章

  • 问题定义过程

    问题定义过程由四步组成 确立需求 证明需求 理解问题和它的上下文和问题陈述 这个模型的主要优点是能够帮助你确定和理解问题的细节 帮助你了解组织的使命和战略在问题解决过程中的的重要性 从这里你可以确定问题是否值得努力寻求解决方案 只有明白了问
  • 自顶向下 逐步求精

    将复杂的大问题分解为相对简单的小问题 找出每个问题的关键 重点所在 然后用精确的思维定性 定量地去 描述问题 其核心本质是 分解 自顶向下 top down 的分析算法通过在最左推导中描述出各个步骤来分析记号串输入 之所以称这样的算法为自顶

随机推荐

  • 埋点系统:详解设计埋点过程中的“who when where how what”

    上次写了一篇 如何用数据驱动产品迭代 其中提到了一点设计埋点的方法 很多朋友留言说需要设计埋点的指南 像我这种从来不拒需求的人 这两天下班闲下来之后就整理了一下埋点设计的一些知识 希望能有所帮助 在诸多招聘 JD 中提到的数据分析能力 主要
  • 使用raspberry pi pico 制作红绿灯

    需要的东西 一块面包版 一块raspberry pi pico 红绿黄led灯各一颗 220欧电阻3只 若干线 编程软件 thonny 操作系统 deepin 23 结果展示 使用raspberry pi pico 制作红绿灯 from m
  • 金山云服务器异常,金山云-文档中心-金山云告诉你:找不到服务器或dns错误怎么办...

    我们在用电脑 会经常使用浏览器 不少人经常在浏览网页时候突然跳出一个提示 上面显示 找不到服器 或 dns错误 下面 给大家分享找不到服务器或dns错误的解决经验 1 病毒所致 如果你电脑中了病毒 让你的DNS被劫持 比如自己的浏览器主页被
  • 【毕业设计】基于PLC的十字路口交通灯控制系统设计【仿真+源码+论文】

    摘 要 本次设计的课题是基于PLC的十字路口交通灯控制系统设计 传统的十字路口交通灯多采用单片机集成电路作为控制系统 单片机系统虽然在功能上能够实现十字路口交通灯的各种控制需求 但是单片机控制系统在设计时需要数字电路与模拟电路的完美结合 这
  • 基于跳表实现的轻量级KV存储引擎 项目总结

    参考 https github com youngyangyang04 Skiplist CPP 项目介绍 KV存储引擎 众所周知 非关系型数据库redis 以及levedb rockdb其核心存储引擎的数据结构就是跳表 本项目就是基于跳表
  • 5.0 Vue中使用webpack

    文章目录 webpack的基本使用 webpack中的插件 webpack打包发布 Source Map 注意 在实际开发中我们并不需要自己配置 webpack webpack中 的用法 在Chrome浏览器中安装vue devtools调
  • QT书籍分享——最全资料汇总

    QT从入门到精通 学习路线 市面上QT学习的书籍也挺多的 今天从学习路径上给大家一一盘点一下 并附上相关链接 大家可以根据需求下载哦 1 语言基础学习 学习QT最最最基础的当然是语言学习了 可以选择C 语言 也可以选择Python语言 C
  • 佛祖保佑,永无bug——springboot项目启动图案的修改方法

    在resources目录 与application yml文件同级目录 下创建banner txt文件 将下面的代码复制进去就好了 AnsiColor BRIGHT YELLOW ooOoo o8888888o
  • 动态规划-各种题型及思路整理(自用笔记,大神绕道)

    目录 简介 分类 基本思想 基本思路 状态转移方程 适用条件 一句话总结 应用 前缀和思想 简介 动态规划 dynamic programming 简称dp 是运筹学的一个分支 是求解决策过程 decision process 最优化的数学
  • 21天学习挑战赛——Python操作MySQL和SqlServer

    目录 1 pymysql模块 2 pymysql模块使用说明 2 1 pymysql操作流程图 2 2 创建连接对象 2 3 获取游标对象 2 4 用法举例 2 4 1 获取一条数据 6 4 2 获取多条数据 6 4 3 对数据进行增删改操
  • 未来社交媒体的变革者

    近日 Meta宣布了其认可的七大社交媒体趋势 这些趋势代表了未来社交媒体发展的核心方向 这些趋势中 生成式AI AR VR营销等引人注目的技术入选 预示着我们即将迎来全新的社交媒体时代 一 生成式AI 像人一样理解并回应 近年来 生成式AI
  • linux 非root用户 安装pyscipopt

    前提 实验室的服务器 我没有root权限 1 尝试用conda方法onda install channel conda forge pyscipopt 出现未知错误 搜遍百度谷歌stackoverflow都没有找到有人和我一样的问题 不知道
  • 基于Java的贪吃蛇小游戏

    一 开发思路 设定一个一定大小的且大小不可变的游戏窗口 在创建的窗口上绘制游戏的基本面板样式 使用提前保存的素材图标绘制一条静态的小蛇 使小蛇能够移动 实际只需蛇头坐标移动 每节身体覆盖前一节身体坐标 设置定时器Timer timer ne
  • Java的异常处理机制

    一 什么是java异常 java异常指在程序运行时可能出现的一些错误 如 文件找不到 网络连接失败 非法参数等 异常是一个事件 它发生在程序运行期间 中断了正在执行的程序的正常指令流 Java通过API中Throwable类的众多子类描述各
  • C# SuperSocket 手把手教你入门 傻瓜教程---9(CountSpliterReceiveFilter - 固定数量分隔符协议)使用COMMAND

    C SuperSocket 手把手教你入门 傻瓜教程系列教程 C SuperSocket 手把手教你入门 傻瓜教程 1 服务器单向接收客户端发送数据 C SuperSocket 手把手教你入门 傻瓜教程 2 服务器和客户端双向通信 C Su
  • Linux服务器wget:unable to resolve host address解决方法

    Linux服务器wget unable to resolve host address解决方法 问题 今天使用虚拟机安装linux系统镜像使用的是CentOS 在一切都准备好的时候 想要去安装Redis时碰到了wget unable to
  • 自定义九宫格控件NineGridLayout ,实现微信朋友圈图片九宫格显示

    前言 很多时候我们都在刷微博或者微信朋友圈的时候都会看到很多图片 而这些图片的显示跟我们平时很多控件的显示方式都不一样 而且 当我们仔细去观察后就会发现 他加载的图片都是根据图片数量动态加载的 根据不同的图片数量来用不同的布局显示 如下图
  • 硬件防火墙和软件防火墙的区别有哪些?

    什么是防火墙 防火墙 指由软件和硬件设备组合而成 在内部网和外部网之间 局域网与外网之间的保护屏障 就像架起了一面墙 它能使网络之间建立起一个安全网关 从而保护内部网免受非法用户的侵入 熟悉互联网的朋友一定对防火墙不陌生 不管是电脑自带的防
  • OBJ格式简单用法

    参考 https www cnblogs com hont p 5239725 html https zhuanlan zhihu com p 342244212 http zwqxin com archives opengl obj mo
  • ceph-deploy命令应用

    记录 336 场景 在CentOS 7 9操作系统上 使用ceph deploy创建ceph集群 部署集群的mon mgr mds osd rgw等组件 版本 操作系统 CentOS 7 9 ceph版本 ceph 13 2 10 名词 c