ceph

package: ceph-common

title: ceph(8)

summary: ceph administration tool

text:
# ceph(8)

## NAME
ceph - ceph administration tool

## SYNOPSIS

```
ceph auth [ add | caps | del | export | get | get-key | get-or-create | get-or-create-key | import | list | print-key | print_key ] ...
```

```
ceph compact
```

```
ceph config [ dump | ls | help | get | show | show-with-defaults | set | rm | log | reset | assimilate-conf | generate-minimal-conf ] ...
```

```
ceph config-key [ rm | exists | get | ls | dump | set ] ...
```

```
ceph daemon <name> | <path> <command> ...
```

```
ceph daemonperf <name> | <path> [ interval [ count ] ]
```

```
ceph df {detail}
```

```
ceph fs [ add_data_pool | authorize | dump | feature ls | flag set | get | ls | lsflags | new | rename | reset | required_client_features add | required_client_features rm | rm | rm_data_pool | set | swap ] ...
```

```
ceph fsid
```

```
ceph health {detail}
```

```
ceph injectargs <injectedargs> [ <injectedargs>... ]
```

```
ceph log <logtext> [ <logtext>... ]
```

```
ceph mds [ compat | fail | rm | rmfailed | set_state | stat | repaired ] ...
```

```
ceph mon [ add | dump | enable_stretch_mode | getmap | remove | stat ] ...
```

```
ceph osd [ blocklist | blocked-by | create | new | deep-scrub | df | down | dump | erasure-code-profile | find | getcrushmap | getmap | getmaxosd | in | ls | lspools | map | metadata | ok-to-stop | out | pause | perf | pg-temp | force-create-pg | primary-affinity | primary-temp | repair | reweight | reweight-by-pg | rm | destroy | purge | safe-to-destroy | scrub | set | setcrushmap | setmaxosd  | stat | tree | unpause | unset ] ...
```

```
ceph osd crush [ add | add-bucket | create-or-move | dump | get-tunable | link | move | remove | rename-bucket | reweight | reweight-all | reweight-subtree | rm | rule | set | set-tunable | show-tunables | tunables | unlink ] ...
```

```
ceph osd pool [ create | delete | get | get-quota | ls | mksnap | rename | rmsnap | set | set-quota | stats ] ...
```

```
ceph osd pool application [ disable | enable | get | rm | set ] ...
```

```
ceph osd tier [ add | add-cache | cache-mode | remove | remove-overlay | set-overlay ] ...
```

```
ceph pg [ debug | deep-scrub | dump | dump_json | dump_pools_json | dump_stuck | getmap | ls | ls-by-osd | ls-by-pool | ls-by-primary | map | repair | scrub | stat ] ...
```

```
ceph quorum_status
```

```
ceph report { <tags> [ <tags>... ] }
```

```
ceph status
```

```
ceph sync force {--yes-i-really-mean-it} {--i-know-what-i-am-doing}
```

```
ceph tell <name (type.id)> <command> [options...]
```

```
ceph version
```

## DESCRIPTION
ceph is a control utility which is used for manual deployment and maintenance of a Ceph cluster. It provides a diverse set of commands that allows deployment of monitors, OSDs, placement groups, MDS and overall maintenance, administration of the cluster.

## COMMANDS

### auth
Manage authentication keys. It is used for adding, removing, exporting or updating of authentication keys for a particular entity such as a monitor or OSD. It uses some additional subcommands.

Subcommand add adds authentication info for a particular entity from input file, or random key if no input is given and/or any caps specified in the command.

Usage:

```
ceph auth add <entity> {<caps> [<caps>...]}
```

Subcommand caps updates caps for name from caps specified in the command.

Usage:

```
ceph auth caps <entity> <caps> [<caps>...]
```

Subcommand del deletes all caps for name.

Usage:

```
ceph auth del <entity>
```

Subcommand export writes keyring for requested entity, or master keyring if none given.

Usage:

```
ceph auth export {<entity>}
```

Subcommand get writes keyring file with requested key.

Usage:

```
ceph auth get <entity>
```

Subcommand get-key displays requested key.

Usage:

```
ceph auth get-key <entity>
```

Subcommand get-or-create adds authentication info for a particular entity from input file, or random key if no input given and/or any caps specified in the command.

Usage:

```
ceph auth get-or-create <entity> {<caps> [<caps>...]}
```

Subcommand get-or-create-key gets or adds key for name from system/caps pairs specified in the command. If key already exists, any given caps must match the existing caps for that key.

Usage:

```
ceph auth get-or-create-key <entity> {<caps> [<caps>...]}
```

Subcommand import reads keyring from input file.

Usage:

```
ceph auth import
```

Subcommand ls lists authentication state.

Usage:

```
ceph auth ls
```

Subcommand print-key displays requested key.

Usage:

```
ceph auth print-key <entity>
```

Subcommand print_key displays requested key.

Usage:

```
ceph auth print_key <entity>
```

### compact
Causes compaction of monitor's RocksDB storage.

Usage:

```
ceph compact
```

### config
Configure the cluster. By default, Ceph daemons and clients retrieve their configuration options from monitor when they start, and are updated if any of the tracked options is changed at run time. It uses following additional subcommand.

Subcommand dump to dump all options for the cluster

Usage:

```
ceph config dump
```

Subcommand ls to list all option names for the cluster

Usage:

```
ceph config ls
```

Subcommand help to describe the specified configuration option

Usage:

```
ceph config help <option>
```

Subcommand get to dump the option(s) for the specified entity.

Usage:

```
ceph config get <who> {<option>}
```

Subcommand show to display the running configuration of the specified entity. Please note, unlike get, which only shows the options managed by monitor, show displays all the configurations being actively used. These options are pulled from several sources, for instance, the compiled-in default value, the monitor's configuration database, ceph.conf file on the host. The options can even be overridden at runtime. So, there is chance that the configuration options in the output of show could be different from those in the output of get.

Usage:

```
ceph config show {<who>}
```

Subcommand show-with-defaults to display the running configuration along with the compiled-in defaults of the specified entity

Usage:

```
ceph config show {<who>}
```

Subcommand set to set an option for one or more specified entities

Usage:

```
ceph config set <who> <option> <value> {--force}
```

Subcommand rm to clear an option for one or more entities

Usage:

```
ceph config rm <who> <option>
```

Subcommand log to show recent history of config changes. If count option is omitted it defaults to 10.

Usage:

```
ceph config log {<count>}
```

Subcommand reset to revert configuration to the specified historical version

Usage:

```
ceph config reset <version>
```

Subcommand assimilate-conf to assimilate options from stdin, and return a new, minimal conf file

Usage:

```
ceph config assimilate-conf -i <input-config-path> > <output-config-path>
ceph config assimilate-conf < <input-config-path>
```

Subcommand generate-minimal-conf to generate a minimal ceph.conf file, which can be used for bootstrapping a daemon or a client.

Usage:

```
ceph config generate-minimal-conf > <minimal-config-path>
```

### config-key
Manage configuration key. Config-key is a general purpose key/value service offered by the monitors. This service is mainly used by Ceph tools and daemons for persisting various settings. Among which, ceph-mgr modules uses it for storing their options. It uses some additional subcommands.

Subcommand rm deletes configuration key.

Usage:

```
ceph config-key rm <key>
```

Subcommand exists checks for configuration keys existence.

Usage:

```
ceph config-key exists <key>
```

Subcommand get gets the configuration key.

Usage:

```
ceph config-key get <key>
```

Subcommand ls lists configuration keys.

Usage:

```
ceph config-key ls
```

Subcommand dump dumps configuration keys and values.

Usage:

```
ceph config-key dump
```

Subcommand set puts configuration key and value.

Usage:

```
ceph config-key set <key> {<val>}
```

### daemon
Submit admin-socket commands.

Usage:

```
ceph daemon {daemon_name|socket_path} {command} ...
```

Example:

```
ceph daemon osd.0 help
```

### daemonperf
Watch performance counters from a Ceph daemon.

Usage:

```
ceph daemonperf {daemon_name|socket_path} [{interval} [{count}]]
```

### df
Show cluster's free space status.

Usage:

```
ceph df {detail}
```

### features
Show the releases and features of all connected daemons and clients connected to the cluster, along with the numbers of them in each bucket grouped by the corresponding features/releases. Each release of Ceph supports a different set of features, expressed by the features bitmask. New cluster features require that clients support the feature, or else they are not allowed to connect to these new features. As new features or capabilities are enabled after an upgrade, older clients are prevented from connecting.

Usage:

```
ceph features
```

### fs
Manage cephfs file systems. It uses some additional subcommands.

Subcommand add_data_pool adds an new data pool to the FS. Ths pool can be used for file layouts as an alternate location to store the file data.

Usage:

```
ceph fs add_data_pool <fs-name> <pool name/id>
```

