]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tools/rados: add --pgid in help 30607/head
authorVikhyat Umrao <vumrao@redhat.com>
Fri, 13 Sep 2019 23:53:58 +0000 (16:53 -0700)
committerVikhyat Umrao <vumrao@redhat.com>
Thu, 26 Sep 2019 23:00:59 +0000 (16:00 -0700)
This commit 825c7b9729b2410a116e123d4b21210c646704d4 brought
the support for --pgid in rados ls but was not in help.
Fixes: https://tracker.ceph.com/issues/41876
Signed-off-by: Vikhyat Umrao <vumrao@redhat.com>
(cherry picked from commit ae9a24eaba330fd3f6946063c2bc926f58c93772)

doc/man/8/rados.rst
src/tools/rados/rados.cc

index 63fdc23f97202ee78f958406bc59b1d24a1ab4e0..ef5a111da72bf3a07aa870d17769e9b734fe8198 100644 (file)
@@ -26,6 +26,12 @@ Options
 
    Interact with the given pool. Required by most commands.
 
+.. option:: --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.
+
 .. option:: -s snap, --snap snap
 
    Read from the given pool snapshot. Valid for all pool-specific read operations.
@@ -104,7 +110,7 @@ Pool specific commands
   List the watchers of object name.
 
 :command:`ls` *outfile*
-  List objects in given pool and write to 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.
 
 :command:`lssnap`
   List snapshots for given pool.
@@ -199,6 +205,10 @@ 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
index 37c6d3352e0d69446630261942bb46d7b598fda0..7e81d27748d2d6bc65a2ab7862d2ae7014f8b753 100644 (file)
@@ -157,8 +157,8 @@ void usage(ostream& out)
 "\n"
 "SCRUB AND REPAIR:\n"
 "   list-inconsistent-pg <pool>      list inconsistent PGs in given pool\n"
-"   list-inconsistent-obj <pgid>     list inconsistent objects in given pg\n"
-"   list-inconsistent-snapset <pgid> list inconsistent snapsets in the given pg\n"
+"   list-inconsistent-obj <pgid>     list inconsistent objects in given PG\n"
+"   list-inconsistent-snapset <pgid> list inconsistent snapsets in the given PG\n"
 "\n"
 "CACHE POOLS: (for testing/development only)\n"
 "   cache-flush <obj-name>           flush cache pool object (blocking)\n"
@@ -175,6 +175,8 @@ void usage(ostream& out)
 "        select given pool by name\n"
 "   --target-pool=pool\n"
 "        select target pool by name\n"
+"   --pgid PG id\n"
+"        select given PG id\n"
 "   -f [--format plain|json|json-pretty]\n"
 "   --format=[--format plain|json|json-pretty]\n"
 "   -b op_size\n"