Using the cephadm shell

The cephadm shell command opens a bash shell in a container with all Ceph packages installed. Use the shell to run “Day One” cluster setup tasks, such as installation and bootstrapping, and to run ceph commands.

Entering the cephadm shell

Before you begin

Before you begin, make sure that you have the following prerequisites in place:
  • A running IBM Storage Ceph cluster.
  • Root-level access to all nodes in the storage cluster.

About this task

Note: If the node contains configuration and keyring files in /etc/ceph/, the container environment uses the values in those files as defaults for the cephadm shell. If you run the cephadm shell on a MON node, the cephadm shell inherits its default configuration from the MON container, instead of using the default configuration.

Procedure

Open the cephadm shell in one of the following ways:
  • Enter cephadm shell at the system prompt.
    This example runs the ceph -s command from within the shell.
    For example,
    [root@host01 ~]# cephadm shell
    [ceph: root@host01 /]# ceph -s
  • At the system prompt, type cephadm shell and the command you want to run.
    For example,
    [root@host01 ~]# cephadm shell ceph -s
    cluster:
        id:     f64f341c-655d-11eb-8778-fa163e914bcc
        health: HEALTH_OK
    
    services:
        mon: 3 daemons, quorum host01,host02,host03 (age 94m)
        mgr: host01.lbnhug(active, since 59m), standbys: host02.rofgay, host03.ohipra
        mds: 1/1 daemons up, 1 standby
        osd: 18 osds: 18 up (since 10m), 18 in (since 10m)
        rgw: 4 daemons active (2 hosts, 1 zones)
    
    data:
        volumes: 1/1 healthy
        pools:   8 pools, 225 pgs
        objects: 230 objects, 9.9 KiB
        usage:   271 MiB used, 269 GiB / 270 GiB avail
        pgs:     225 active+clean
    
    io:
        client:   85 B/s rd, 0 op/s rd, 0 op/s wr

Exiting the cephadm shell

To exit the cephadm shell, use the exit command.
[ceph: root@host01 /]# exit
[root@host01 ~]#