Subcommand authorize creates a new client (if the client doesn't exists on the cluster) that will be authorized for the given path in <fs_name>. Pass / to authorize for the entire FS. <perms> below can be r, rw or rwp.

Running it for an existing client can grant the client a new capability (capability for a different CephFS on the same cluster or for a different path on the same CephFS). Or it can also change read/write permission in the capability that client already holds.

Usage:

```
ceph fs authorize <fs_name> client.<client_id> <path> <perms> [<path> <perms>...]
```

Subcommand dump displays the FSMap at the given epoch (default: current). This includes all file system settings, MDS daemons and the ranks they hold and list of standby MDS daemons.

Usage:

```
ceph fs dump [epoch]
```

Subcommand feature ls lists all CephFS features supported by current version of Ceph.

Usage:

```
ceph fs feature ls
```

Subcommand flag set sets a global CephFS flag. Right now the only flag is enable_multiple which allows multiple CephFSs on a Ceph cluster.

Usage:

```
ceph fs flag set <flag-name> <flag-val> --yes-i-really-mean-it
```

Subcommand get displays the information about FS, including settings and ranks. Information printed here in subset of same information from the fs dump command.

Usage:

```
ceph fs get <fs-name>
```

Subcommand ls to list file systems

Usage:

```
ceph fs ls
```

Subcommand lsflags displays all the flags set on the given FS.

Usage:

```
ceph fs lsflags <fs-name>
```

Subcommand new to make a new file system using named pools <metadata> and <data>

Usage:

```
ceph fs new <fs_name> <metadata> <data>
```

Subcommand rename assigns a new name to CephFS and also updates application tags on the pools of this CephFS.

Usage:

```
ceph fs rename <fs-name> <new-fs-name> {--yes-i-really-mean-it}
```

Subcommand required_client_features disables a client that doesn't possess a certain feature from connecting. This subcommand has two subcommands, one to add a requirement and other to remove the requirement.

Usage:

```
ceph fs required_client_features <fs name> add <feature-name>
ceph fs required_client_features <fs name> rm <feature-name>
```

Subcommand reset is used for disaster recovery only: reset to a single-MDS map

Usage:

```
ceph fs reset <fs_name> {--yes-i-really-mean-it}
```

Subcommand rm to disable the named file system

Usage:

```
ceph fs rm <fs_name> {--yes-i-really-mean-it}
```

Subcommand rm_data_pool removes the specified pool from FS's list of data pools. File data on this pool will become unavailable. Default data pool cannot be removed.

Usage:

```
ceph fs rm_data_pool <fs-name> <pool name/id>
```

Subcommand set sets or updates a FS setting value for given FS name.

Usage:

```
ceph fs set <fs-name> <fs-setting> <value>
```

Subcommand swap swaps the names of two Ceph file system and updates application tags on the pool of the file systems accordingly. Optionally, FSIDs of the filesystems can also be swapped along with names by passing --swap-fscids.

Usage:

```
ceph fs swap <fs1-name> <fs1-id> <fs2-name> <fs2-id> [--swap-fscids] {--yes-i-really-meant-it}
```

### fsid
Show cluster's FSID/UUID.

Usage:

```
ceph fsid
```

### health
Show cluster's health.

Usage:

```
ceph health {detail}
```

### heap
Show heap usage info (available only if compiled with tcmalloc)

Usage:

```
ceph tell <name (type.id)> heap dump|start_profiler|stop_profiler|stats
```

Subcommand release to make TCMalloc to releases no-longer-used memory back to the kernel at once.

Usage:

```
ceph tell <name (type.id)> heap release
```

Subcommand (get|set)_release_rate get or set the TCMalloc memory release rate. TCMalloc releases no-longer-used memory back to the kernel gradually. the rate controls how quickly this happens. Increase this setting to make TCMalloc to return unused memory more frequently. 0 means never return memory to system, 1 means wait for 1000 pages after releasing a page to system. It is 1.0 by default..

Usage:

```
ceph tell <name (type.id)> heap get_release_rate|set_release_rate {<val>}
```

### injectargs
Inject configuration arguments into monitor.

Usage:

```
ceph injectargs <injected_args> [<injected_args>...]
```

### log
Log supplied text to the monitor log.

Usage:

```
ceph log <logtext> [<logtext>...]
```

### mds
Manage metadata server configuration and administration. It uses some additional subcommands.

Subcommand compat manages compatible features. It uses some additional subcommands.

Subcommand rm_compat removes compatible feature.

Usage:

```
ceph mds compat rm_compat <int[0-]>
```

Subcommand rm_incompat removes incompatible feature.

Usage:

```
ceph mds compat rm_incompat <int[0-]>
```

Subcommand show shows mds compatibility settings.

Usage:

```
ceph mds compat show
```

Subcommand fail forces mds to status fail.

Usage:

```
ceph mds fail <role|gid>
```

Subcommand rm removes inactive mds.

Usage:

```
ceph mds rm <int[0-]> <name> (type.id)>
```

Subcommand rmfailed removes failed mds.

Usage:

```
ceph mds rmfailed <int[0-]>
```

Subcommand set_state sets mds state of <gid> to <numeric-state>.

Usage:

```
ceph mds set_state <int[0-]> <int[0-20]>
```

Subcommand stat shows MDS status.

Usage:

```
ceph mds stat
```

Subcommand repaired mark a damaged MDS rank as no longer damaged.

Usage:

```
ceph mds repaired <role>
```

### mon
Manage monitor configuration and administration. It uses some additional subcommands.

Subcommand add adds new monitor named <name> at <addr>.

Usage:

```
ceph mon add <name> <IPaddr[:port]>
```

Subcommand dump dumps formatted monmap (optionally from epoch)

Usage:

```
ceph mon dump {<int[0-]>}
```

Subcommand getmap gets monmap.

Usage:

```
ceph mon getmap {<int[0-]>}
```

Subcommand enable_stretch_mode enables stretch mode, changing the peering rules and failure handling on all pools. For a given PG to successfully peer and be marked active, min_size replicas will now need to be active under all (currently two) CRUSH buckets of type <dividing_bucket>.

<tiebreaker_mon> is the tiebreaker mon to use if a network split happens.

<dividing_bucket> is the bucket type across which to stretch. This will typically be datacenter or other CRUSH hierarchy bucket type that denotes physically or logically distant subdivisions.

<new_crush_rule> will be set as CRUSH rule for all pools.

Usage:

```
ceph mon enable_stretch_mode <tiebreaker_mon> <new_crush_rule> <dividing_bucket>
```

Subcommand remove removes monitor named <name>.

Usage:

```
ceph mon remove <name>
```

Subcommand stat summarizes monitor status.

Usage:

```
ceph mon stat
```

### mgr
Ceph manager daemon configuration and management.

Subcommand dump dumps the latest MgrMap, which describes the active and standby manager daemons.

Usage:

```
ceph mgr dump
```

Subcommand fail will mark a manager daemon as failed, removing it from the manager map. If it is the active manager daemon a standby will take its place.

Usage:

```
ceph mgr fail <name>
```

Subcommand module ls will list currently enabled manager modules (plugins).

Usage:

```
ceph mgr module ls
```

Subcommand module enable will enable a manager module. Available modules are included in MgrMap and visible via mgr dump.

Usage:

```
ceph mgr module enable <module>
```

Subcommand module disable will disable an active manager module.

Usage:

```
ceph mgr module disable <module>
```

Subcommand metadata will report metadata about all manager daemons or, if the name is specified, a single manager daemon.

Usage:

```
ceph mgr metadata [name]
```

Subcommand versions will report a count of running daemon versions.

Usage:

```
ceph mgr versions
```

Subcommand count-metadata will report a count of any daemon metadata field.

Usage:

```
ceph mgr count-metadata <field>
```

### osd
Manage OSD configuration and administration. It uses some additional subcommands.

Subcommand blocklist manage blocklisted clients. It uses some additional subcommands.

Subcommand add add <addr> to blocklist (optionally until <expire> seconds from now)

Usage:

```
ceph osd blocklist add <EntityAddr> {<float[0.0-]>}
```

Subcommand ls show blocklisted clients

Usage:

```
ceph osd blocklist ls
```

Subcommand rm remove <addr> from blocklist

Usage:

```
ceph osd blocklist rm <EntityAddr>
```

Subcommand blocked-by prints a histogram of which OSDs are blocking their peers

Usage:

```
ceph osd blocked-by
```

Subcommand create creates new osd (with optional UUID and ID).

This command is DEPRECATED as of the Luminous release, and will be removed in a future release.

Subcommand new should instead be used.

Usage:

```
ceph osd create {<uuid>} {<id>}
```

Subcommand new can be used to create a new OSD or to recreate a previously destroyed OSD with a specific id. The new OSD will have the specified uuid, and the command expects a JSON file containing the base64 cephx key for auth entity client.osd.<id>, as well as optional base64 cepx key for dm-crypt lockbox access and a dm-crypt key. Specifying a dm-crypt requires specifying the accompanying lockbox cephx key.

Usage:

```
ceph osd new {<uuid>} {<id>} -i {<params.json>}
```

The parameters JSON file is optional but if provided, is expected to maintain a form of the following format:

```
{

    "cephx_secret": "AQBWtwhZdBO5ExAAIDyjK2Bh16ZXylmzgYYEjg==",

    "crush_device_class": "myclass"
}
```

Or:

```
{

    "cephx_secret": "AQBWtwhZdBO5ExAAIDyjK2Bh16ZXylmzgYYEjg==",

    "cephx_lockbox_secret": "AQDNCglZuaeVCRAAYr76PzR1Anh7A0jswkODIQ==",

    "dmcrypt_key": "<dm-crypt key>",

    "crush_device_class": "myclass"
}
```

Or:

```
{

    "crush_device_class": "myclass"
}
```

The "crush_device_class" property is optional. If specified, it will set the initial CRUSH device class for the new OSD.

Subcommand crush is used for CRUSH management. It uses some additional subcommands.

Subcommand add adds or updates crushmap position and weight for <name> with <weight> and location <args>.

Usage:

```
ceph osd crush add <osdname (id|osd.id)> <float[0.0-]> <args> [<args>...]
```

Subcommand add-bucket adds no-parent (probably root) crush bucket <name> of type <type>.

Usage:

```
ceph osd crush add-bucket <name> <type>
```

Subcommand create-or-move creates entry or moves existing entry for <name> <weight> at/to location <args>.

Usage:

```
ceph osd crush create-or-move <osdname (id|osd.id)> <float[0.0-]> <args>
[<args>...]
```

Subcommand dump dumps crush map.

Usage:

```
ceph osd crush dump
```

Subcommand get-tunable get crush tunable straw_calc_version

Usage:

```
ceph osd crush get-tunable straw_calc_version
```

Subcommand link links existing entry for <name> under location <args>.

Usage:

```
ceph osd crush link <name> <args> [<args>...]
```

Subcommand move moves existing entry for <name> to location <args>.

Usage:

```
ceph osd crush move <name> <args> [<args>...]
```

Subcommand remove removes <name> from crush map (everywhere, or just at <ancestor>).

Usage:

```
ceph osd crush remove <name> {<ancestor>}
```

Subcommand rename-bucket renames bucket <srcname> to <dstname>

Usage:

```
ceph osd crush rename-bucket <srcname> <dstname>
```

Subcommand reweight change <name>'s weight to <weight> in crush map.

Usage:

```
ceph osd crush reweight <name> <float[0.0-]>
```

Subcommand reweight-all recalculate the weights for the tree to ensure they sum correctly

Usage:

```
ceph osd crush reweight-all
```

Subcommand reweight-subtree changes all leaf items beneath <name> to <weight> in crush map

Usage:

```
ceph osd crush reweight-subtree <name> <weight>
```

Subcommand rm removes <name> from crush map (everywhere, or just at <ancestor>).

Usage:

```
ceph osd crush rm <name> {<ancestor>}
```

Subcommand rule is used for creating crush rules. It uses some additional subcommands.

Subcommand create-erasure creates crush rule <name> for erasure coded pool created with <profile> (default default).

Usage:

```
ceph osd crush rule create-erasure <name> {<profile>}
```

Subcommand create-simple creates crush rule <name> to start from <root>, replicate across buckets of type <type>, using a choose mode of <firstn|indep> (default firstn; indep best for erasure pools).

Usage:

```
ceph osd crush rule create-simple <name> <root> <type> {firstn|indep}
```

Subcommand dump dumps crush rule <name> (default all).

Usage:

```
ceph osd crush rule dump {<name>}
```

Subcommand ls lists crush rules.

Usage:

```
ceph osd crush rule ls
```

Subcommand rm removes crush rule <name>.

Usage:

```
ceph osd crush rule rm <name>
```

Subcommand set used alone, sets crush map from input file.

Usage:

```
ceph osd crush set
```

Subcommand set with osdname/osd.id update crushmap position and weight for <name> to <weight> with location <args>.

Usage:

```
ceph osd crush set <osdname (id|osd.id)> <float[0.0-]> <args> [<args>...]
```

Subcommand set-tunable set crush tunable <tunable> to <value>. The only tunable that can be set is straw_calc_version.

Usage:

```
ceph osd crush set-tunable straw_calc_version <value>
```

Subcommand show-tunables shows current crush tunables.

Usage:

```
ceph osd crush show-tunables
```

Subcommand tree shows the crush buckets and items in a tree view.

Usage:

```
ceph osd crush tree
```

Subcommand tunables sets crush tunables values to <profile>.

Usage:

```
ceph osd crush tunables legacy|argonaut|bobtail|firefly|hammer|optimal|default
```

Subcommand unlink unlinks <name> from crush map (everywhere, or just at <ancestor>).

Usage:

```
ceph osd crush unlink <name> {<ancestor>}
```

Subcommand df shows OSD utilization

Usage:

```
ceph osd df {plain|tree}
```

Subcommand deep-scrub initiates deep scrub on specified osd.

Usage:

```
ceph osd deep-scrub <who>
```

Subcommand down sets osd(s) <id> [<id>...] down.

Usage:

```
ceph osd down <ids> [<ids>...]
```

Subcommand dump prints summary of OSD map.

Usage:

```
ceph osd dump {<int[0-]>}
```

Subcommand erasure-code-profile is used for managing the erasure code profiles. It uses some additional subcommands.

Subcommand get gets erasure code profile <name>.

Usage:

```
ceph osd erasure-code-profile get <name>
```

Subcommand ls lists all erasure code profiles.

Usage:

```
ceph osd erasure-code-profile ls
```

Subcommand rm removes erasure code profile <name>.

Usage:

```
ceph osd erasure-code-profile rm <name>
```

Subcommand set creates erasure code profile <name> with [<key[=value]> ...] pairs. Add a --force at the end to override an existing profile (IT IS RISKY).

Usage:

```
ceph osd erasure-code-profile set <name> {<profile> [<profile>...]}
```

Subcommand find find osd <id> in the CRUSH map and shows its location.

Usage:

```
ceph osd find <int[0-]>
```

Subcommand getcrushmap gets CRUSH map.

Usage:

```
ceph osd getcrushmap {<int[0-]>}
```

Subcommand getmap gets OSD map.

Usage:

```
ceph osd getmap {<int[0-]>}
```

Subcommand getmaxosd shows largest OSD id.

Usage:

```
ceph osd getmaxosd
```

Subcommand in sets osd(s) <id> [<id>...] in.

Usage:

```
ceph osd in <ids> [<ids>...]
```

Subcommand lost marks osd as permanently lost. THIS DESTROYS DATA IF NO MORE REPLICAS EXIST, BE CAREFUL.

Usage:

```
ceph osd lost <int[0-]> {--yes-i-really-mean-it}
```

Subcommand ls shows all OSD ids.

Usage:

```
ceph osd ls {<int[0-]>}
```

Subcommand lspools lists pools.

Usage:

```
ceph osd lspools {<int>}
```

Subcommand map finds pg for <object> in <pool>.

Usage:

```
ceph osd map <poolname> <objectname>
```

Subcommand metadata fetches metadata for osd <id>.

Usage:

```
ceph osd metadata {int[0-]} (default all)
```

Subcommand out sets osd(s) <id> [<id>...] out.

Usage:

```
ceph osd out <ids> [<ids>...]
```

Subcommand ok-to-stop checks whether the list of OSD(s) can be stopped without immediately making data unavailable. That is, all data should remain readable and writeable, although data redundancy may be reduced as some PGs may end up in a degraded (but active) state. It will return a success code if it is okay to stop the OSD(s), or an error code and informative message if it is not or if no conclusion can be drawn at the current time. When --max <num> is provided, up to <num> OSDs IDs will return (including the provided OSDs) that can all be stopped simultaneously. This allows larger sets of stoppable OSDs to be generated easily by providing a single starting OSD and a max. Additional OSDs are drawn from adjacent locations in the CRUSH hierarchy.

Usage:

```
ceph osd ok-to-stop <id> [<ids>...] [--max <num>]
```

Subcommand pause pauses osd.

Usage:

```
ceph osd pause
```

Subcommand perf prints dump of OSD perf summary stats.

Usage:

```
ceph osd perf
```

Subcommand pg-temp set pg_temp mapping pgid:[<id> [<id>...]] (developers only).

Usage:

```
ceph osd pg-temp <pgid> {<id> [<id>...]}
```

Subcommand force-create-pg forces creation of pg <pgid>.

Usage:

```
ceph osd force-create-pg <pgid>
```

Subcommand pool is used for managing data pools. It uses some additional subcommands.

Subcommand create creates pool.

Usage:

```
ceph osd pool create <poolname> {<int[0-]>} {<int[0-]>} {replicated|erasure}
{<erasure_code_profile>} {<rule>} {<int>} {--autoscale-mode=<on,off,warn>}
```

Subcommand delete deletes pool.

Usage:

```
ceph osd pool delete <poolname> {<poolname>} {--yes-i-really-really-mean-it}
```

Subcommand get gets pool parameter <var>.

Usage:

```
ceph osd pool get <poolname> size|min_size|pg_num|pgp_num|crush_rule|write_fadvise_dontneed
```

Only for tiered pools:

```
ceph osd pool get <poolname> hit_set_type|hit_set_period|hit_set_count|hit_set_fpp|
target_max_objects|target_max_bytes|cache_target_dirty_ratio|cache_target_dirty_high_ratio|
cache_target_full_ratio|cache_min_flush_age|cache_min_evict_age|
min_read_recency_for_promote|hit_set_grade_decay_rate|hit_set_search_last_n
```

Only for erasure coded pools:

```
ceph osd pool get <poolname> erasure_code_profile
```

Use all to get all pool parameters that apply to the pool's type:

```
ceph osd pool get <poolname> all
```

Subcommand get-quota obtains object or byte limits for pool.

Usage:

```
ceph osd pool get-quota <poolname>
```

Subcommand ls list pools

Usage:

```
ceph osd pool ls {detail}
```

Subcommand mksnap makes snapshot <snap> in <pool>.

Usage:

```
ceph osd pool mksnap <poolname> <snap>
```

Subcommand rename renames <srcpool> to <destpool>.

Usage:

```
ceph osd pool rename <poolname> <poolname>
```

Subcommand rmsnap removes snapshot <snap> from <pool>.

Usage:

```
ceph osd pool rmsnap <poolname> <snap>
```

Subcommand set sets pool parameter <var> to <val>.

Usage:

```
ceph osd pool set <poolname> size|min_size|pg_num|
pgp_num|crush_rule|hashpspool|nodelete|nopgchange|nosizechange|
hit_set_type|hit_set_period|hit_set_count|hit_set_fpp|debug_fake_ec_pool|
target_max_bytes|target_max_objects|cache_target_dirty_ratio|
cache_target_dirty_high_ratio|
cache_target_full_ratio|cache_min_flush_age|cache_min_evict_age|
min_read_recency_for_promote|write_fadvise_dontneed|hit_set_grade_decay_rate|
hit_set_search_last_n
<val> {--yes-i-really-mean-it}
```

Subcommand set-quota sets object or byte limit on pool.

Usage:

```
ceph osd pool set-quota <poolname> max_objects|max_bytes <val>
```

Subcommand stats obtain stats from all pools, or from specified pool.

Usage:

```
ceph osd pool stats {<name>}
```

Subcommand application is used for adding an annotation to the given pool. By default, the possible applications are object, block, and file storage (corresponding app-names are "rgw", "rbd", and "cephfs"). However, there might be other applications as well. Based on the application, there may or may not be some processing conducted.

Subcommand disable disables the given application on the given pool.

Usage:

```
ceph osd pool application disable <pool-name> <app> {--yes-i-really-mean-it}
```

Subcommand enable adds an annotation to the given pool for the mentioned application.

Usage:

```
ceph osd pool application enable <pool-name> <app> {--yes-i-really-mean-it}
```

Subcommand get displays the value for the given key that is associated with the given application of the given pool. Not passing the optional arguments would display all key-value pairs for all applications for all pools.

Usage:

```
ceph osd pool application get {<pool-name>} {<app>} {<key>}
```

Subcommand rm removes the key-value pair for the given key in the given application of the given pool.

Usage:

```
ceph osd pool application rm <pool-name> <app> <key>
```

Subcommand set associates or updates, if it already exists, a key-value pair with the given application for the given pool.

Usage:

```
ceph osd pool application set <pool-name> <app> <key> <value>
```

Subcommand primary-affinity adjust osd primary-affinity from 0.0 <=<weight> <= 1.0

Usage:

```
ceph osd primary-affinity <osdname (id|osd.id)> <float[0.0-1.0]>
```

Subcommand primary-temp sets primary_temp mapping pgid:<id>|-1 (developers only).

Usage:

```
ceph osd primary-temp <pgid> <id>
```

Subcommand repair initiates repair on a specified osd.

Usage:

```
ceph osd repair <who>
```

Subcommand reweight reweights osd to 0.0 < <weight> < 1.0.

Usage:

```
osd reweight <int[0-]> <float[0.0-1.0]>
```

Subcommand reweight-by-pg reweight OSDs by PG distribution [overload-percentage-for-consideration, default 120].

Usage:

```
ceph osd reweight-by-pg {<int[100-]>} {<poolname> [<poolname...]}
{--no-increasing}
```

Subcommand reweight-by-utilization reweights OSDs by utilization. It only reweights outlier OSDs whose utilization exceeds the average, eg. the default 120% limits reweight to those OSDs that are more than 20% over the average. [overload-threshold, default 120 [max_weight_change, default 0.05 [max_osds_to_adjust, default 4]]]

Usage:

```
ceph osd reweight-by-utilization {<int[100-]> {<float[0.0-]> {<int[0-]>}}}
{--no-increasing}
```

Subcommand rm removes osd(s) <id> [<id>...] from the OSD map.

Usage:

```
ceph osd rm <ids> [<ids>...]
```

Subcommand destroy marks OSD id as destroyed, removing its cephx entity's keys and all of its dm-crypt and daemon-private config key entries.

This command will not remove the OSD from crush, nor will it remove the OSD from the OSD map. Instead, once the command successfully completes, the OSD will show marked as destroyed.

In order to mark an OSD as destroyed, the OSD must first be marked as lost.

Usage:

```
ceph osd destroy <id> {--yes-i-really-mean-it}
```

Subcommand purge performs a combination of osd destroy, osd rm and osd crush remove.

Usage:

```
ceph osd purge <id> {--yes-i-really-mean-it}
```

Subcommand safe-to-destroy checks whether it is safe to remove or destroy an OSD without reducing overall data redundancy or durability. It will return a success code if it is definitely safe, or an error code and informative message if it is not or if no conclusion can be drawn at the current time.

Usage:

```
ceph osd safe-to-destroy <id> [<ids>...]
```

Subcommand scrub initiates scrub on specified osd.

Usage:

```
ceph osd scrub <who>
```

Subcommand set sets cluster-wide <flag> by updating OSD map. The full flag is not honored anymore since the Mimic release, and ceph osd set full is not supported in the Octopus release.

Usage:

```
ceph osd set pause|noup|nodown|noout|noin|nobackfill|
norebalance|norecover|noscrub|nodeep-scrub|notieragent
```

Subcommand setcrushmap sets crush map from input file.

Usage:

```
ceph osd setcrushmap
```

Subcommand setmaxosd sets new maximum osd value.

Usage:

```
ceph osd setmaxosd <int[0-]>
```

Subcommand set-require-min-compat-client enforces the cluster to be backward compatible with the specified client version. This subcommand prevents you from making any changes (e.g., crush tunables, or using new features) that would violate the current setting. Please note, This subcommand will fail if any connected daemon or client is not compatible with the features offered by the given <version>. To see the features and releases of all clients connected to cluster, please see ceph features.

Usage:

```
ceph osd set-require-min-compat-client <version>
```

Subcommand stat prints summary of OSD map.

Usage:

```
ceph osd stat
```

Subcommand tier is used for managing tiers. It uses some additional subcommands.

Subcommand add adds the tier <tierpool> (the second one) to base pool <pool> (the first one).

Usage:

```
ceph osd tier add <poolname> <poolname> {--force-nonempty}
```

Subcommand add-cache adds a cache <tierpool> (the second one) of size <size> to existing pool <pool> (the first one).

Usage:

```
ceph osd tier add-cache <poolname> <poolname> <int[0-]>
```

Subcommand cache-mode specifies the caching mode for cache tier <pool>.

Usage:

```
ceph osd tier cache-mode <poolname> writeback|proxy|readproxy|readonly|none
```

Subcommand remove removes the tier <tierpool> (the second one) from base pool <pool> (the first one).

Usage:

```
ceph osd tier remove <poolname> <poolname>
```

Subcommand remove-overlay removes the overlay pool for base pool <pool>.

Usage:

```
ceph osd tier remove-overlay <poolname>
```

Subcommand set-overlay set the overlay pool for base pool <pool> to be <overlaypool>.

Usage:

```
ceph osd tier set-overlay <poolname> <poolname>
```

Subcommand tree prints OSD tree.

Usage:

```
ceph osd tree {<int[0-]>}
```

Subcommand unpause unpauses osd.

Usage:

```
ceph osd unpause
```

Subcommand unset unsets cluster-wide <flag> by updating OSD map.

Usage:

```
ceph osd unset pause|noup|nodown|noout|noin|nobackfill|
norebalance|norecover|noscrub|nodeep-scrub|notieragent
```

### pg
It is used for managing the placement groups in OSDs. It uses some additional subcommands.

Subcommand debug shows debug info about pgs.

Usage:

```
ceph pg debug unfound_objects_exist|degraded_pgs_exist
```

Subcommand deep-scrub starts deep-scrub on <pgid>.

Usage:

```
ceph pg deep-scrub <pgid>
```

Subcommand dump shows human-readable versions of pg map (only 'all' valid with plain).

Usage:

```
ceph pg dump {all|summary|sum|delta|pools|osds|pgs|pgs_brief} [{all|summary|sum|delta|pools|osds|pgs|pgs_brief...]}
```

Subcommand dump_json shows human-readable version of pg map in json only.

Usage:

```
ceph pg dump_json {all|summary|sum|delta|pools|osds|pgs|pgs_brief} [{all|summary|sum|delta|pools|osds|pgs|pgs_brief...]}
```

Subcommand dump_pools_json shows pg pools info in json only.

Usage:

```
ceph pg dump_pools_json
```

Subcommand dump_stuck shows information about stuck pgs.

Usage:

```
ceph pg dump_stuck {inactive|unclean|stale|undersized|degraded [inactive|unclean|stale|undersized|degraded...]}
{<int>}
```

Subcommand getmap gets binary pg map to -o/stdout.

Usage:

```
ceph pg getmap
```

Subcommand ls lists pg with specific pool, osd, state

Usage:

```
ceph pg ls {<int>} {<pg-state> [<pg-state>...]}
```

Subcommand ls-by-osd lists pg on osd [osd]

Usage:

```
ceph pg ls-by-osd <osdname (id|osd.id)> {<int>}
{<pg-state> [<pg-state>...]}
```

Subcommand ls-by-pool lists pg with pool = [poolname]

Usage:

```
ceph pg ls-by-pool <poolstr> {<int>} {<pg-state> [<pg-state>...]}
```

Subcommand ls-by-primary lists pg with primary = [osd]

Usage:

```
ceph pg ls-by-primary <osdname (id|osd.id)> {<int>}
{<pg-state> [<pg-state>...]}
```

Subcommand map shows mapping of pg to osds.

Usage:

```
ceph pg map <pgid>
```

Subcommand repair starts repair on <pgid>.

Usage:

```
ceph pg repair <pgid>
```

Subcommand scrub starts scrub on <pgid>.

Usage:

```
ceph pg scrub <pgid>
```

Subcommand stat shows placement group status.

Usage:

```
ceph pg stat
```

### quorum
Cause a specific MON to enter or exit quorum.

Usage:

```
ceph tell mon.<id> quorum enter|exit
```

### quorum_status
Reports status of monitor quorum.

Usage:

```
ceph quorum_status
```

### report
Reports full status of cluster, optional title tag strings.

Usage:

```
ceph report {<tags> [<tags>...]}
```

### status
Shows cluster status.

Usage:

```
ceph status
```

### tell
Sends a command to a specific daemon.

Usage:

```
ceph tell <name (type.id)> <command> [options...]
```

List all available commands.

Usage:

```
ceph tell <name (type.id)> help
```

### version
Show mon daemon version

Usage:

```
ceph version
```

## OPTIONS
-i infile, --in-file=infile

will specify an input file to be passed along as a payload with the command to the monitor cluster. This is only used for specific monitor commands.

-o outfile, --out-file=outfile

will write any payload returned by the monitor cluster with its reply to outfile. Only specific monitor commands (e.g. osd getmap) return a payload.

--setuser user

will apply the appropriate user ownership to the file specified by the option '-o'.

--setgroup group

will apply the appropriate group ownership to the file specified by the option '-o'.

-c ceph.conf, --conf=ceph.conf

Use ceph.conf configuration file instead of the default /etc/ceph/ceph.conf to determine monitor addresses during startup.

--id CLIENT_ID, --user CLIENT_ID

Client id for authentication.

--name CLIENT_NAME, -n CLIENT_NAME

Client name for authentication.

--cluster CLUSTER

Name of the Ceph cluster.

--admin-daemon ADMIN_SOCKET, daemon DAEMON_NAME

Submit admin-socket commands via admin sockets in /var/run/ceph.

--admin-socket ADMIN_SOCKET_NOPE

You probably mean --admin-daemon

-s, --status

Show cluster status.

-w, --watch

Watch live cluster changes on the default 'cluster' channel

-W, --watch-channel

Watch live cluster changes on any channel (cluster, audit, cephadm, or * for all)

--watch-debug

Watch debug events.

--watch-info

Watch info events.

--watch-sec

Watch security events.

--watch-warn

Watch warning events.

--watch-error

Watch error events.

--version, -v

Display version.

--verbose

Make verbose.

--concise

Make less verbose.

-f {json,json-pretty,xml,xml-pretty,plain,yaml}, --format

Format of output.

Note: yaml is only valid for orch commands.

--daemon-output-file OUTPUT_FILE

When using --format=json|json-pretty, you may specify a file name on the host running the daemon to stream output to. Be mindful this is probably not the same machine running the ceph command. So to analyze the output, it will be necessary to fetch the file once the command completes. OUTPUT_FILE may also be :tmp:, indicating that the daemon should create a temporary file (subject to configurations tmp_dir and tmp_file_template).

The tell command will output json with the path to the output file written to, the size of the file, the result code of the command, and any output produced by the command.

Note: this option is only used for ceph tell commands.

--connect-timeout CLUSTER_TIMEOUT

Set a timeout for connecting to the cluster.

--no-increasing

--no-increasing is off by default. So increasing the osd weight is allowed using the reweight-by-utilization or test-reweight-by-utilization commands. If this option is used with these commands, it will help not to increase osd weight even the osd is under utilized.

--block

block until completion (scrub and deep-scrub only)

## AVAILABILITY
ceph is part of Ceph, a massively scalable, open-source, distributed storage system. Please refer to the Ceph documentation at <https://docs.ceph.com> for more information.

## SEE ALSO
ceph-mon <>(8), ceph-osd <>(8), ceph-mds <>(8)

## Copyright
2010-2014, Inktank Storage, Inc. and contributors. Licensed under Creative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0)


