RADOS(8)
π RADOS(8) β the object storage utility, bestie edition
okay so this is the manual page for rados(8), aka the little command-line bestie that talks to your Ceph object storage cluster. Welcome to the group chat, grab a snack. π
β¨ NAME β¨
rados β the rados object storage utility. That's it, that's the name, she's simple and she's iconic. π
πΈ SYNOPSIS πΈ
rados [ options ] [ command ]
π¦ DESCRIPTION π¦
So rados is a utility for interacting with a Ceph object storage cluster β that's RADOS, which is part of the Ceph distributed storage system. Basically she's your direct line to the objects themselves, no middle layer, no small talk. π«Ά
π GLOBAL OPTIONS π
These ones work pretty much everywhere, they're like the base layer of the fit. β¨
--object-locator object_locatorβ sets theobject_locatorfor the operation. That's it, that's the whole vibe.-p pool,--pool poolβ interact with the pool you name. Most commands literally need this one, so don't skip her. π₯--target-pool poolβ pick the target pool by name.--pgidβ instead of--pool, this lets you say which PG id you want the command aimed at. With this, some commands likelslet you narrow the scope down to just that PG.-N namespace,--namespace namespaceβ specify the rados namespace to use for the object.--allβ use it withlsto list objects in all namespaces. Pop it in theCEPH_ARGSenvironment variable if you want that to be the default.--defaultβ use it withlsto list objects in the default namespace. She takes precedence over--allin case--allis chillin' in the 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β specifies an input file to pass along as a payload with the command to the monitor cluster. Only used for specific monitor commands, so don't get any ideas.-m monaddress[:port]β connect to the specified monitor (instead of looking throughceph.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 forstat,stat2,get,put,append,truncate,rm,lsand all xattr related operations. β¨-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β sets the lock cookie for acquiring the advisory lock (that's thelock getcommand). If the cookie isn't empty, you must pass this option to thelock breakcommand so it can find the correct lock when releasing it.--target-locatorβ use withcpto specify the locator of the new object.--target-nspaceβ use withcpto specify the namespace of the new object.
π₯ BENCH OPTIONS π₯
Benchmarking time, put your little lab coat on, we're measuring things. π
-t N,--concurrent-ios=Nβ set the number of concurrent I/O operations.--show-timeβ prefix the output with date/time.--no-verifyβ don't verify the contents of read objects. (Living dangerously, love that for you.)--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 π
The knobs for generating load. Turn them gently. ποΈ
--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 π
The universally applicable ones. No notes. β
-c FILE,--conf FILEβ read configuration from the given configuration file.--id IDβ set the ID portion of a client entity. Likeadminforclient.admin.-n TYPE.ID,--name TYPE.IDβ set the full entity name. Likeclient.admin.--cluster NAMEβ set cluster name (default:ceph).--setuser USERβ set uid to user or uid (and gid to the user's gid).--setgroup GROUPβ set gid to group or gid.--versionβ show version and quit. Bye bestie π
π GLOBAL COMMANDS π
These are the whole-cluster girlies, not tied to one pool. π
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 the given pool.list-inconsistent-obj pgidβ list inconsistent objects in the given PG.list-inconsistent-snapset pgidβ list inconsistent snapsets in the given PG.
π POOL SPECIFIC COMMANDS π
Now we get specific. Still the same energy though.
get name outfileβ read objectnamefrom the cluster and write it tooutfile.put name infile [--offset offset]β write objectnameto the cluster with contents frominfile, starting atoffset(default:0).
β οΈ 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 objectnameto the cluster with contents frominfile.rm [--force-full] name ...β remove object(s) withname(s). With--force-fullit will remove when the cluster is marked full.listwatchers nameβ list the watchers of objectname.ls outfileβ list objects in the given pool and write tooutfile. Instead of--pool, if--pgidis specified,lswill only list the objects in the given PG.lssnapβ list snapshots for the given pool.mksnap fooβ create a pool snapshot namedfoo.rmsnap fooβ remove pool snapshot namedfoo.bench seconds mode [ -b objsize ] [ -t threads ]β benchmark forseconds. Themodecan bewrite,seq, orrand.seqandrandare read benchmarks, either sequential or random. Before running one of the reading benchmarks, run a write benchmark with the--no-cleanupoption. The default object size is4 MB, and the default number of simulated threads (parallel writes) is16. 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: the-b objsizeoption is valid only in write mode. π Note:writeandseqmust be run on the same host, otherwise the objects created bywritewill have names that will failseq.
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 ofattrof an object.setxattr name attr valueβ set the value ofattrin the extended attributes of an object.rmxattr name attrβ removeattrfrom the extended attributes of an object.stat nameβ get stat (ie. mtime, size) of the given object.stat2 nameβ get stat (similar tostat, but with high precision time) of the given object.listomapkeys nameβ list all the keys stored in the object map of objectname.listomapvals nameβ list all key/value pairs stored in the object map of objectname. The values are dumped in hexadecimal.getomapval [ --omap-key-file file ] name key [ out-file ]β dump the hexadecimal value ofkeyin the object map of objectname. If the optionalout-fileargument isn't provided, the value will be written to standard output.setomapval [ --omap-key-file file ] name key [ value ]β set the value ofkeyin the object map of objectname. If the optionalvalueargument isn't provided, the value will be read from standard input.rmomapkey [ --omap-key-file file ] name keyβ removekeyfrom the object map of objectname.getomapheader nameβ dump the hexadecimal value of the object map header of objectname.setomapheader name valueβ set the value of the object map header of objectname.export filenameβ serialize pool contents to a file or standard output.n"β okay so yes, the manpage literally says that, trailingn"and all, and I am not touching it, that's a preservation moment, periodt. πimport [--dry-run] [--no-overwrite] < filename | - >β load pool contents from a file or standard input.
π EXAMPLES π
Real scenarios, let's go. πββοΈβ¨
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) β go read her too, she's family.
π Copyright π
2010-2014, Inktank Storage, Inc. and contributors. Licensed under Creative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0).
aaaand that's the whole page, bestie!! π This one shipped in the dev series, dated Oct 06, 2026, and yes she is RADOS(8) through and through. Go forth and ls responsibly. π no cap.
π¦ where this page comes from
- ubuntu stonking: ceph-common 20.2.4+ds1-0ubuntu1 Β· LGPL2.1 (see COPYING-LGPL2.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms