]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume: update docs and help menu for `simple scan`
authorAndrew Schoen <aschoen@redhat.com>
Thu, 7 Mar 2019 17:10:19 +0000 (11:10 -0600)
committerAndrew Schoen <aschoen@redhat.com>
Fri, 8 Mar 2019 17:09:16 +0000 (11:09 -0600)
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit f7943ef6007fb05d83602bc22cbacf3bb67d8625)

doc/ceph-volume/simple/scan.rst
doc/man/8/ceph-volume.rst
src/ceph-volume/ceph_volume/devices/simple/scan.py

index 320fee8fb453506f761827e7dc7c0dc5c1350c9d..2749b14b64ac79d8958b1df0778a5a97afd1ac2f 100644 (file)
@@ -9,6 +9,7 @@ PLAIN formats is fully supported.
 
 The command has the ability to inspect a running OSD, by inspecting the
 directory where the OSD data is stored, or by consuming the data partition.
+The command can also scan all running OSDs if no path or device is provided.
 
 Once scanned, information will (by default) persist the metadata as JSON in
 a file in ``/etc/ceph/osd``. This ``JSON`` file will use the naming convention
@@ -31,6 +32,16 @@ the contents to ``stdout`` (no file will be written)::
 
 .. _ceph-volume-simple-scan-directory:
 
+Running OSDs scan
+-----------------
+Using this command without providing an OSD directory or device will scan the
+directories of any currently running OSDs. If a running OSD was not created
+by ceph-disk it will be ignored and not scanned.
+
+To scan all running ceph-disk OSDs, the command would look like::
+
+    ceph-volume simple scan
+
 Directory scan
 --------------
 The directory scan will capture OSD file contents from interesting files. There
index 9ad5a5237af2dc92c17dfd2e5d7502104d2db672..5b1035ef748f14da7b9d911dfe92c62a9f0e1e3c 100644 (file)
@@ -280,6 +280,10 @@ directory as well.
 
 Optionally, the JSON blob can be sent to stdout for further inspection.
 
+Usage on all running OSDs::
+
+    ceph-voume simple scan
+
 Usage on data devices::
 
     ceph-volume simple scan <data device>
@@ -295,7 +299,7 @@ Optional arguments:
 * [--stdout]            Send the JSON blob to stdout
 * [--force]             If the JSON file exists at destination, overwrite it
 
-Required Positional arguments:
+Optional Positional arguments:
 
 * <DATA DEVICE or OSD DIR>  Actual data partition or a path to the running OSD
 
index cc9f6faad45026e6ce6ba9a59fc98a368a024644..78a1493bd609432774e5555bea60fa1e40081a44 100644 (file)
@@ -41,7 +41,7 @@ def parse_keyring(file_contents):
 
 class Scan(object):
 
-    help = 'Capture metadata from an OSD data partition or directory'
+    help = 'Capture metadata from all running ceph-disk OSDs, OSD data partition or directory'
 
     def __init__(self, argv):
         self.argv = argv
@@ -284,7 +284,7 @@ class Scan(object):
 
     def main(self):
         sub_command_help = dedent("""
-        Scan an OSD directory (or data device) for files and configurations
+        Scan running OSDs, an OSD directory (or data device) for files and configurations
         that will allow to take over the management of the OSD.
 
         Scanned OSDs will get their configurations stored in
@@ -299,13 +299,19 @@ class Scan(object):
 
             /etc/ceph/osd/0-a9d50838-e823-43d6-b01f-2f8d0a77afc2.json
 
-        To a scan an existing, running, OSD:
+        To scan all running OSDs:
+
+            ceph-volume simple scan
+
+        To a scan a specific running OSD:
 
             ceph-volume simple scan /var/lib/ceph/osd/{cluster}-{osd id}
 
         And to scan a device (mounted or unmounted) that has OSD data in it, for example /dev/sda1
 
             ceph-volume simple scan /dev/sda1
+
+        Scanning a device or directory that belongs to an OSD not created by ceph-disk will be ingored.
         """)
         parser = argparse.ArgumentParser(
             prog='ceph-volume simple scan',