ceph-authtool

title: ceph-authtool(8)

summary: ceph keyring manipulation tool

text:
# ceph-authtool(8)

## NAME
ceph-authtool - ceph keyring manipulation tool

## SYNOPSIS

```
ceph-authtool keyringfile
[ -l | --list ]
[ -p | --print-key ]
[ -C | --create-keyring ]
[ -g | --gen-key ]
[ --gen-print-key ]
[ --import-keyring otherkeyringfile ]
[ -n | --name entityname ]
[ -a | --add-key base64_key ]
[ --cap subsystem capability ]
[ --caps capfile ]
[ --mode mode ]
```

## DESCRIPTION
ceph-authtool is a utility to create, view, and modify a Ceph keyring file. A keyring file stores one or more Ceph authentication keys and possibly an associated capability specification. Each key is associated with an entity name, of the form {client,mon,mds,osd}.name.

WARNING Ceph provides authentication and protection against man-in-the-middle attacks once secret keys are in place. However, data over the wire is not encrypted, which may include the messages used to configure said keys. The system is primarily intended to be used in trusted environments.

## OPTIONS
-l, --list

will list all keys and capabilities present in the keyring

-p, --print-key

will print an encoded key for the specified entityname. This is suitable for the mount -o secret= argument

-C, --create-keyring

