%{_bindir}/crushtool
%{_bindir}/monmaptool
%{_bindir}/osdmaptool
-%{_bindir}/cauthtool
+%{_bindir}/ceph-authtool
%{_bindir}/ceph-syn
%{_bindir}/ceph-run
%{_bindir}/ceph-mon
usr/bin/ceph-mon
usr/bin/ceph-mds
usr/bin/ceph-osd
-usr/bin/cauthtool
+usr/bin/ceph-authtool
usr/bin/ceph-debugpack
sbin/mkcephfs
usr/lib/ceph/ceph_common.sh
+++ /dev/null
-=============================================
- cauthtool -- ceph keyring manipulation tool
-=============================================
-
-.. program:: cauthtool
-
-Synopsis
-========
-
-| **cauthtool** *keyringfile* [ -l | --list ] [ -C | --create-keyring
- ] [ -p | --print ] [ -n | --name *entityname* ] [ --gen-key ] [ -a |
- --add-key *base64_key* ] [ --caps *capfils* ] [ -b | --bin ]
-
-
-Description
-===========
-
-**cauthtool** 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``.
-
-
-Options
-=======
-
-.. option:: -l, --list
-
- will list all keys and capabilities present in the keyring
-
-.. option:: -p, --print
-
- will print an encoded key for the specified entityname. This is
- suitable for the ``mount -o secret=`` argument
-
-.. option:: -C, --create-keyring
-
- will create a new keyring, overwriting any existing keyringfile
-
-.. option:: --gen-key
-
- will generate a new secret key for the specified entityname
-
-.. option:: --add-key
-
- will add an encoded key to the keyring
-
-.. option:: --cap subsystem capability
-
- will set the capability for given subsystem
-
-.. option:: --caps capsfile
-
- will set all of capabilities associated with a given key, for all subsystems
-
-.. option:: -b, --bin
-
- will create a binary formatted keyring
-
-
-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, deny
-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 [pool=foo[,bar]]|[uid=baz[,bay]]"
-
- # 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::
-
- osd = "allow rw pool foo"
-
-A client mounting the file system with minimal permissions would need caps like::
-
- mds = "allow"
-
- osd = "allow rw pool=data"
-
- mon = "allow r"
-
-
-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::
-
- cauthtool -c -n client.foo --gen-key keyring
-
-To associate some capabilities with the key (namely, the ability to
-mount a Ceph filesystem)::
-
- cauthtool -n client.foo --cap mds 'allow' --cap osd 'allow rw pool=data' --cap mon 'allow r' keyring
-
-To display the contents of the keyring::
-
- cauthtool -l keyring
-
-When mount a Ceph file system, you can grab the appropriately encoded secret key with::
-
- mount -t ceph serverhost:/ mountpoint -o name=foo,secret=`cauthtool -p -n client.foo keyring`
-
-
-Availability
-============
-
-**cauthtool** is part of the Ceph distributed file system. Please
-refer to the Ceph wiki at http://ceph.newdream.net/wiki for more
-information.
-
-
-See also
-========
-
-:doc:`ceph <ceph>`\(8)
+++ /dev/null
-===========================================
- ceph-clsinfo -- show class object information
-===========================================
-
-.. program:: ceph-clsinfo
-
-Synopsis
-========
-
-| **ceph-clsinfo** [ *options* ] ... *filename*
-
-
-Description
-===========
-
-**ceph-clsinfo** can show name, version, and architecture information
-about a specific class object.
-
-
-Options
-=======
-
-.. option:: -n, --name
-
- Shows the class name
-
-.. option:: -v, --version
-
- Shows the class version
-
-.. option:: -a, --arch
-
- Shows the class architecture
-
-
-Availability
-============
-
-**ceph-clsinfo** is part of the Ceph distributed file system. Please
-refer to the Ceph wiki at http://ceph.newdream.net/wiki for more
-information.
-
-
-See also
-========
-
-:doc:`ceph <ceph>`\(8)
+++ /dev/null
-==============================
- ceph-conf -- ceph conf file tool
-==============================
-
-.. program:: ceph-conf
-
-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* ] --lookup *key*
-| **ceph-conf** [-s *section* ] *key*
-
-
-Description
-===========
-
-**ceph-conf** is a utility for getting information about a ceph
-configuration file. As with most Ceph programs, you can specify which
-Ceph configuration file to use with the ``-c`` flag.
-
-
-Actions
-=======
-
-.. TODO format this like a proper man page
-
-**ceph-conf** will perform one of the following actions:
-
---list-all-sections or -L prints out a list of all the section names in the configuration
-file.
-
---list-sections or -l prints out a list of all the sections that begin
-with a given prefix. For example, --list-sections mon would list all
-sections beginning with mon.
-
---lookup will search the configuration for a given value. By default, the sections that
-are searched are determined by the Ceph name that we are using. The Ceph name defaults to
-client.admin. It can be specified with --name.
-
-For example, if we specify --name osd.0, the following sections will be searched:
-[osd.0], [osd], [global]
-
-You can specify additional sections to search with --section or -s. 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.
-
-Note: --lookup is the default action. If no other actions are given on the command line,
-we will default to doing a lookup.
-
-
-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
-
-
-Availability
-============
-
-**ceph-conf** is part of the Ceph distributed file system. Please refer
-to the Ceph wiki at http://ceph.newdream.net/wiki for more
-information.
-
-
-See also
-========
-
-:doc:`ceph <ceph>`\(8),
-:doc:`mkcephfs <mkcephfs>`\(8)
+++ /dev/null
-=========================================
- cdebugpack -- ceph debug packer utility
-=========================================
-
-.. program:: cdebugpack
-
-Synopsis
-========
-
-| **cdebugpack** [ *options* ] *filename.tar.gz*
-
-
-Description
-===========
-
-**cdebugpack** will build a tarball containing various items that are
-useful for debugging crashes. The resulting tarball can be shared with
-Ceph developers when debugging a problem.
-
-The tarball will include the binaries for ceph-mds, ceph-osd, and ceph-mon, any
-log files, the ceph.conf configuration file, any core files we can
-find, and (if the system is running) dumps of the current osd, mds,
-and pg maps from the monitor.
-
-
-Options
-=======
-
-.. option:: -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.
-
-
-Availability
-============
-
-**cdebugpack** is part of the Ceph distributed file system. Please
-refer to the Ceph wiki at http://ceph.newdream.net/wiki for more
-information.
-
-
-See also
-========
-
-:doc:`ceph <ceph>`\(8)
--- /dev/null
+=============================================
+ ceph-authtool -- ceph keyring manipulation tool
+=============================================
+
+.. program:: ceph-authtool
+
+Synopsis
+========
+
+| **ceph-authtool** *keyringfile* [ -l | --list ] [ -C | --create-keyring
+ ] [ -p | --print ] [ -n | --name *entityname* ] [ --gen-key ] [ -a |
+ --add-key *base64_key* ] [ --caps *capfils* ] [ -b | --bin ]
+
+
+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``.
+
+
+Options
+=======
+
+.. option:: -l, --list
+
+ will list all keys and capabilities present in the keyring
+
+.. option:: -p, --print
+
+ will print an encoded key for the specified entityname. This is
+ suitable for the ``mount -o secret=`` argument
+
+.. option:: -C, --create-keyring
+
+ will create a new keyring, overwriting any existing keyringfile
+
+.. option:: --gen-key
+
+ will generate a new secret key for the specified entityname
+
+.. option:: --add-key
+
+ will add an encoded key to the keyring
+
+.. option:: --cap subsystem capability
+
+ will set the capability for given subsystem
+
+.. option:: --caps capsfile
+
+ will set all of capabilities associated with a given key, for all subsystems
+
+.. option:: -b, --bin
+
+ will create a binary formatted keyring
+
+
+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, deny
+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 [pool=foo[,bar]]|[uid=baz[,bay]]"
+
+ # 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::
+
+ osd = "allow rw pool foo"
+
+A client mounting the file system with minimal permissions would need caps like::
+
+ mds = "allow"
+
+ osd = "allow rw pool=data"
+
+ mon = "allow r"
+
+
+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::
+
+ ceph-authtool -c -n client.foo --gen-key keyring
+
+To associate some capabilities with the key (namely, the ability to
+mount a Ceph filesystem)::
+
+ 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 mount 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 the Ceph distributed file system. Please
+refer to the Ceph wiki at http://ceph.newdream.net/wiki for more
+information.
+
+
+See also
+========
+
+:doc:`ceph <ceph>`\(8)
--- /dev/null
+===========================================
+ ceph-clsinfo -- show class object information
+===========================================
+
+.. program:: ceph-clsinfo
+
+Synopsis
+========
+
+| **ceph-clsinfo** [ *options* ] ... *filename*
+
+
+Description
+===========
+
+**ceph-clsinfo** can show name, version, and architecture information
+about a specific class object.
+
+
+Options
+=======
+
+.. option:: -n, --name
+
+ Shows the class name
+
+.. option:: -v, --version
+
+ Shows the class version
+
+.. option:: -a, --arch
+
+ Shows the class architecture
+
+
+Availability
+============
+
+**ceph-clsinfo** is part of the Ceph distributed file system. Please
+refer to the Ceph wiki at http://ceph.newdream.net/wiki for more
+information.
+
+
+See also
+========
+
+:doc:`ceph <ceph>`\(8)
--- /dev/null
+==============================
+ ceph-conf -- ceph conf file tool
+==============================
+
+.. program:: ceph-conf
+
+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* ] --lookup *key*
+| **ceph-conf** [-s *section* ] *key*
+
+
+Description
+===========
+
+**ceph-conf** is a utility for getting information about a ceph
+configuration file. As with most Ceph programs, you can specify which
+Ceph configuration file to use with the ``-c`` flag.
+
+
+Actions
+=======
+
+.. TODO format this like a proper man page
+
+**ceph-conf** will perform one of the following actions:
+
+--list-all-sections or -L prints out a list of all the section names in the configuration
+file.
+
+--list-sections or -l prints out a list of all the sections that begin
+with a given prefix. For example, --list-sections mon would list all
+sections beginning with mon.
+
+--lookup will search the configuration for a given value. By default, the sections that
+are searched are determined by the Ceph name that we are using. The Ceph name defaults to
+client.admin. It can be specified with --name.
+
+For example, if we specify --name osd.0, the following sections will be searched:
+[osd.0], [osd], [global]
+
+You can specify additional sections to search with --section or -s. 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.
+
+Note: --lookup is the default action. If no other actions are given on the command line,
+we will default to doing a lookup.
+
+
+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
+
+
+Availability
+============
+
+**ceph-conf** is part of the Ceph distributed file system. Please refer
+to the Ceph wiki at http://ceph.newdream.net/wiki for more
+information.
+
+
+See also
+========
+
+:doc:`ceph <ceph>`\(8),
+:doc:`mkcephfs <mkcephfs>`\(8)
--- /dev/null
+=========================================
+ ceph-debugpack -- ceph debug packer utility
+=========================================
+
+.. program:: ceph-debugpack
+
+Synopsis
+========
+
+| **ceph-debugpack** [ *options* ] *filename.tar.gz*
+
+
+Description
+===========
+
+**ceph-debugpack** will build a tarball containing various items that are
+useful for debugging crashes. The resulting tarball can be shared with
+Ceph developers when debugging a problem.
+
+The tarball will include the binaries for ceph-mds, ceph-osd, and ceph-mon, any
+log files, the ceph.conf configuration file, any core files we can
+find, and (if the system is running) dumps of the current osd, mds,
+and pg maps from the monitor.
+
+
+Options
+=======
+
+.. option:: -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.
+
+
+Availability
+============
+
+**ceph-debugpack** is part of the Ceph distributed file system. Please
+refer to the Ceph wiki at http://ceph.newdream.net/wiki for more
+information.
+
+
+See also
+========
+
+:doc:`ceph <ceph>`\(8)
--- /dev/null
+=====================================
+ ceph-fuse -- FUSE-based client for ceph
+=====================================
+
+.. program:: ceph-fuse
+
+Synopsis
+========
+
+| **ceph-fuse** [ -m *monaddr*:*port* ] *mountpoint* [ *fuse options* ]
+
+
+Description
+===========
+
+**ceph-fuse** is a FUSE (File system in USErspace) client for Ceph
+distributed file system. It will mount a ceph file system (specified
+via the -m option for described by ceph.conf (see below) at the
+specific mount point.
+
+The file system can be unmounted with::
+
+ fusermount -u mountpoint
+
+or by sending ``SIGINT`` to the ``ceph-fuse`` process.
+
+
+Options
+=======
+
+Any options not recognized by ceph-fuse will be passed on to libfuse.
+
+.. option:: -d
+
+ Detach from console and daemonize after startup.
+
+.. option:: -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.
+
+.. option:: -m monaddress[:port]
+
+ Connect to specified monitor (instead of looking through ceph.conf).
+
+.. option:: -r root_directory
+
+ Use root_directory as the mounted root, rather than the full Ceph tree.
+
+
+Availability
+============
+
+**ceph-fuse** is part of the Ceph distributed file system. Please refer to
+the Ceph wiki at http://ceph.newdream.net/wiki for more information.
+
+
+See also
+========
+
+fusermount(8),
+:doc:`ceph <ceph>`\(8)
--- /dev/null
+=====================================
+ ceph-mds -- ceph metadata server daemon
+=====================================
+
+.. program:: cmds
+
+Synopsis
+========
+
+| **ceph-mds** -i *name* [[ --hot-standby [*rank*] ]|[--journal_check *rank*]]
+
+
+Description
+===========
+
+**ceph-mds** is the metadata server daemon for the Ceph distributed file
+system. One or more instances of ceph-mds collectively manage the file
+system namespace, coordinating access to the shared OSD cluster.
+
+Each ceph-mds daemon instance should have a unique name. The name is used
+to identify daemon instances in the ceph.conf.
+
+Once the daemon has started, the monitor cluster will normally assign
+it a logical rank, or put it in a standby pool to take over for
+another daemon that crashes. Some of the specified options can cause
+other behaviors.
+
+If you specify hot-standby or journal-check, you must either specify
+the rank on the command line, or specify one of the
+mds_standby_for_[rank|name] parameters in the config. The command
+line specification overrides the config, and specifying the rank
+overrides specifying the name.
+
+
+Options
+=======
+
+.. option:: -f, --foreground
+
+ Foreground: do not daemonize after startup (run in foreground). Do
+ not generate a pid file. Useful when run via :doc:`ceph-run
+ <ceph-run>`\(8).
+
+.. option:: -d
+
+ Debug mode: like ``-f``, but also send all log output to stderr.
+
+.. option:: -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.
+
+.. option:: -m monaddress[:port]
+
+ Connect to specified monitor (instead of looking through
+ ``ceph.conf``).
+
+
+Availability
+============
+
+**ceph-mon** is part of the Ceph distributed file system. Please refer to the Ceph wiki at
+http://ceph.newdream.net/wiki for more information.
+
+
+See also
+========
+
+:doc:`ceph <ceph>`\(8),
+:doc:`ceph-mon <ceph-mon>`\(8),
+:doc:`ceph-osd <ceph-osd>`\(8)
--- /dev/null
+=============================
+ ceph-mon -- ceph monitor daemon
+=============================
+
+.. program:: cmon
+
+Synopsis
+========
+
+| **cmon** -i *monid* [ --mon-data *mondatapath* ]
+
+
+Description
+===========
+
+**cmon** is the cluster monitor daemon for the Ceph distributed file
+system. One or more instances of **cmon** form a Paxos part-time
+parliament cluster that provides extremely reliable and durable
+storage of cluster membership, configuration, and state.
+
+The *mondatapath* refers to a directory on a local file system storing
+monitor data. It is normally specified via the ``mon data`` option in
+the configuration file.
+
+Options
+=======
+
+.. option:: -f, --foreground
+
+ Foreground: do not daemonize after startup (run in foreground). Do
+ not generate a pid file. Useful when run via :doc:`ceph-run <ceph-run>`\(8).
+
+.. option:: -d
+
+ Debug mode: like ``-f``, but also send all log output to stderr.
+
+.. option:: -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.
+
+
+Availability
+============
+
+**cmon** is part of the Ceph distributed file system. Please refer to
+the Ceph wiki at http://ceph.newdream.net/wiki for more information.
+
+
+See also
+========
+
+:doc:`ceph <ceph>`\(8),
+:doc:`ceph-mds <ceph-mds>`\(8),
+:doc:`ceph-osd <ceph-osd>`\(8)
--- /dev/null
+====================================
+ ceph-osd -- ceph object storage daemon
+====================================
+
+.. program:: ceph-osd
+
+Synopsis
+========
+
+| **ceph-osd** -i *osdnum* [ --osd-data *datapath* ] [ --osd-journal
+ *journal* ] [ --mkfs ] [ --mkjournal ] [ --mkkey ]
+
+
+Description
+===========
+
+**ceph-osd** is the object storage daemon for the Ceph distributed file
+system. It is responsible for storing objects on a local file system
+and providing access to them over the network.
+
+The datapath argument should be a directory on a btrfs file system
+where the object data resides. The journal is optional, and is only
+useful performance-wise when it resides on a different disk than
+datapath with low latency (ideally, an NVRAM device).
+
+
+Options
+=======
+
+.. option:: -f, --foreground
+
+ Foreground: do not daemonize after startup (run in foreground). Do
+ not generate a pid file. Useful when run via :doc:`ceph-run <ceph-run>`\(8).
+
+.. option:: -d
+
+ Debug mode: like ``-f``, but also send all log output to stderr.
+
+.. option:: --osd-data osddata
+
+ Use object store at *osddata*.
+
+.. option:: --osd-journal journal
+
+ Journal updates to *journal*.
+
+.. option:: --mkfs
+
+ Create an empty object repository. Normally invoked by
+ :doc:`mkcephfs <mkcephfs>`\(8). This also initializes the journal
+ (if one is defined).
+
+.. option:: --mkkey
+
+ Generate a new secret key. This is normally used in combination
+ with ``--mkfs`` as it is more convenient than generating a key by
+ hand with :doc:`ceph-authtool <ceph-authtool>`\(8).
+
+.. option:: --mkjournal
+
+ Create a new journal file to match an existing object repository.
+ This is useful if the journal device or file is wiped out due to a
+ disk or file system failure.
+
+.. option:: --flush-journal
+
+ Flush the journal to permanent store. This runs in the foreground
+ so you know when it's completed. This can be useful if you want to
+ resize the journal or need to otherwise destroy it: this guarantees
+ you won't lose data.
+
+.. option:: -c ceph.conf, --conf=ceph.conf
+
+ Use *ceph.conf* configuration file instead of the default
+ ``/etc/ceph/ceph.conf`` for runtime configuration options.
+
+.. option:: -m monaddress[:port]
+
+ Connect to specified monitor (instead of looking through
+ ``ceph.conf``).
+
+
+Availability
+============
+
+**ceph-osd** is part of the Ceph distributed file system. Please refer to
+the Ceph wiki at http://ceph.newdream.net/wiki for more information.
+
+See also
+========
+
+:doc:`ceph <ceph>`\(8),
+:doc:`ceph-mds <ceph-mds>`\(8),
+:doc:`ceph-mon <ceph-mon>`\(8),
+:doc:`ceph-authtool <ceph-authtool>`\(8)
--- /dev/null
+==============================================
+ ceph-rbdnamer -- udev helper to name RBD devices
+==============================================
+
+.. program:: ceph-rbdnamer
+
+
+Synopsis
+========
+
+| **ceph-rbdnamer** *num*
+
+
+Description
+===========
+
+**ceph-rbdnamer** prints the pool and image name for the given RBD devices
+to stdout. It is used by `udev` (using a rule like the one below) to
+set up a device symlink.
+
+
+::
+
+ KERNEL=="rbd[0-9]*", PROGRAM="/usr/bin/ceph-rbdnamer %n", SYMLINK+="rbd/%c{1}/%c{2}:%n"
+
+
+Availability
+============
+
+**ceph-rbdnamer** is part of the Ceph distributed file system. Please
+refer to the Ceph wiki at http://ceph.newdream.net/wiki for more
+information.
+
+
+See also
+========
+
+:doc:`rbd <rbd>`\(8),
+:doc:`ceph <ceph>`\(8)
--- /dev/null
+=====================================
+ ceph-run -- restart daemon on core dump
+=====================================
+
+.. program:: ceph-run
+
+Synopsis
+========
+
+| **ceph-run** *command* ...
+
+
+Description
+===========
+
+**ceph-run** is a simple wrapper that will restart a daemon if it exits
+with a signal indicating it crashed and possibly core dumped (that is,
+signals 3, 4, 5, 6, 8, or 11).
+
+The command should run the daemon in the foreground. For Ceph daemons,
+that means the ``-f`` option.
+
+
+Options
+=======
+
+None
+
+
+Availability
+============
+
+**ceph-run** is part of the Ceph distributed file system. Please refer to
+the Ceph wiki at http://ceph.newdream.net/wiki for more information.
+
+
+See also
+========
+
+:doc:`ceph <ceph>`\(8),
+:doc:`ceph-mon <ceph-mon>`\(8),
+:doc:`ceph-mds <ceph-mds>`\(8),
+:doc:`ceph-osd <ceph-osd>`\(8)
--- /dev/null
+===========================================
+ ceph-syn -- ceph synthetic workload generator
+===========================================
+
+.. program:: ceph-syn
+
+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
+=======
+
+.. option:: -d
+
+ Detach from console and daemonize after startup.
+
+.. option:: -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.
+
+.. option:: -m monaddress[:port]
+
+ Connect to specified monitor (instead of looking through
+ ``ceph.conf``).
+
+.. option:: --num_client num
+
+ Run num different clients, each in a separate thread.
+
+.. option:: --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.
+
+:command:`mknap` *path* *snapname*
+ Create a snapshot called *snapname* on *path*.
+
+:command:`rmsnap` *path* *snapname*
+ Delete snapshot called *snapname* on *path*.
+
+:command:`rmfile` *path*
+ Delete/unlink *path*.
+
+:command:`writefile` *sizeinmb* *blocksize*
+ Create a file, named after our client id, that is *sizeinmb* MB by
+ writing *blocksize* chunks.
+
+:command:`readfile` *sizeinmb* *blocksize*
+ Read file, named after our client id, that is *sizeinmb* MB by
+ writing *blocksize* chunks.
+
+:command:`rw` *sizeinmb* *blocksize*
+ Write file, then read it back, as above.
+
+:command:`makedirs` *numsubdirs* *numfiles* *depth*
+ Create a hierarchy of directories that is *depth* levels deep. Give
+ each directory *numsubdirs* subdirectories and *numfiles* files.
+
+:command:`walk`
+ Recursively walk the file system (like find).
+
+
+Availability
+============
+
+**ceph-syn** is part of the Ceph distributed file system. Please refer to
+the Ceph wiki at http://ceph.newdream.net/wiki for more information.
+
+See also
+========
+
+:doc:`ceph <ceph>`\(8),
+:doc:`ceph-fuse <ceph-fuse>`\(8)
+++ /dev/null
-=====================================
- ceph-fuse -- FUSE-based client for ceph
-=====================================
-
-.. program:: ceph-fuse
-
-Synopsis
-========
-
-| **ceph-fuse** [ -m *monaddr*:*port* ] *mountpoint* [ *fuse options* ]
-
-
-Description
-===========
-
-**ceph-fuse** is a FUSE (File system in USErspace) client for Ceph
-distributed file system. It will mount a ceph file system (specified
-via the -m option for described by ceph.conf (see below) at the
-specific mount point.
-
-The file system can be unmounted with::
-
- fusermount -u mountpoint
-
-or by sending ``SIGINT`` to the ``ceph-fuse`` process.
-
-
-Options
-=======
-
-Any options not recognized by ceph-fuse will be passed on to libfuse.
-
-.. option:: -d
-
- Detach from console and daemonize after startup.
-
-.. option:: -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.
-
-.. option:: -m monaddress[:port]
-
- Connect to specified monitor (instead of looking through ceph.conf).
-
-.. option:: -r root_directory
-
- Use root_directory as the mounted root, rather than the full Ceph tree.
-
-
-Availability
-============
-
-**ceph-fuse** is part of the Ceph distributed file system. Please refer to
-the Ceph wiki at http://ceph.newdream.net/wiki for more information.
-
-
-See also
-========
-
-fusermount(8),
-:doc:`ceph <ceph>`\(8)
+++ /dev/null
-=====================================
- ceph-mds -- ceph metadata server daemon
-=====================================
-
-.. program:: cmds
-
-Synopsis
-========
-
-| **ceph-mds** -i *name* [[ --hot-standby [*rank*] ]|[--journal_check *rank*]]
-
-
-Description
-===========
-
-**ceph-mds** is the metadata server daemon for the Ceph distributed file
-system. One or more instances of ceph-mds collectively manage the file
-system namespace, coordinating access to the shared OSD cluster.
-
-Each ceph-mds daemon instance should have a unique name. The name is used
-to identify daemon instances in the ceph.conf.
-
-Once the daemon has started, the monitor cluster will normally assign
-it a logical rank, or put it in a standby pool to take over for
-another daemon that crashes. Some of the specified options can cause
-other behaviors.
-
-If you specify hot-standby or journal-check, you must either specify
-the rank on the command line, or specify one of the
-mds_standby_for_[rank|name] parameters in the config. The command
-line specification overrides the config, and specifying the rank
-overrides specifying the name.
-
-
-Options
-=======
-
-.. option:: -f, --foreground
-
- Foreground: do not daemonize after startup (run in foreground). Do
- not generate a pid file. Useful when run via :doc:`ceph-run
- <ceph-run>`\(8).
-
-.. option:: -d
-
- Debug mode: like ``-f``, but also send all log output to stderr.
-
-.. option:: -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.
-
-.. option:: -m monaddress[:port]
-
- Connect to specified monitor (instead of looking through
- ``ceph.conf``).
-
-
-Availability
-============
-
-**ceph-mon** is part of the Ceph distributed file system. Please refer to the Ceph wiki at
-http://ceph.newdream.net/wiki for more information.
-
-
-See also
-========
-
-:doc:`ceph <ceph>`\(8),
-:doc:`ceph-mon <cmon>`\(8),
-:doc:`ceph-osd <cosd>`\(8)
+++ /dev/null
-=============================
- ceph-mon -- ceph monitor daemon
-=============================
-
-.. program:: cmon
-
-Synopsis
-========
-
-| **cmon** -i *monid* [ --mon-data *mondatapath* ]
-
-
-Description
-===========
-
-**cmon** is the cluster monitor daemon for the Ceph distributed file
-system. One or more instances of **cmon** form a Paxos part-time
-parliament cluster that provides extremely reliable and durable
-storage of cluster membership, configuration, and state.
-
-The *mondatapath* refers to a directory on a local file system storing
-monitor data. It is normally specified via the ``mon data`` option in
-the configuration file.
-
-Options
-=======
-
-.. option:: -f, --foreground
-
- Foreground: do not daemonize after startup (run in foreground). Do
- not generate a pid file. Useful when run via :doc:`ceph-run <ceph-run>`\(8).
-
-.. option:: -d
-
- Debug mode: like ``-f``, but also send all log output to stderr.
-
-.. option:: -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.
-
-
-Availability
-============
-
-**cmon** is part of the Ceph distributed file system. Please refer to
-the Ceph wiki at http://ceph.newdream.net/wiki for more information.
-
-
-See also
-========
-
-:doc:`ceph <ceph>`\(8),
-:doc:`ceph-mds <cmds>`\(8),
-:doc:`ceph-osd <cosd>`\(8)
+++ /dev/null
-====================================
- ceph-osd -- ceph object storage daemon
-====================================
-
-.. program:: ceph-osd
-
-Synopsis
-========
-
-| **ceph-osd** -i *osdnum* [ --osd-data *datapath* ] [ --osd-journal
- *journal* ] [ --mkfs ] [ --mkjournal ] [ --mkkey ]
-
-
-Description
-===========
-
-**ceph-osd** is the object storage daemon for the Ceph distributed file
-system. It is responsible for storing objects on a local file system
-and providing access to them over the network.
-
-The datapath argument should be a directory on a btrfs file system
-where the object data resides. The journal is optional, and is only
-useful performance-wise when it resides on a different disk than
-datapath with low latency (ideally, an NVRAM device).
-
-
-Options
-=======
-
-.. option:: -f, --foreground
-
- Foreground: do not daemonize after startup (run in foreground). Do
- not generate a pid file. Useful when run via :doc:`ceph-run <ceph-run>`\(8).
-
-.. option:: -d
-
- Debug mode: like ``-f``, but also send all log output to stderr.
-
-.. option:: --osd-data osddata
-
- Use object store at *osddata*.
-
-.. option:: --osd-journal journal
-
- Journal updates to *journal*.
-
-.. option:: --mkfs
-
- Create an empty object repository. Normally invoked by
- :doc:`mkcephfs <mkcephfs>`\(8). This also initializes the journal
- (if one is defined).
-
-.. option:: --mkkey
-
- Generate a new secret key. This is normally used in combination
- with ``--mkfs`` as it is more convenient than generating a key by
- hand with :doc:`cauthtool <cauthtool>`\(8).
-
-.. option:: --mkjournal
-
- Create a new journal file to match an existing object repository.
- This is useful if the journal device or file is wiped out due to a
- disk or file system failure.
-
-.. option:: --flush-journal
-
- Flush the journal to permanent store. This runs in the foreground
- so you know when it's completed. This can be useful if you want to
- resize the journal or need to otherwise destroy it: this guarantees
- you won't lose data.
-
-.. option:: -c ceph.conf, --conf=ceph.conf
-
- Use *ceph.conf* configuration file instead of the default
- ``/etc/ceph/ceph.conf`` for runtime configuration options.
-
-.. option:: -m monaddress[:port]
-
- Connect to specified monitor (instead of looking through
- ``ceph.conf``).
-
-
-Availability
-============
-
-**ceph-osd** is part of the Ceph distributed file system. Please refer to
-the Ceph wiki at http://ceph.newdream.net/wiki for more information.
-
-See also
-========
-
-:doc:`ceph <ceph>`\(8),
-:doc:`ceph-mds <cmds>`\(8),
-:doc:`ceph-mon <cmon>`\(8),
-:doc:`ceph-authtool <cauthtool>`\(8)
+++ /dev/null
-==============================================
- ceph-rbdnamer -- udev helper to name RBD devices
-==============================================
-
-.. program:: ceph-rbdnamer
-
-
-Synopsis
-========
-
-| **ceph-rbdnamer** *num*
-
-
-Description
-===========
-
-**ceph-rbdnamer** prints the pool and image name for the given RBD devices
-to stdout. It is used by `udev` (using a rule like the one below) to
-set up a device symlink.
-
-
-::
-
- KERNEL=="rbd[0-9]*", PROGRAM="/usr/bin/ceph-rbdnamer %n", SYMLINK+="rbd/%c{1}/%c{2}:%n"
-
-
-Availability
-============
-
-**ceph-rbdnamer** is part of the Ceph distributed file system. Please
-refer to the Ceph wiki at http://ceph.newdream.net/wiki for more
-information.
-
-
-See also
-========
-
-:doc:`rbd <rbd>`\(8),
-:doc:`ceph <ceph>`\(8)
+++ /dev/null
-=====================================
- ceph-run -- restart daemon on core dump
-=====================================
-
-.. program:: ceph-run
-
-Synopsis
-========
-
-| **ceph-run** *command* ...
-
-
-Description
-===========
-
-**ceph-run** is a simple wrapper that will restart a daemon if it exits
-with a signal indicating it crashed and possibly core dumped (that is,
-signals 3, 4, 5, 6, 8, or 11).
-
-The command should run the daemon in the foreground. For Ceph daemons,
-that means the ``-f`` option.
-
-
-Options
-=======
-
-None
-
-
-Availability
-============
-
-**ceph-run** is part of the Ceph distributed file system. Please refer to
-the Ceph wiki at http://ceph.newdream.net/wiki for more information.
-
-
-See also
-========
-
-:doc:`ceph <ceph>`\(8),
-:doc:`ceph-mon <cmon>`\(8),
-:doc:`ceph-mds <cmds>`\(8),
-:doc:`ceph-osd <cosd>`\(8)
+++ /dev/null
-===========================================
- csyn -- ceph synthetic workload generator
-===========================================
-
-.. program:: csyn
-
-Synopsis
-========
-
-| **csyn** [ -m *monaddr*:*port* ] --syn *command* *...*
-
-
-Description
-===========
-
-**csyn** 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
-=======
-
-.. option:: -d
-
- Detach from console and daemonize after startup.
-
-.. option:: -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.
-
-.. option:: -m monaddress[:port]
-
- Connect to specified monitor (instead of looking through
- ``ceph.conf``).
-
-.. option:: --num_client num
-
- Run num different clients, each in a separate thread.
-
-.. option:: --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.
-
-:command:`mknap` *path* *snapname*
- Create a snapshot called *snapname* on *path*.
-
-:command:`rmsnap` *path* *snapname*
- Delete snapshot called *snapname* on *path*.
-
-:command:`rmfile` *path*
- Delete/unlink *path*.
-
-:command:`writefile` *sizeinmb* *blocksize*
- Create a file, named after our client id, that is *sizeinmb* MB by
- writing *blocksize* chunks.
-
-:command:`readfile` *sizeinmb* *blocksize*
- Read file, named after our client id, that is *sizeinmb* MB by
- writing *blocksize* chunks.
-
-:command:`rw` *sizeinmb* *blocksize*
- Write file, then read it back, as above.
-
-:command:`makedirs` *numsubdirs* *numfiles* *depth*
- Create a hierarchy of directories that is *depth* levels deep. Give
- each directory *numsubdirs* subdirectories and *numfiles* files.
-
-:command:`walk`
- Recursively walk the file system (like find).
-
-
-Availability
-============
-
-**csyn** is part of the Ceph distributed file system. Please refer to
-the Ceph wiki at http://ceph.newdream.net/wiki for more information.
-
-See also
-========
-
-:doc:`ceph <ceph>`\(8),
-:doc:`ceph-fuse <ceph-fuse>`\(8)
touch secretfile
chmod go= secretfile
- cauthtool --name=bar --print-key /etc/ceph/client.bar.keyring >secretfile
+ ceph-authtool --name=bar --print-key /etc/ceph/client.bar.keyring >secretfile
rbd map tengigs --user bar --secret secretfile
.. todo:: the secretfile part is really clumsy
.TH "CAUTHTOOL" "8" "September 09, 2011" "dev" "Ceph"
.SH NAME
-cauthtool \- ceph keyring manipulation tool
+ceph-authtool \- ceph keyring manipulation tool
.
.nr rst2man-indent-level 0
.
.
.SH SYNOPSIS
.nf
-\fBcauthtool\fP \fIkeyringfile\fP [ \-l | \-\-list ] [ \-C | \-\-create\-keyring
+\fBceph-authtool\fP \fIkeyringfile\fP [ \-l | \-\-list ] [ \-C | \-\-create\-keyring
] [ \-p | \-\-print ] [ \-n | \-\-name \fIentityname\fP ] [ \-\-gen\-key ] [ \-a |
\-\-add\-key \fIbase64_key\fP ] [ \-\-caps \fIcapfils\fP ] [ \-b | \-\-bin ]
.fi
.sp
.SH DESCRIPTION
.sp
-\fBcauthtool\fP is a utility to create, view, and modify a Ceph keyring
+\fBceph-authtool\fP 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
.sp
.nf
.ft C
-cauthtool \-c \-n client.foo \-\-gen\-key keyring
+ceph-authtool \-c \-n client.foo \-\-gen\-key keyring
.ft P
.fi
.sp
.sp
.nf
.ft C
-cauthtool \-n client.foo \-\-cap mds \(aqallow\(aq \-\-cap osd \(aqallow rw pool=data\(aq \-\-cap mon \(aqallow r\(aq keyring
+ceph-authtool \-n client.foo \-\-cap mds \(aqallow\(aq \-\-cap osd \(aqallow rw pool=data\(aq \-\-cap mon \(aqallow r\(aq keyring
.ft P
.fi
.sp
.sp
.nf
.ft C
-cauthtool \-l keyring
+ceph-authtool \-l keyring
.ft P
.fi
.sp
.sp
.nf
.ft C
-mount \-t ceph serverhost:/ mountpoint \-o name=foo,secret=\(gacauthtool \-p \-n client.foo keyring\(ga
+mount \-t ceph serverhost:/ mountpoint \-o name=foo,secret=\(gaceph-authtool \-p \-n client.foo keyring\(ga
.ft P
.fi
.SH AVAILABILITY
.sp
-\fBcauthtool\fP is part of the Ceph distributed file system. Please
+\fBceph-authtool\fP is part of the Ceph distributed file system. Please
refer to the Ceph wiki at \fI\%http://ceph.newdream.net/wiki\fP for more
information.
.SH SEE ALSO
.B \-\-mkkey
Generate a new secret key. This is normally used in combination
with \fB\-\-mkfs\fP as it is more convenient than generating a key by
-hand with \fBcauthtool\fP(8).
+hand with \fBceph-authtool\fP(8).
.UNINDENT
.INDENT 0.0
.TP
\fBceph\fP(8),
\fBcmds\fP(8),
\fBcmon\fP(8),
-\fBcauthtool\fP(8)
+\fBceph-authtool\fP(8)
.SH COPYRIGHT
2011, New Dream Network
.\" Generated by docutils manpage writer.
[ -z "$imgsize" ] && imgsize=1024
[ -z "$user" ] && user=admin
[ -z "$keyring" ] && keyring="`$CCONF keyring`"
- [ -z "$secret" ] && secret="`cauthtool $keyring -n client.$user -p`"
+ [ -z "$secret" ] && secret="`ceph-authtool $keyring -n client.$user -p`"
monip="`echo $monhost | sed 's/:/ /g' | awk '{print $1}'`"
monport="`echo $monhost | sed 's/:/ /g' | awk '{print $2}'`"
#!/bin/sh -ex
-cauthtool --create-keyring k --gen-key -p --name client.xx
+ceph-authtool --create-keyring k --gen-key -p --name client.xx
ceph auth add -i k client.xx mon "allow command foo; allow command bar *; allow command baz ...; allow command foo add * mon allow\\ rwx osd allow\\ *"
( ceph -k k -n client.xx foo || true ) | grep 'unrecog'
void usage()
{
- cout << "usage: cauthtool keyringfile [OPTIONS]...\n"
+ cout << "usage: ceph-authtool keyringfile [OPTIONS]...\n"
<< "where the options are:\n"
<< " -l, --list will list all keys and capabilities present in\n"
<< " the keyring\n"
+++ /dev/null
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2011 New Dream Network
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
- * Foundation. See file COPYING.
- *
- */
-
-#include "gtest/gtest.h"
-#include "include/cephfs/libcephfs.h"
-
-#include <sstream>
-#include <string>
-#include <string.h>
-
-using std::string;
-
-TEST(LibCephConfig, SimpleSet) {
- struct ceph_mount_info *cmount;
- int ret = ceph_create(&cmount, NULL);
- ASSERT_EQ(ret, 0);
-
- ret = ceph_conf_set(cmount, "debug", "21");
- ASSERT_EQ(ret, 0);
-
- char buf[128];
- memset(buf, 0, sizeof(buf));
- ret = ceph_conf_get(cmount, "debug", buf, sizeof(buf));
- ASSERT_EQ(ret, 0);
- ASSERT_EQ(string("21"), string(buf));
-
- ceph_shutdown(cmount);
-}
-
-TEST(LibCephConfig, ArgV) {
- struct ceph_mount_info *cmount;
- int ret = ceph_create(&cmount, NULL);
- ASSERT_EQ(ret, 0);
-
- const char *argv[] = { "foo", "--debug", "2",
- "--keyfile", "/tmp/my-keyfile", NULL };
- size_t argc = (sizeof(argv) / sizeof(argv[0])) - 1;
- ceph_conf_parse_argv(cmount, argc, argv);
-
- char buf[128];
- memset(buf, 0, sizeof(buf));
- ret = ceph_conf_get(cmount, "keyfile", buf, sizeof(buf));
- ASSERT_EQ(ret, 0);
- ASSERT_EQ(string("/tmp/my-keyfile"), string(buf));
-
- memset(buf, 0, sizeof(buf));
- ret = ceph_conf_get(cmount, "debug", buf, sizeof(buf));
- ASSERT_EQ(ret, 0);
- ASSERT_EQ(string("2"), string(buf));
-
- ceph_shutdown(cmount);
-}
--- /dev/null
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// vim: ts=8 sw=2 smarttab
+/*
+ * Ceph - scalable distributed file system
+ *
+ * Copyright (C) 2011 New Dream Network
+ *
+ * This is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software
+ * Foundation. See file COPYING.
+ *
+ */
+
+#include "gtest/gtest.h"
+#include "include/cephfs/libcephfs.h"
+
+#include <sstream>
+#include <string>
+#include <string.h>
+
+using std::string;
+
+TEST(LibCephConfig, SimpleSet) {
+ struct ceph_mount_info *cmount;
+ int ret = ceph_create(&cmount, NULL);
+ ASSERT_EQ(ret, 0);
+
+ ret = ceph_conf_set(cmount, "debug", "21");
+ ASSERT_EQ(ret, 0);
+
+ char buf[128];
+ memset(buf, 0, sizeof(buf));
+ ret = ceph_conf_get(cmount, "debug", buf, sizeof(buf));
+ ASSERT_EQ(ret, 0);
+ ASSERT_EQ(string("21"), string(buf));
+
+ ceph_shutdown(cmount);
+}
+
+TEST(LibCephConfig, ArgV) {
+ struct ceph_mount_info *cmount;
+ int ret = ceph_create(&cmount, NULL);
+ ASSERT_EQ(ret, 0);
+
+ const char *argv[] = { "foo", "--debug", "2",
+ "--keyfile", "/tmp/my-keyfile", NULL };
+ size_t argc = (sizeof(argv) / sizeof(argv[0])) - 1;
+ ceph_conf_parse_argv(cmount, argc, argv);
+
+ char buf[128];
+ memset(buf, 0, sizeof(buf));
+ ret = ceph_conf_get(cmount, "keyfile", buf, sizeof(buf));
+ ASSERT_EQ(ret, 0);
+ ASSERT_EQ(string("/tmp/my-keyfile"), string(buf));
+
+ memset(buf, 0, sizeof(buf));
+ ret = ceph_conf_get(cmount, "debug", buf, sizeof(buf));
+ ASSERT_EQ(ret, 0);
+ ASSERT_EQ(string("2"), string(buf));
+
+ ceph_shutdown(cmount);
+}