will create a new keyring, overwriting any existing keyringfile

-g, --gen-key

will generate a new secret key for the specified entityname

--gen-print-key

will generate a new secret key for the specified entityname, without altering the keyringfile, printing the secret to stdout

--import-keyring *secondkeyringfile*

will import the content of a given keyring to the keyringfile

-n, --name *name*

specify entityname to operate on

-a, --add-key *base64_key*

will add an encoded key to the keyring

--cap *subsystem* *capability*

will set the capability for given subsystem

--caps *capsfile*

will set all of capabilities associated with a given key, for all subsystems

--mode *mode*

will set the desired file mode to the keyring e.g: 0644, defaults to 0600

## CAPABILITIES
The subsystem is the name of a Ceph subsystem: mon, mds, or osd.

The capability is a string describing what the given user is allowed to do. This takes the form of a comma separated list of allow clauses with a permission specifier containing one or more of rwx for read, write, and execute permission. The allow * grants full superuser permissions for the given subsystem.

For example:

```
# can read, write, and execute objects
osd = "allow rwx"
# can access mds server
mds = "allow"
# can modify cluster state (i.e., is a server daemon)
mon = "allow rwx"
```

A librados user restricted to a single pool might look like:

```
mon = "allow r"
osd = "allow rw pool foo"
```

A client using rbd with read access to one pool and read/write access to another:

```
mon = "allow r"
osd = "allow class-read object_prefix rbd_children, allow pool templates r class-read, allow pool vms rwx"
```

A client mounting the file system with minimal permissions would need caps like:

```
mds = "allow"
osd = "allow rw pool data"
mon = "allow r"
```

## OSD CAPABILITIES
In general, an osd capability follows the grammar:

```
osdcap  := grant[,grant...]
grant   := allow (match capspec | capspec match)
match   := [ pool[=]<poolname> | object_prefix <prefix>

            | namespace[=]<rados-namespace>

            | tag <application-name> <key>=<value> ]
capspec := * | [r][w][x] [class-read] [class-write]
```

The capspec determines what kind of operations the entity can perform:

```
r           = read access to objects
w           = write access to objects
x           = can call any class method (same as class-read class-write)
class-read  = can call class methods that are reads
class-write = can call class methods that are writes
* or "all"  = equivalent to rwx, plus the ability to run osd admin commands,

              i.e. ceph osd tell ...
```

The match criteria restrict a grant based on the pool being accessed. Grants are additive if the client fulfills the match condition. For example, if a client has the osd capabilities: "allow r object_prefix prefix, allow w pool foo, allow x pool bar", then it has rw access to pool foo, rx access to pool bar, and r access to objects whose names begin with 'prefix' in any pool.

## CAPS FILE FORMAT
The caps file format consists of zero or more key/value pairs, one per line. The key and value are separated by an =, and the value must be quoted (with ' or ") if it contains any whitespace. The key is the name of the Ceph subsystem (osd, mds, mon), and the value is the capability string (see above).

## EXAMPLE
To create a new keyring containing a key for client.foo with a 0644 file mode:

```
ceph-authtool -C -n client.foo --gen-key keyring --mode 0644
```

To associate some capabilities with the key (namely, the ability to mount a Ceph file system):

```
ceph-authtool -n client.foo --cap mds 'allow' --cap osd 'allow rw pool=data' --cap mon 'allow r' keyring
```

To display the contents of the keyring:

```
ceph-authtool -l keyring
```

When mounting a Ceph file system, you can grab the appropriately encoded secret key with:

```
mount -t ceph serverhost:/ mountpoint -o name=foo,secret=`ceph-authtool -p -n client.foo keyring`
```

## AVAILABILITY
ceph-authtool is part of Ceph, a massively scalable, open-source, distributed storage system. Please refer to the Ceph documentation at <https://docs.ceph.com> for more information.

## SEE ALSO
ceph <>(8)

## Copyright
2010-2014, Inktank Storage, Inc. and contributors. Licensed under Creative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0)

branch: sisyphus


ceph-conf

title: ceph-conf(8)

summary: ceph conf file tool

text:
# ceph-conf(8)

## NAME
ceph-conf - ceph conf file tool

## SYNOPSIS

```
ceph-conf -c conffile --list-all-sections
ceph-conf -c conffile -L
ceph-conf -c conffile -l prefix
ceph-conf key -s section1 ...
ceph-conf [-s section ] [-r] --lookup key
ceph-conf [-s section ] key
```

## DESCRIPTION
ceph-conf is a utility for getting information from a ceph configuration file. As with most Ceph programs, you can specify which Ceph configuration file to use with the -c flag.

Note that unlike other ceph tools, ceph-conf will only read from config files (or return compiled-in default values)--it will not fetch config values from the monitor cluster. For this reason it is recommended that ceph-conf only be used in legacy environments that are strictly config-file based. New deployments and tools should instead rely on either querying the monitor explicitly for configuration (e.g., ceph config get <daemon> <option>) or use daemons themselves to fetch effective config options (e.g., ceph-osd -i 123 --show-config-value osd_data). The latter option has the advantages of drawing from compiled-in defaults (which occasionally vary between daemons), config files, and the monitor's config database, providing the exact value that that daemon would be using if it were started.

## ACTIONS
ceph-conf performs one of the following actions:

-L, --list-all-sections

list all sections in the configuration file.

-l, --list-sections *prefix*

list the sections with the given prefix. For example, --list-sections mon would list all sections beginning with mon.

--lookup *key*

search and print the specified configuration setting. Note: --lookup is the default action. If no other actions are given on the command line, we will default to doing a lookup.

-h, --help

print a summary of usage.

## OPTIONS
-c *conffile*

the Ceph configuration file.

--filter-key *key*

filter section list to only include sections with given key defined.

--filter-key-value *key* ``=`` *value*

filter section list to only include sections with given key/value pair.

--name *type.id*

the Ceph name in which the sections are searched (default 'client.admin'). For example, if we specify --name osd.0, the following sections will be searched: [osd.0], [osd], [global]

--pid *pid*

override the $pid when expanding options. For example, if an option is configured like /var/log/$name.$pid.log, the $pid portion in its value will be substituted using the PID of ceph-conf instead of the PID of the process specified using the --name option.

-r, --resolve-search

search for the first file that exists and can be opened in the resulted comma delimited search list.

-s, --section

additional sections to search. These additional sections will be searched before the sections that would normally be searched. As always, the first matching entry we find will be returned.

## EXAMPLES
To find out what value osd 0 will use for the "osd data" option:

```
ceph-conf -c foo.conf  --name osd.0 --lookup "osd data"
```

To find out what value will mds a use for the "log file" option:

```
ceph-conf -c foo.conf  --name mds.a "log file"
```

To list all sections that begin with "osd":

```
ceph-conf -c foo.conf -l osd
```

To list all sections:

```
ceph-conf -c foo.conf -L
```

To print the path of the "keyring" used by "client.0":

```
ceph-conf --name client.0 -r -l keyring
```

## FILES
/etc/ceph/$cluster.conf, ~/.ceph/$cluster.conf, $cluster.conf

the Ceph configuration files to use if not specified.

## AVAILABILITY
ceph-conf is part of Ceph, a massively scalable, open-source, distributed storage system. Please refer to the Ceph documentation at <https://docs.ceph.com> for more information.

## SEE ALSO
ceph <>(8),

## Copyright
2010-2014, Inktank Storage, Inc. and contributors. Licensed under Creative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0)


ceph-dencoder

title: ceph-dencoder(8)

summary: ceph encoder/decoder utility

text:
# ceph-dencoder(8)

## NAME
ceph-dencoder - ceph encoder/decoder utility

## SYNOPSIS

```
ceph-dencoder [commands...]
```

## DESCRIPTION
ceph-dencoder is a utility to encode, decode, and dump ceph data structures. It is used for debugging and for testing inter-version compatibility.

ceph-dencoder takes a simple list of commands and performs them in order.

## COMMANDS
version

Print the version string for the ceph-dencoder binary.

import <file>

Read a binary blob of encoded data from the given file. It will be placed in an in-memory buffer.

export <file>

Write the contents of the current in-memory buffer to the given file.

list_types

List the data types known to this build of ceph-dencoder.

type <name>

Select the given type for future encode or decode operations.

skip <bytes>

Seek <bytes> into the imported file before reading data structure, use this with objects that have a preamble/header before the object of interest.

decode

Decode the contents of the in-memory buffer into an instance of the previously selected type. If there is an error, report it.

encode

Encode the contents of the in-memory instance of the previously selected type to the in-memory buffer.

dump_json

Print a JSON-formatted description of the in-memory object.

count_tests

Print the number of built-in test instances of the previously selected type that ceph-dencoder is able to generate.

select_test <n>

Select the given built-in test instance as the in-memory instance of the type.

get_features

Print the decimal value of the feature set supported by this version of ceph-dencoder. Each bit represents a feature. These correspond to CEPH_FEATURE_* defines in src/include/ceph_features.h.

set_features <f>

Set the feature bits provided to encode to f. This allows you to encode objects such that they can be understood by old versions of the software (for those types that support it).

## EXAMPLE
Say you want to examine an attribute on an object stored by ceph-osd. You can do this:

```
$ cd /mnt/osd.12/current/2.b_head
$ attr -l foo_bar_head_EFE6384B
Attribute "ceph.snapset" has a 31 byte value for foo_bar_head_EFE6384B
Attribute "ceph._" has a 195 byte value for foo_bar_head_EFE6384B
$ attr foo_bar_head_EFE6384B -g ceph._ -q > /tmp/a
$ ceph-dencoder type object_info_t import /tmp/a decode dump_json
{ "oid": { "oid": "foo",

      "key": "bar",

      "snapid": -2,

      "hash": 4024842315,

      "max": 0},

  "locator": { "pool": 2,

      "preferred": -1,

      "key": "bar"},

  "category": "",

  "version": "9'1",

  "prior_version": "0'0",

  "last_reqid": "client.4116.0:1",

  "size": 1681,

  "mtime": "2012-02-21 08:58:23.666639",

  "lost": 0,

  "wrlock_by": "unknown.0.0:0",

  "snaps": [],

  "truncate_seq": 0,

  "truncate_size": 0,

  "watchers": {}}
```

Alternatively, perhaps you wish to dump an internal CephFS metadata object, you might do that like this:

```
$ rados -p metadata get mds_snaptable mds_snaptable.bin
$ ceph-dencoder type SnapServer skip 8 import mds_snaptable.bin decode dump_json
{ "snapserver": { "last_snap": 1,

   "pending_noop": [],

   "snaps": [],

   "need_to_purge": {},

   "pending_create": [],

   "pending_destroy": []}}
```

## AVAILABILITY
ceph-dencoder is part of Ceph, a massively scalable, open-source, distributed storage system. Please refer to the Ceph documentation at <https://docs.ceph.com> for more information.

## SEE ALSO
ceph <>(8)

## Copyright
2010-2014, Inktank Storage, Inc. and contributors. Licensed under Creative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0)


ceph-post-file

title: ceph-post-file(8)

summary: post files for ceph developers

text:
# ceph-post-file(8)

## NAME
ceph-post-file - post files for ceph developers

## SYNOPSIS

```
ceph-post-file [-d description] [-u *user] file or dir ...
```

## DESCRIPTION
ceph-post-file will upload files or directories to ceph.com for later analysis by Ceph developers.

Each invocation uploads files or directories to a separate directory with a unique tag. That tag can be passed to a developer or referenced in a bug report (<http://tracker.ceph.com/>). Once the upload completes, the directory is marked non-readable and non-writeable to prevent access or modification by other users.

## WARNING
Basic measures are taken to make posted data be visible only to developers with access to ceph.com infrastructure. However, users should think twice and/or take appropriate precautions before posting potentially sensitive data (for example, logs or data directories that contain Ceph secrets).

## OPTIONS
-d *description*, --description *description*

Add a short description for the upload. This is a good opportunity to reference a bug number. There is no default value.

-u *user*

Set the user metadata for the upload. This defaults to whoami`@`hostname -f.

## EXAMPLES
To upload a single log:

```
ceph-post-file /var/log/ceph/ceph-mon.`hostname`.log
```

To upload several directories:

```
ceph-post-file -d 'mon data directories' /var/log/ceph/mon/*
```

## AVAILABILITY
ceph-post-file is part of Ceph, a massively scalable, open-source, distributed storage system. Please refer to the Ceph documentation at <https://docs.ceph.com> for more information.

## SEE ALSO
ceph <>(8), ceph-debugpack <>(8),

## Copyright
2010-2014, Inktank Storage, Inc. and contributors. Licensed under Creative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0)


ceph-rbdnamer

title: ceph-rbdnamer(8)

summary: udev helper to name RBD devices

text:
# ceph-rbdnamer(8)

## NAME
ceph-rbdnamer - udev helper to name RBD devices

## SYNOPSIS

```
ceph-rbdnamer num
```

## DESCRIPTION
ceph-rbdnamer prints the pool, namespace, image and snapshot names for a given RBD device to stdout. It is used by udev device manager to set up RBD device symlinks. The appropriate udev rules are provided in a file named 50-rbd.rules.

## AVAILABILITY
ceph-rbdnamer is part of Ceph, a massively scalable, open-source, distributed storage system. Please refer to the Ceph documentation at <https://docs.ceph.com> for more information.

## SEE ALSO
rbd <>(8), ceph <>(8)

## Copyright
2010-2014, Inktank Storage, Inc. and contributors. Licensed under Creative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0)


ceph-syn

title: ceph-syn(8)

summary: ceph synthetic workload generator

text:
# ceph-syn(8)

## NAME
ceph-syn - ceph synthetic workload generator

## SYNOPSIS

```
ceph-syn [ -m monaddr:port ] --syn command ...
```

## DESCRIPTION
ceph-syn is a simple synthetic workload generator for the Ceph distributed file system. It uses the userspace client library to generate simple workloads against a currently running file system. The file system need not be mounted via ceph-fuse(8) or the kernel client.

One or more --syn command arguments specify the particular workload, as documented below.

## OPTIONS
-d

Detach from console and daemonize after startup.

-c ceph.conf, --conf=ceph.conf

Use ceph.conf configuration file instead of the default /etc/ceph/ceph.conf to determine monitor addresses during startup.

-m monaddress[:port]

Connect to specified monitor (instead of looking through ceph.conf).

--num_client num

Run num different clients, each in a separate thread.

--syn workloadspec

Run the given workload. May be specified as many times as needed. Workloads will normally run sequentially.

## WORKLOADS
Each workload should be preceded by --syn on the command line. This is not a complete list.

mknap path snapname

Create a snapshot called snapname on path.

rmsnap path snapname

Delete snapshot called snapname on path.

rmfile path

Delete/unlink path.

writefile sizeinmb blocksize

Create a file, named after our client id, that is sizeinmb MB by writing blocksize chunks.

readfile sizeinmb blocksize

Read file, named after our client id, that is sizeinmb MB by writing blocksize chunks.

rw sizeinmb blocksize

Write file, then read it back, as above.

makedirs numsubdirs numfiles depth

Create a hierarchy of directories that is depth levels deep. Give each directory numsubdirs subdirectories and numfiles files.

walk

Recursively walk the file system (like find).

## AVAILABILITY
ceph-syn is part of Ceph, a massively scalable, open-source, distributed storage system. Please refer to the Ceph documentation at <https://docs.ceph.com> for more information.

## SEE ALSO
ceph <>(8), ceph-fuse <>(8)

## Copyright
2010-2014, Inktank Storage, Inc. and contributors. Licensed under Creative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0)


crushdiff

title: crushdiff(8)

summary: ceph crush map test tool

text:
# crushdiff(8)

## NAME
crushdiff - ceph crush map test tool

## SYNOPSIS

```
crushdiff [ --osdmap osdmap ] [ --pg-dump pg-dump ]
[ --compiled ] [ --verbose ] command crushmap
```

## DESCRIPTION
crushdiff is a utility that lets you test the effect of a crushmap change: number of pgs, objects, bytes moved. This is a wrapper around osdmaptool <>(8), relying on its --test-map-pgs-dump option to get the list of changed pgs. Additionally it uses pg stats to calculate the numbers of objects and bytes moved.

By default, crushdiff will use the cluster current osdmap and pg stats, which requires access to the cluster. Though one can use the --osdmap and --pg-dump options to test against previously obtained data.

## OPTIONS
--compiled

The input/output crushmap is compiled. If the options is not specified the expected/returned crushmap is in txt (decompiled) format.

--pg-dump <pg-dump>

JSON output of ceph pg dump. If not specified crushdiff will try to get data running the command itself.

--osdmap <osdmap>

The cluster osdmap, obtained with ceph osd getmap command. If not specified crushdiff will try to get data running the command itself.

--verbose

Produce diagnostic output.

## COMMANDS
compare crushmap

Compare the crushmap from crushmap file with the crushmap from the cluster osdmap. The output will show the expected number of pgs, objects, bytes moved when the new crushmap is installed.

export crushmap

Export crushmap to crushmap file from the cluster osdmap.

import crushmap

Import crushmap from crushmap file to the cluster osdmap.

## EXAMPLE
Get the current crushmap:

```
crushdiff export cm.txt
```

Edit the map:

```
$EDITOR cm.txt
```

Check the result:

```
crushdiff compare cm.txt
79/416 (18.99%) pgs affected
281/1392 (20.19%) objects affected
80/1248 (6.41%) pg shards to move
281/4176 (6.73%) pg object shards to move
730.52Mi/10.55Gi (6.76%) bytes to move
```

When running with --verbose option the output will also contain detailed information about the affected pgs, like below:

```
4.3     [0, 2, 1] -> [1, 4, 2]
4.b     [0, 1, 3] -> [2, 1, 3]
4.c     [4, 0, 1] -> [4, 1, 2]
```

i.e. a pg number, and its old and the new osd active sets.

If the result is satisfactory install the updated map:

```
crushdiff import cm.txt
```

## AVAILABILITY
crushdiff is part of Ceph, a massively scalable, open-source, distributed storage system. Please refer to the Ceph documentation at <https://docs.ceph.com> for more information.

## SEE ALSO
ceph <>(8), crushtool <>(8), osdmaptool <>(8),

## Copyright
2010-2014, Inktank Storage, Inc. and contributors. Licensed under Creative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0)


mount.ceph

title: mount.ceph(8)

summary: mount a Ceph file system

text:
# mount.ceph(8)

## NAME
mount.ceph - mount a Ceph file system

## SYNOPSIS

```
mount.ceph name*@*fsid.*fs_name*=/[subdir] dir [-o options ]
```

## DESCRIPTION
mount.ceph is a helper for mounting the Ceph file system on a Linux host. It serves to resolve monitor hostname(s) into IP addresses and read authentication keys from disk; the Linux kernel client component does most of the real work. To mount a Ceph file system use:

```
mount.ceph name@07fe3187-00d9-42a3-814b-72a4d5e7d5be.fs_name=/ /mnt/mycephfs -o mon_addr=1.2.3.4
```

where "name" is the RADOS client name (referred to hereafter as "RADOS user", and meaning any individual or system actor such as an application).

Mount helper can fill in the cluster FSID by reading the ceph configuration file. Its recommended to call the mount helper via mount(8) as per:

```
mount -t ceph name@.fs_name=/ /mnt/mycephfs -o mon_addr=1.2.3.4
```

Note that the dot . still needs to be a part of the device string in this case.

The first argument is the device part of the mount command. It includes the RADOS user for authentication, the file system name and a path within CephFS that will be mounted at the mount point.

Monitor addresses can be passed using mon_addr mount option. Multiple monitor addresses can be passed by separating addresses with a slash (/). Only one monitor is needed to mount successfully; the client will learn about all monitors from any responsive monitor. However, it is a good idea to specify more than one in case the one happens to be down at the time of mount. Monitor addresses takes the form ip_address[:port]. If the port is not specified, the Ceph default of 6789 is assumed.

If monitor addresses are not specified, then mount.ceph will attempt to determine monitor addresses using local configuration files and/or DNS SRV records. In similar way, if authentication is enabled on Ceph cluster (which is done using CephX) and options secret and secretfile are not specified in the command, the mount helper will spawn a child process that will use the standard Ceph library routines to find a keyring and fetch the secret from it (including the monitor address and FSID if those not specified).

A sub-directory of the file system can be mounted by specifying the (absolute) path to the sub-directory right after "=" in the device part of the mount command.

Mount helper application conventions dictate that the first two options are device to be mounted and the mount point for that device. Options must be passed only after these fixed arguments.

## OPTIONS

### Basic
conf

Path to a ceph.conf file. This is used to initialize the Ceph context for autodiscovery of monitor addresses and auth secrets. The default is to use the standard search path for ceph.conf files.

mount_timeout

int (seconds), Default: 60

ms_mode=<legacy|crc|secure|prefer-crc|prefer-secure>

Set the connection mode that the client uses for transport. The available modes are:

- legacy: use messenger v1 protocol to talk to the cluster

- crc: use messenger v2, without on-the-wire encryption

- secure: use messenger v2, with on-the-wire encryption

- prefer-crc: crc mode, if denied agree to secure mode

- prefer-secure: secure mode, if denied agree to crc mode

mon_addr

Monitor address of the cluster in the form of ip_address[:port]

fsid

Cluster FSID. This can be found using ceph fsid command.

secret

secret key for use with CephX. This option is insecure because it exposes the secret on the command line. To avoid this, use the secretfile option.

secretfile

path to file containing the secret key to use with CephX

recover_session=<no|clean>

Set auto reconnect mode in the case where the client is blocklisted. The available modes are no and clean. The default is no.

- no: never attempt to reconnect when client detects that it has been blocklisted. Blocklisted clients will not attempt to reconnect and their operations will fail too.

- clean: client reconnects to the Ceph cluster automatically when it detects that it has been blocklisted. During reconnect, client drops dirty data/metadata, invalidates page caches and writable file handles. After reconnect, file locks become stale because the MDS loses track of them. If an inode contains any stale file locks, read/write on the inode is not allowed until applications release all stale file locks.

command

fs=<fs-name> Specify the non-default file system to be mounted, when using the old syntax.

command

mds_namespace=<fs-name> A synonym of "fs=" (Deprecated).

### Advanced
cap_release_safety

int, Default: calculated

caps_wanted_delay_max

int, cap release delay, Default: 60

caps_wanted_delay_min

int, cap release delay, Default: 5

dirstat

funky cat dirname for stats, Default: off

nodirstat

no funky cat dirname for stats

ip

my ip

noasyncreaddir

no dcache readdir

nocrc

no data crc on writes

noshare

create a new client instance, instead of sharing an existing instance of a client mounting the same cluster

osdkeepalive

int, Default: 5

osd_idle_ttl

int (seconds), Default: 60

rasize

int (bytes), max readahead. Default: 8388608 (8192*1024)

rbytes

Report the recursive size of the directory contents for st_size on directories. Default: off

norbytes

Do not report the recursive size of the directory contents for st_size on directories.

readdir_max_bytes

int, Default: 524288 (512*1024)

readdir_max_entries

int, Default: 1024

rsize

int (bytes), max read size. Default: 16777216 (16*1024*1024)

snapdirname

string, set the name of the hidden snapdir. Default: .snap

write_congestion_kb

int (kb), max writeback in flight. scale with available memory. Default: calculated from available memory

wsize

int (bytes), max write size. Default: 16777216 (16*1024*1024) (writeback uses smaller of wsize and stripe unit)

wsync

Execute all namespace operations synchronously. This ensures that the namespace operation will only complete after receiving a reply from the MDS.

nowsync

Allow the client to do namespace operations asynchronously. When this option is enabled, a namespace operation may complete before the MDS replies, if it has sufficient capabilities to do so. This has been the default since kernel version 5.16.

crush_location=x

Specify the location of the client in terms of CRUSH hierarchy (since 5.8). This is a set of key-value pairs separated from each other by '|', with keys separated from values by ':'. Note that '|' may need to be quoted or escaped to avoid it being interpreted as a pipe by the shell. The key is the bucket type name (e.g. rack, datacenter or region with default bucket types) and the value is the bucket name. For example, to indicate that the client is local to rack "myrack", data center "mydc" and region "myregion":

```
crush_location=rack:myrack|datacenter:mydc|region:myregion
```

Each key-value pair stands on its own: "myrack" doesn't need to reside in "mydc", which in turn doesn't need to reside in "myregion". The location is not a path to the root of the hierarchy but rather a set of nodes that are matched independently. "Multipath" locations are supported, so it is possible to indicate locality for multiple parallel hierarchies:

```
crush_location=rack:myrack1|rack:myrack2|datacenter:mydc
```

read_from_replica=<no|balance|localize>

- no: Disable replica reads, always pick the primary OSD (since 5.8, default).

- balance: When a replicated pool receives a read request, pick a random OSD from the PG's acting set to serve it (since 5.8). This mode is safe for general use only since Octopus (i.e. after "ceph osd require-osd-release octopus"). Otherwise it should be limited to read-only workloads such as snapshots.

- localize: When a replicated pool receives a read request, pick the most local OSD to serve it (since 5.8). The locality metric is calculated against the location of the client given with crush_location; a match with the lowest-valued bucket type wins. For example, an OSD in a matching rack is closer than an OSD in a matching data center, which in turn is closer than an OSD in a matching region. This mode is safe for general use only since Octopus (i.e. after "ceph osd require-osd-release octopus"). Otherwise it should be limited to read-only workloads such as snapshots.

## EXAMPLES
Mount the full file system:

```
mount -t ceph fs_user@.mycephfs2=/ /mnt/mycephfs
```

Mount only part of the namespace/file system:

```
mount.ceph fs_user@.mycephfs2=/some/directory/in/cephfs /mnt/mycephfs
```

Pass the monitor host's IP address, optionally:

```
mount.ceph fs_user@.mycephfs2=/ /mnt/mycephfs -o mon_addr=192.168.0.1
```

Pass the port along with IP address if it's running on a non-standard port:

```
mount.ceph fs_user@.mycephfs2=/ /mnt/mycephfs -o mon_addr=192.168.0.1:7000
```

If there are multiple monitors, pass each address separated by a /:

```
mount.ceph fs_user@.mycephfs2=/ /mnt/mycephfs -o mon_addr=192.168.0.1/192.168.0.2/192.168.0.3
```

Pass secret key for CephX user optionally:

```
mount.ceph fs_user@.mycephfs2=/ /mnt/mycephfs -o secret=AQATSKdNGBnwLhAAnNDKnH65FmVKpXZJVasUeQ==
```

Pass file containing secret key to avoid leaving secret key in shell's command history:

```
mount.ceph fs_user@.mycephfs2=/ /mnt/mycephfs -o secretfile=/etc/ceph/fs_username.secret
```

If authentication is disabled on Ceph cluster, omit the credential related option:

```
mount.ceph fs_user@.mycephfs2=/ /mnt/mycephfs
```

To mount using the old syntax:

```
mount -t ceph 192.168.0.1:/ /mnt/mycephfs
```

## AVAILABILITY
mount.ceph is part of Ceph, a massively scalable, open-source, distributed storage system. Please refer to the Ceph documentation at <https://docs.ceph.com> for more information.

## FEATURE AVAILABILITY
The recover_session= option was added to mainline Linux kernels in v5.4. wsync and nowsync were added in v5.7.

## SEE ALSO
ceph-fuse <>(8), ceph <>(8)

## Copyright
2010-2014, Inktank Storage, Inc. and contributors. Licensed under Creative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0)


rados

title: rados(8)

summary: rados object storage utility

text:
# rados(8)

## NAME
rados - rados object storage utility

## SYNOPSIS

```
rados [ options ] [ command ]
```

## DESCRIPTION
rados is a utility for interacting with a Ceph object storage cluster (RADOS), part of the Ceph distributed storage system.

## GLOBAL OPTIONS
--object-locator object_locator

Set object_locator for operation.

-p pool, --pool pool

Interact with the given pool. Required by most commands.

--target-pool pool

Select target pool by name.

--pgid

As an alternative to --pool, --pgid also allow users to specify the PG id to which the command will be directed. With this option, certain commands like ls allow users to limit the scope of the command to the given PG.

-N namespace, --namespace namespace

Specify the rados namespace to use for the object.

--all

Use with ls to list objects in all namespaces. Put in CEPH_ARGS environment variable to make this the default.

--default

Use with ls to list objects in default namespace. Takes precedence over --all in case --all is in environment.

-s snap, --snap snap

Read from the given pool snapshot. Valid for all pool-specific read operations.

--create

Create the pool or directory that was specified.

-i infile

will specify an input file to be passed along as a payload with the command to the monitor cluster. This is only used for specific monitor commands.

-m monaddress[:port]

Connect to specified monitor (instead of looking through ceph.conf).

-b block_size

Set the block size for put/get/append ops and for write benchmarking.

--striper

Uses the striping API of rados rather than the default one. Available for stat, stat2, get, put, append, truncate, rm, ls and all xattr related operation.

-O object_size, --object-size object_size

Set the object size for put/get ops and for write benchmarking.

--max-objects

Set the max number of objects for write benchmarking.

--lock-cookie locker-cookie

Will set the lock cookie for acquiring advisory lock (lock get command). If the cookie is not empty, this option must be passed to lock break command to find the correct lock when releasing lock.

--target-locator

Use with cp to specify the locator of the new object.

--target-nspace

Use with cp to specify the namespace of the new object.

## BENCH OPTIONS
-t N, --concurrent-ios=N

Set number of concurrent I/O operations.

--show-time

Prefix output with date/time.

--no-verify

Do not verify contents of read objects.

--write-object

Write contents to the objects.

--write-omap

Write contents to the omap.

--write-xattr

Write contents to the extended attributes.

## LOAD GEN OPTIONS
--num-objects

Total number of objects.

--min-object-size

Min object size.

--max-object-size

Max object size.

--min-op-len

Min io size of operations.

--max-op-len

Max io size of operations.

--max-ops

Max number of operations.

--max-backlog

Max backlog size.

--read-percent

Percent of operations that are read.

--target-throughput

Target throughput (in bytes).

--run-length

Total time (in seconds).

--offset-align

At what boundary to align random op offsets.

## CACHE POOLS OPTIONS
--with-clones

Include clones when doing flush or evict.

## OMAP OPTIONS
--omap-key-file file

Read the omap key from a file.

## GENERIC OPTIONS
-c FILE, --conf FILE

Read configuration from the given configuration file.

--id ID

Set ID portion of my name.

-n TYPE.ID, --name TYPE.ID

Set cephx user name.

--cluster NAME

Set cluster name (default: ceph).

--setuser USER

Set uid to user or uid (and gid to user's gid).

--setgroup GROUP

Set gid to group or gid.

--version

Show version and quit.

## GLOBAL COMMANDS
lspools

List object pools

df

Show utilization statistics, including disk usage (bytes) and object counts, over the entire system and broken down by pool.

list-inconsistent-pg pool

List inconsistent PGs in given pool.

list-inconsistent-obj pgid

List inconsistent objects in given PG.

list-inconsistent-snapset pgid

List inconsistent snapsets in given PG.

## POOL SPECIFIC COMMANDS
get name outfile

Read object name from the cluster and write it to outfile.

put name infile [--offset offset]

Write object name with start offset (default:0) to the cluster with contents from infile. Warning: The put command creates a single RADOS object, sized just as large as your input file. Unless your objects are of reasonable and consistent sizes, that is probably not what you want -- consider using RGW/S3, CephFS, or RBD instead.

append name infile

Append object name to the cluster with contents from infile.

rm [--force-full] name ...

Remove object(s) with name(s). With --force-full will remove when cluster is marked full.

listwatchers name

List the watchers of object name.

ls outfile

List objects in the given pool and write to outfile. Instead of --pool if --pgid will be specified, ls will only list the objects in the given PG.

lssnap

List snapshots for given pool.

clonedata srcname dstname --object-locator key

Clone object byte data from srcname to dstname. Both objects must be stored with the locator key key (usually either srcname or dstname). Object attributes and omap keys are not copied or cloned.

mksnap foo

Create pool snapshot named foo.

rmsnap foo

Remove pool snapshot named foo.

bench seconds mode [ -b objsize ] [ -t threads ]

Benchmark for seconds. The mode can be write, seq, or rand. seq and rand are read benchmarks, either sequential or random. Before running one of the reading benchmarks, run a write benchmark with the --no-cleanup option. The default object size is 4 MB, and the default number of simulated threads (parallel writes) is 16. The --run-name <label> option is useful for benchmarking a workload test from multiple clients. The <label> is an arbitrary object name. It is "benchmark_last_metadata" by default, and is used as the underlying object name for "read" and "write" ops. Note: -b objsize option is valid only in write mode. Note: write and seq must be run on the same host otherwise the objects created by write will have names that will fail seq.

cleanup [ --run-name run_name ] [ --prefix prefix ]

Clean up a previous benchmark operation. Note: the default run-name is "benchmark_last_metadata"

listxattr name

List all extended attributes of an object.

getxattr name attr

Dump the extended attribute value of attr of an object.

setxattr name attr value

Set the value of attr in the extended attributes of an object.

rmxattr name attr

Remove attr from the extended attributes of an object.

stat name

Get stat (ie. mtime, size) of given object

stat2 name

Get stat (similar to stat, but with high precision time) of given object

listomapkeys name

List all the keys stored in the object map of object name.

listomapvals name

List all key/value pairs stored in the object map of object name. The values are dumped in hexadecimal.

getomapval [ --omap-key-file file ] name key [ out-file ]

Dump the hexadecimal value of key in the object map of object name. If the optional out-file argument is not provided, the value will be written to standard output.

setomapval [ --omap-key-file file ] name key [ value ]

Set the value of key in the object map of object name. If the optional value argument is not provided, the value will be read from standard input.

rmomapkey [ --omap-key-file file ] name key

Remove key from the object map of object name.

getomapheader name

Dump the hexadecimal value of the object map header of object name.

setomapheader name value

Set the value of the object map header of object name.

export filename

Serialize pool contents to a file or standard output.n"

import [--dry-run] [--no-overwrite] < filename | - >

Load pool contents from a file or standard input

## EXAMPLES
To view cluster utilization:

```
rados df
```

To get a list object in pool foo sent to stdout:

```
rados -p foo ls -
```

To get a list of objects in PG 0.6:

```
rados --pgid 0.6 ls
```

To write an object:

```
rados -p foo put myobject blah.txt
```

To create a snapshot:

```
rados -p foo mksnap mysnap
```

To delete the object:

```
rados -p foo rm myobject
```

To read a previously snapshotted version of an object:

```
rados -p foo -s mysnap get myobject blah.txt.old
```

To list inconsistent objects in PG 0.6:

```
rados list-inconsistent-obj 0.6 --format=json-pretty
```

## AVAILABILITY
rados is part of Ceph, a massively scalable, open-source, distributed storage system. Please refer to the Ceph documentation at <https://docs.ceph.com> for more information.

## SEE ALSO
ceph <>(8)

## Copyright
2010-2014, Inktank Storage, Inc. and contributors. Licensed under Creative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0)


radosgw-admin

title: radosgw-admin(8)

text:
# radosgw-admin(8)

## NAME
radosgw-admin - rados REST gateway user administration utility

## SYNOPSIS

```
radosgw-admin command [ options ... ]
```

## DESCRIPTION
radosgw-admin is a Ceph Object Gateway user administration utility. It is used to create and modify users.

## COMMANDS
radosgw-admin utility provides commands for administration purposes as follows:

user create

Create a new user.

user modify

Modify a user.

user info

Display information for a user including any subusers and keys.

user rename

Renames a user.

user rm

Remove a user.

user suspend

Suspend a user.

user enable

Re-enable user after suspension.

user check

Check user info.

user stats

Show user stats as accounted by the quota subsystem.

user list

List all users.

caps add

Add user capabilities.

caps rm

Remove user capabilities.

subuser create

Create a new subuser (primarily useful for clients using the Swift API).

subuser modify

Modify a subuser.

subuser rm

Remove a subuser.

key create

Create access key.

key rm

Remove access key.

bucket list

List buckets, or, if a bucket is specified with --bucket=<bucket>, list its objects. Adding --allow-unordered removes the ordering requirement, possibly generating results more quickly for buckets with large number of objects.

bucket limit check

Show bucket sharding stats.

bucket link

Link bucket to specified user.

bucket unlink

Unlink bucket from specified user.

bucket chown

Change bucket ownership to the specified user and update object ACLs. Invoke with --marker to resume if the command is interrupted.

bucket stats

Returns bucket statistics.

bucket rm

Remove a bucket.

bucket check

Check bucket index.

bucket rewrite

Rewrite all objects in the specified bucket.

bucket radoslist

List the RADOS objects that contain the data for all objects in the designated bucket, if --bucket=<bucket> is specified. Otherwise, list the RADOS objects that contain data for all buckets.

bucket reshard

Reshard a bucket's index.

bucket sync disable

Disable bucket sync.

bucket sync enable

Enable bucket sync.

bi get

Retrieve bucket index object entries.

bi put

Store bucket index object entries.

bi list

List raw bucket index entries.

bi purge

Purge bucket index entries.

object rm

Remove an S3/Swift object. Include "--yes-i-really-mean-it" to remove object's entry from bucket index, for example if it's damaged.

object stat

Stat an S3/Swift object for its metadata.

object manifest

Display the manifest of an S3/Swift object, producing a list of RADOS objects containing the data.

object unlink

Unlink S3/Swift object from bucket index.

object rewrite

Rewrite the specified S3/Swift object.

object reindex

Add an S3/Swift object to its bucket's index. Used rarely for emergency repairs.

objects expire

Run expired objects cleanup.

period rm

Remove a period.

period get

Get the period info.

period get-current

Get the current period info.

period pull

Pull a period.

period push

Push a period.

period list

List all periods.

period update

Update the staging period.

period commit

Commit the staging period.

quota set

Set quota params.

quota enable

Enable quota.

quota disable

Disable quota.

global quota get

View global quota parameters.

global quota set

Set global quota parameters.

global quota enable

Enable a global quota.

global quota disable

Disable a global quota.

realm create

Create a new realm.

realm rm

Remove a realm.

realm get

Show the realm info.

realm get-default

Get the default realm name.

realm list

List all realms.

realm list-periods

List all realm periods.

realm rename

Rename a realm.

realm set

Set the realm info (requires infile).

realm default

Set the realm as default.

realm pull

Pull a realm and its current period.

zonegroup add

Add a zone to a zonegroup.

zonegroup create

Create a new zone group info.

zonegroup default

Set the default zone group.

zonegroup rm

Remove a zone group info.

zonegroup get

Show the zone group info.

zonegroup modify

Modify an existing zonegroup.

zonegroup set

Set the zone group info (requires infile).

zonegroup remove

Remove a zone from a zonegroup.

zonegroup rename

Rename a zone group.

zonegroup list

List all zone groups set on this cluster.

zonegroup placement list

List zonegroup's placement targets.

zonegroup placement add

Add a placement target id to a zonegroup.

zonegroup placement modify

Modify a placement target of a specific zonegroup.

zonegroup placement rm

Remove a placement target from a zonegroup.

zonegroup placement default

Set a zonegroup's default placement target.

zone create

Create a new zone.

zone rm

Remove a zone.

zone get

Show zone cluster params.

zone set

Set zone cluster params (requires infile).

zone modify

Modify an existing zone.

zone list

List all zones set on this cluster.

metadata sync status

Get metadata sync status.

metadata sync init

Init metadata sync.

metadata sync run

Run metadata sync.

data sync status

Get data sync status of the specified source zone.

data sync init

Init data sync for the specified source zone.

data sync run

Run data sync for the specified source zone.

sync error list

List sync errors.

sync error trim

Trim sync errors.

zone rename

Rename a zone.

zone placement list

List a zone's placement targets.

zone placement add

Add a zone placement target.

zone placement modify

Modify a zone placement target.

zone placement rm

Remove a zone placement target.

pool add

Add an existing pool for data placement.

pool rm

Remove an existing pool from data placement set.

pools list

List placement active set.

policy

Display bucket/object policies (e.g. permissions/ACLs etc.).

log list

List log objects.

log show

Dump a log from specific object or (bucket + date + bucket-id). (NOTE: required to specify formatting of date to "YYYY-MM-DD-hh")

log rm

Remove log object.

usage show

Show the usage information (with optional user and date range).

usage trim

Trim usage information (with optional user and date range).

gc list

Dump expired garbage collection objects (specify --include-all to list all entries, including unexpired).

gc process

Manually process garbage.

lc get

Get lifecycle config for a bucket.

lc list

List all bucket lifecycle progress.

lc process

Manually process lifecycle transitions. If a bucket is specified (e.g., via --bucket_id or via --bucket and optional --tenant), only that bucket is processed.

metadata get

Get metadata info.

metadata put

Put metadata info.

metadata rm

Remove metadata info.

metadata list

List metadata info.

mdlog list

List metadata log which is needed for multi-site deployments.

mdlog trim

Trim metadata log manually instead of relying on the gateway's integrated log sync. Before trimming, compare the listings and make sure the last sync was complete, otherwise it can reinitiate a sync.

mdlog status

Read metadata log status.

bilog list

List bucket index log which is needed for multi-site deployments.

bilog trim

Trim bucket index log (use start-marker, end-marker) manually instead of relying on the gateway's integrated log sync. Before trimming, compare the listings and make sure the last sync was complete, otherwise it can reinitiate a sync.

datalog list

List data log which is needed for multi-site deployments.

datalog trim

Trim data log manually instead of relying on the gateway's integrated log sync. Before trimming, compare the listings and make sure the last sync was complete, otherwise it can reinitiate a sync.

datalog status

Read data log status.

orphans find

Init and run search for leaked RADOS objects. DEPRECATED. See the "rgw-orphan-list" tool.

orphans finish

Clean up search for leaked RADOS objects. DEPRECATED. See the "rgw-orphan-list" tool.

orphans list-jobs

List the current orphans search job IDs. DEPRECATED. See the "rgw-orphan-list" tool.

role create

Create a new role for use with STS (Security Token Service).

role rm

Remove a role.

role get

Get a role.

role list

List the roles with specified path prefix.

role modify

Modify the assume role policy of an existing role.

role-policy put

Add/update permission policy to role.

role-policy list

List the policies attached to a role.

role-policy get

Get the specified inline policy document embedded with the given role.

role-policy rm

Remove the policy attached to a role

reshard add

Schedule a resharding of a bucket

reshard list

List all bucket resharding or scheduled to be resharded

reshard process

Process of scheduled reshard jobs

reshard status

Resharding status of a bucket

reshard cancel

Cancel resharding a bucket

topic list

List bucket notifications topics

topic get

Get a bucket notification topic

topic rm

Remove a bucket notifications topic

topic stats

Get a bucket notifications persistent topic stats (i.e. reservations, entries & size)

topic dump

Dump (in JSON format) all pending bucket notifications of a persistent topic

## OPTIONS
-c ceph.conf, --conf=ceph.conf

Use ceph.conf configuration file instead of the default /etc/ceph/ceph.conf to determine monitor addresses during startup.

-m monaddress[:port]

Connect to specified monitor (instead of selecting one from ceph.conf).

--tenant=<tenant>

Name of the tenant.

--uid=uid

The user on which to operate.

--new-uid=uid

The new ID of the user. Used with 'user rename' command.

--subuser=<name>

Name of the subuser.

--access-key=<key>

S3 access key.

--email=email

The e-mail address of the user.

--secret/--secret-key=<key>

The secret key.

--gen-access-key

Generate random access key (for S3).

--gen-secret

Generate random secret key.

--key-type=<type>

Key type, options are: swift, s3.

--temp-url-key[-2]=<key>

Temporary URL key.

--max-buckets

Maximum number of buckets for a user (0 for no limit, negative value to disable bucket creation). Default is 1000.

--access=<access>

Set the access permissions for the subuser. Available access permissions are read, write, readwrite and full.

--display-name=<name>

The display name of the user.

--admin

Set the admin flag on the user.

--system

Set the system flag on the user.

--bucket=[tenant-id/]bucket

Specify the bucket name. If tenant-id is not specified, the tenant-id of the user (--uid) is used.

--pool=<pool>

Specify the pool name. Also used with orphans find as data pool to scan for leaked rados objects.

--object=object

Specify the object name.

--date=yyyy-mm-dd

The date in the format yyyy-mm-dd.

--start-date=yyyy-mm-dd

The start date in the format yyyy-mm-dd.

--end-date=yyyy-mm-dd

The end date in the format yyyy-mm-dd.

--bucket-id=<bucket-id>

Specify the bucket id.

--bucket-new-name=[tenant-id/]<bucket>

Optional for bucket link; use to rename a bucket. While the tenant-id can be specified, this is not necessary in normal operation.

--shard-id=<shard-id>

Optional for mdlog list, bi list, data sync status. Required for mdlog trim.

--max-entries=<entries>

Optional for listing operations to specify the max entries.

--purge-data

When specified, user removal will also purge the user's data.

--purge-keys

When specified, subuser removal will also purge the subuser' keys.

--purge-objects

When specified, the bucket removal will also purge all objects in it.

--metadata-key=<key>

Key from which to retrieve metadata, used with metadata get.

--remote=<remote>

Zone or zonegroup id of remote gateway.

--period=<id>

Period ID.

--url=<url>

URL for pushing/pulling period or realm.

--epoch=<number>

Period epoch.

--commit

Commit the period during 'period update'.

--staging

Get the staging period info.

--master

Set as master.

--master-zone=<id>

Master zone ID.

--rgw-realm=<name>

The realm name.

--realm-id=<id>

The realm ID.

--realm-new-name=<name>

New name for the realm.

--rgw-zonegroup=<name>

The zonegroup name.

--zonegroup-id=<id>

The zonegroup ID.

--zonegroup-new-name=<name>

The new name of the zonegroup.

--rgw-zone=<zone>

Zone in which the gateway is running.

--zone-id=<id>

The zone ID.

--zone-new-name=<name>

The new name of the zone.

--source-zone

The source zone for data sync.

--default

Set the entity (realm, zonegroup, zone) as default.

--read-only

Set the zone as read-only when adding to the zonegroup.

--placement-id

Placement ID for the zonegroup placement commands.

--tags=<list>

The list of tags for zonegroup placement add and modify commands.

--tags-add=<list>

The list of tags to add for zonegroup placement modify command.

--tags-rm=<list>

The list of tags to remove for zonegroup placement modify command.

--endpoints=<list>

The zone endpoints.

--index-pool=<pool>

The placement target index pool.

--data-pool=<pool>

The placement target data pool.

--data-extra-pool=<pool>

The placement target data extra (non-EC) pool.

--placement-index-type=<type>

The placement target index type (normal, indexless, or #id).

--placement-inline-data=<true>

Whether the placement target is configured to store a data chunk inline in head objects.

--tier-type=<type>

The zone tier type.

--tier-config=<k>=<v>[,...]

Set zone tier config keys, values.

--tier-config-rm=<k>[,...]

Unset zone tier config keys.

--sync-from-all[=false]

Set/reset whether zone syncs from all zonegroup peers.

--sync-from=[zone-name][,...]

Set the list of zones from which to sync.

--sync-from-rm=[zone-name][,...]

Remove zone(s) from list of zones from which to sync.

--bucket-index-max-shards

Override a zone's or zonegroup's default number of bucket index shards. This option is accepted by the 'zone create', 'zone modify', 'zonegroup add', and 'zonegroup modify' commands, and applies to buckets that are created after the zone/zonegroup changes take effect.

--fix

Fix the bucket index in addition to checking it.

--check-objects

Bucket check: Rebuilds the bucket index according to actual object state.

--format=<format>

Specify output format for certain operations. Supported formats: xml, json.

--sync-stats

Option for the 'user stats' command. When specified, it will update user stats with the current stats reported by the user's buckets indexes.

--show-config

Show configuration.

--show-log-entries=<flag>

Enable/disable dumping of log entries on log show.

--show-log-sum=<flag>

Enable/disable dump of log summation on log show.

--skip-zero-entries

Log show only dumps entries that don't have zero value in one of the numeric field.

--infile

Specify a file to read when setting data.

--categories=<list>

Comma separated list of categories, used in usage show.

--caps=<caps>

List of capabilities (e.g., "usage=read, write; user=read").

--compression=<compression-algorithm>

Placement target compression algorithm (lz4|snappy|zlib|zstd).

--yes-i-really-mean-it

Required as a guardrail for certain destructive operations.

--min-rewrite-size

Specify the minimum object size for bucket rewrite (default 4M).

--max-rewrite-size

Specify the maximum object size for bucket rewrite (default ULLONG_MAX).

--min-rewrite-stripe-size

Specify the minimum stripe size for object rewrite (default 0). If the value is set to 0, then the specified object will always be rewritten when restriping.

--warnings-only

When specified with bucket limit check, list only buckets nearing or over the current max objects per shard value.

--bypass-gc

When specified with bucket deletion, triggers object deletion without involving GC.

--inconsistent-index

When specified with bucket deletion and bypass-gc set to true, ignores bucket index consistency.

--max-concurrent-ios

Maximum concurrent bucket operations. Affects operations that scan the bucket index, e.g., listing, deletion, and all scan/search operations such as finding orphans or checking the bucket index. The default is 32.

## QUOTA OPTIONS
--max-objects

Specify the maximum number of objects (negative value to disable).

--max-size

Specify the maximum object size (in B/K/M/G/T, negative value to disable).

--quota-scope

The scope of quota (bucket, user).

## ORPHANS SEARCH OPTIONS
--num-shards

Number of shards to use for temporary scan info

--orphan-stale-secs

Number of seconds to wait before declaring an object to be an orphan. The efault is 86400 (24 hours).

--job-id

Set the job id (for orphans find)

## ORPHANS LIST-JOBS OPTIONS
--extra-info

Provide extra info in the job list.

## ROLE OPTIONS
--role-name

The name of the role to create.

--path

The path to the role.

--assume-role-policy-doc

The trust relationship policy document that grants an entity permission to assume the role.

--policy-name

The name of the policy document.

--policy-doc

The permission policy document.

--path-prefix

The path prefix for filtering the roles.

## BUCKET NOTIFICATIONS/PUBSUB OPTIONS
--topic

The bucket notifications/pubsub topic name.

--subscription

The pubsub subscription name.

--event-id

The event id in a pubsub subscription.

## EXAMPLES
Generate a new user:

```
$ radosgw-admin user create --display-name="johnny rotten" --uid=johnny
{ "user_id": "johnny",

  "rados_uid": 0,

  "display_name": "johnny rotten",

  "email": "",

  "suspended": 0,

  "subusers": [],

  "keys": [

        { "user": "johnny",

          "access_key": "TCICW53D9BQ2VGC46I44",

          "secret_key": "tfm9aHMI8X76L3UdgE+ZQaJag1vJQmE6HDb5Lbrz"}],

  "swift_keys": []}
```

Remove a user:

```
$ radosgw-admin user rm --uid=johnny
```

Rename a user:

```
$ radosgw-admin user rename --uid=johnny --new-uid=joe
```

Remove a user and all associated buckets with their contents:

```
$ radosgw-admin user rm --uid=johnny --purge-data
```

Remove a bucket:

```
$ radosgw-admin bucket rm --bucket=foo
```

Link bucket to specified user:

```
$ radosgw-admin bucket link --bucket=foo --bucket_id=<bucket id> --uid=johnny
```

Unlink bucket from specified user:

```
$ radosgw-admin bucket unlink --bucket=foo --uid=johnny
```

Rename a bucket:

```
$ radosgw-admin bucket link --bucket=foo --bucket-new-name=bar --uid=johnny
```

Move a bucket from the old global tenant space to a specified tenant:

```
$ radosgw-admin bucket link --bucket=foo --uid='12345678$12345678'
```

Link bucket to specified user and change object ACLs:

```
$ radosgw-admin bucket chown --bucket=foo --uid='12345678$12345678'
```

Show the logs of a bucket from April 1st, 2012:

```
$ radosgw-admin log show --bucket=foo --date=2012-04-01-01 --bucket-id=default.14193.1
```

Show usage information for user from March 1st to (but not including) April 1st, 2012:

```
$ radosgw-admin usage show --uid=johnny \

                --start-date=2012-03-01 --end-date=2012-04-01
```

Show only summary of usage information for all users:

```
$ radosgw-admin usage show --show-log-entries=false
```

Trim usage information for user until March 1st, 2012:

```
$ radosgw-admin usage trim --uid=johnny --end-date=2012-04-01
```

## AVAILABILITY
radosgw-admin is part of Ceph, a massively scalable, open-source, distributed storage system. Please refer to the Ceph documentation at <https://docs.ceph.com> for more information.

## SEE ALSO
ceph <>(8) radosgw <>(8)

## Copyright
2010-2014, Inktank Storage, Inc. and contributors. Licensed under Creative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0)