]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
remove mkcephfs 1629/head
authorSage Weil <sage@inktank.com>
Tue, 8 Apr 2014 21:34:15 +0000 (14:34 -0700)
committerSage Weil <sage@inktank.com>
Tue, 8 Apr 2014 21:34:15 +0000 (14:34 -0700)
Fixes: #7552
Signed-off-by: Sage Weil <sage@inktank.com>
16 files changed:
ceph.spec.in
debian/ceph.install
doc/install/upgrading-ceph.rst
doc/rados/configuration/mon-config-ref.rst
doc/rados/operations/crush-map.rst
doc/rados/operations/operating.rst
doc/radosgw/config.rst
doc/start/ceph.conf
man/Makefile.am
man/mkcephfs.8 [deleted file]
src/.gitignore
src/Makefile.am
src/ceph_mon.cc
src/init-ceph.in
src/mkcephfs.in [deleted file]
src/sample.ceph.conf

index ee9dbd97eb3a6f8a74c9dfe032991b4ea250e127..9a09f59e9e4e93a32a9ddaaee9e34244438a9647 100644 (file)
@@ -417,7 +417,6 @@ fi
 %{_sbindir}/ceph-disk-udev
 %{_sbindir}/ceph-create-keys
 %{_sbindir}/rcceph
-/sbin/mkcephfs
 /sbin/mount.ceph
 %dir %{_libdir}/ceph
 %{_libdir}/ceph/ceph_common.sh
@@ -456,7 +455,6 @@ fi
 %{_mandir}/man8/ceph-mon.8*
 %{_mandir}/man8/ceph-mds.8*
 %{_mandir}/man8/ceph-osd.8*
-%{_mandir}/man8/mkcephfs.8*
 %{_mandir}/man8/ceph-run.8*
 %{_mandir}/man8/ceph-syn.8*
 %{_mandir}/man8/ceph-post-file.8*
index a0647a5f51e0df0bdc20d449ae9a3577a8ec3f88..f9e1159d33fa77a3cdf6da1be37fc9bd2b3063ee 100644 (file)
@@ -5,7 +5,6 @@ usr/sbin/ceph-create-keys
 usr/sbin/ceph-disk
 usr/sbin/ceph-disk-activate
 usr/sbin/ceph-disk-prepare
-sbin/mkcephfs
 usr/bin/ceph-clsinfo
 usr/bin/ceph-debugpack
 usr/bin/ceph-mon
@@ -28,6 +27,5 @@ usr/share/man/man8/ceph-osd.8
 usr/share/man/man8/ceph-run.8
 usr/share/man/man8/ceph-rest-api.8
 usr/share/man/man8/crushtool.8
-usr/share/man/man8/mkcephfs.8
 usr/share/man/man8/monmaptool.8
 usr/share/man/man8/osdmaptool.8
index b06b3e402938cb138f5b8b7287cb028b84cd3888..78a94e2b1a50500c4ae28ec9b92fd8b6f4b4f2c1 100644 (file)
@@ -207,7 +207,7 @@ ceph-deploy
 -----------
 
 The ``ceph-deploy`` tool is now the preferred method of provisioning new clusters.
-For existing clusters created via ``mkcephfs`` that would like to transition to the
+For existing clusters created via the obsolete ``mkcephfs`` tool that would like to transition to the
 new tool, there is a migration path, documented at `Transitioning to ceph-deploy`_.
 
 Cuttlefish to Dumpling
index e3a53e4a2dce827e0d7e0c0987c28e2db5b2144c..ae98d4b85d09c54047f1c47294fe22f8a69e1140 100644 (file)
@@ -152,15 +152,15 @@ Bootstrapping Monitors
 
 In most configuration and deployment cases, tools that deploy Ceph may help
 bootstrap the Ceph Monitors by generating a monitor map for you (e.g.,
-``mkcephfs``, ``ceph-deploy``, etc). A Ceph Monitor requires a few explicit
+``ceph-deploy``, etc). A Ceph Monitor requires a few explicit
 settings:
 
-- **Filesystem ID**: The ``fsid`` is the unique identifier for your object
-  store. Since you can run multiple clusters on the same hardware, you must 
-  specify the unique ID of the object store when bootstrapping a monitor. 
-  Deployment tools usually do this for you (e.g., ``mkcephfs`` or 
-  ``ceph-deploy`` can call a tool like ``uuidgen``), but you may specify the 
-  ``fsid`` manually too.
+- **Filesystem ID**: The ``fsid`` is the unique identifier for your
+  object store. Since you can run multiple clusters on the same
+  hardware, you must specify the unique ID of the object store when
+  bootstrapping a monitor.  Deployment tools usually do this for you
+  (e.g., ``ceph-deploy`` can call a tool like ``uuidgen``), but you
+  may specify the ``fsid`` manually too.
   
 - **Monitor ID**: A monitor ID is a unique ID assigned to each monitor within 
   the cluster. It is an alphanumeric value, and by convention the identifier 
@@ -169,7 +169,7 @@ settings:
   by a deployment tool, or using the ``ceph`` commandline.
 
 - **Keys**: The monitor must have secret keys. A deployment tool such as 
-  ``mkcephfs`` or ``ceph-deploy`` usually does this for you, but you may
+  ``ceph-deploy`` usually does this for you, but you may
   perform this step manually too. See `Monitor Keyrings`_ for details.
 
 For additional details on bootstrapping, see `Bootstrapping a Monitor`_.
index 6ea4083d2b4df451f910fe15585adaf098ca7f63..60bed3e0d5f3fa34fec29832bce65a4eca66eff5 100644 (file)
@@ -27,7 +27,7 @@ possibility of concurrent failures, it may be desirable to ensure that data
 replicas are on devices using different shelves, racks, power supplies,
 controllers, and/or physical locations.
 
-When you create a configuration file and deploy Ceph with ``mkcephfs``, Ceph
+When you create a configuration file and deploy Ceph with `ceph-deploy``, Ceph
 generates a default CRUSH map for your configuration. The default CRUSH map is
 fine for your Ceph sandbox environment. However, when you deploy a large-scale
 data cluster, you should give significant consideration to developing a custom
index 8c62ed5cdbfa6bdb35e778b9af1e16b658426c97..46d2f961660f89fb5b85b777943c7c31d057b6fd 100644 (file)
@@ -256,7 +256,7 @@ To stop a Ceph daemon on another node, use the following syntax::
 Running Ceph as a Service
 -------------------------
 
-When you deploy Ceph Argonaut or Bobtail with ``mkcephfs``, you operate
+When you deploy Ceph Argonaut or Bobtail with ``ceph-deploy``, you operate
 Ceph as a service (you may also use sysvinit).
 
 
@@ -356,4 +356,4 @@ To stop a Ceph daemon on another node, use the following syntax::
 
 .. _Valgrind: http://www.valgrind.org/
 .. _Upstart: http://upstart.ubuntu.com/index.html
-.. _initctl: http://manpages.ubuntu.com/manpages/raring/en/man8/initctl.8.html
\ No newline at end of file
+.. _initctl: http://manpages.ubuntu.com/manpages/raring/en/man8/initctl.8.html
index 4d54e761bcf799b93ea1a82128eae78739b6937d..b334c64f6900d24a1106b4e3e116cdde2a8f5c13 100644 (file)
@@ -27,13 +27,7 @@ the socket path and a log file.  For example::
 Redeploy Ceph Configuration
 ===========================
 
-If you deploy Ceph with ``mkcephfs``, manually redeploy ``ceph.conf`` to the 
-hosts in your cluster. For example:: 
-
-       cd /etc/ceph
-       ssh {host-name} sudo tee /etc/ceph/ceph.conf < ceph.conf
-
-If you used ``ceph-deploy``, push a new copy to the hosts in your cluster.
+If you use ``ceph-deploy``, push a new copy to the hosts in your cluster.
 For example:: 
 
        ceph-deploy config push {host-name [host-name]...}
index 9f6655ba7a867795a1f7180633a47f938174168c..110697908083ec18d8819d55fd6549eac7ae6294 100644 (file)
        filestore xattr use omap = true
 
 
-       # For Bobtail (v 0.56) and subsequent versions, you may 
-       # add settings for mkcephfs so that it will create and mount
-       # the file system on a particular OSD for you. Remove the comment `#` 
-       # character for the following settings and replace the values 
-       # in braces with appropriate values, or leave the following settings 
-       # commented out to accept the default values. You must specify the 
-       # --mkfs option with mkcephfs in order for the deployment script to 
-       # utilize the following settings, and you must define the 'devs'
-       # option for each osd instance; see below.
+       # For ceph-deploy, you can control what type of file system
+       # is created via these options.
 
        #osd mkfs type = {fs-type}
        #osd mkfs options {fs-type} = {mkfs options}   # default for xfs is "-f"        
 [osd.0]
        host = {hostname}
        
-       # For Bobtail (v 0.56) and subsequent versions, you may 
-       # add settings for mkcephfs so that it will create and mount
-       # the file system on a particular OSD for you. Remove the comment `#` 
-       # character for the following setting for each OSD and specify 
-       # a path to the device if you use mkcephfs with the --mkfs option.
-       
-       #devs = {path-to-device}
-
 [osd.1]
        host = {hostname}
-       #devs = {path-to-device}
 
 [mds.a]
        host = {hostname}
\ No newline at end of file
index be071b17bb671303269f133c43f52c0a03cddbd8..e29154ae7c2846ab9e57fd48b91bc90c47059f26 100644 (file)
@@ -4,7 +4,6 @@ dist_man_MANS = \
        ceph-osd.8 \
        ceph-mds.8 \
        ceph-mon.8 \
-       mkcephfs.8 \
        ceph-fuse.8 \
        ceph-syn.8 \
        crushtool.8 \
diff --git a/man/mkcephfs.8 b/man/mkcephfs.8
deleted file mode 100644 (file)
index 0341f49..0000000
+++ /dev/null
@@ -1,164 +0,0 @@
-.TH "MKCEPHFS" "8" "April 29, 2013" "dev" "Ceph"
-.SH NAME
-mkcephfs \- create a ceph file system
-.
-.nr rst2man-indent-level 0
-.
-.de1 rstReportMargin
-\\$1 \\n[an-margin]
-level \\n[rst2man-indent-level]
-level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
--
-\\n[rst2man-indent0]
-\\n[rst2man-indent1]
-\\n[rst2man-indent2]
-..
-.de1 INDENT
-.\" .rstReportMargin pre:
-. RS \\$1
-. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
-. nr rst2man-indent-level +1
-.\" .rstReportMargin post:
-..
-.de UNINDENT
-. RE
-.\" indent \\n[an-margin]
-.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
-.nr rst2man-indent-level -1
-.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
-.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
-..
-.\" Man page generated from reStructuredText.
-.
-.SH SYNOPSIS
-.nf
-\fBmkcephfs\fP \-c \fIceph.conf\fP [ \-\-mkfs ] [ \-a, \-\-all\-hosts [ \-k
-\fI/path/to/admin.keyring\fP ] ]
-.fi
-.sp
-.SH DESCRIPTION
-.sp
-\fBmkcephfs\fP is used to create an empty Ceph file system, possibly
-spanning multiple hosts. The ceph.conf file describes the composition
-of the entire Ceph cluster, including which hosts are participating,
-which daemons run where, and which paths are used to store file system
-data or metadata.
-.sp
-The mkcephfs tool can be used in two ways. If \-a is used, it will use
-ssh and scp to connect to remote hosts on your behalf and do the setup
-of the entire cluster. This is the easiest solution, but can also be
-inconvenient (if you don\(aqt have ssh to connect without prompting for
-passwords) or slow (if you have a large cluster).
-.sp
-Alternatively, you can run each setup phase manually. First, you need
-to prepare a monmap that will be shared by each node:
-.sp
-.nf
-.ft C
-# prepare
-master# mkdir /tmp/foo
-master# mkcephfs \-c /etc/ceph/ceph.conf \e
-  \-\-prepare\-monmap \-d /tmp/foo
-.ft P
-.fi
-.sp
-Share the \fB/tmp/foo\fP directory with other nodes in whatever way is
-convenient for you. On each OSD and MDS node:
-.sp
-.nf
-.ft C
-osdnode# mkcephfs \-\-init\-local\-daemons osd \-d /tmp/foo
-mdsnode# mkcephfs \-\-init\-local\-daemons mds \-d /tmp/foo
-.ft P
-.fi
-.sp
-Collect the contents of the /tmp/foo directories back onto a single
-node, and then:
-.sp
-.nf
-.ft C
-master# mkcephfs \-\-prepare\-mon \-d /tmp/foo
-.ft P
-.fi
-.sp
-Finally, distribute \fB/tmp/foo\fP to all monitor nodes and, on each of
-those nodes:
-.sp
-.nf
-.ft C
-monnode# mkcephfs \-\-init\-local\-daemons mon \-d /tmp/foo
-.ft P
-.fi
-.SH OPTIONS
-.INDENT 0.0
-.TP
-.B \-a, \-\-allhosts
-Performs the necessary initialization steps on all hosts in the
-cluster, executing commands via SSH.
-.UNINDENT
-.INDENT 0.0
-.TP
-.B \-c ceph.conf, \-\-conf=ceph.conf
-Use the given conf file instead of the default \fB/etc/ceph/ceph.conf\fP.
-.UNINDENT
-.INDENT 0.0
-.TP
-.B \-k /path/to/keyring
-When \fB\-a\fP is used, we can specify a location to copy the
-client.admin keyring, which is used to administer the cluster. The
-default is \fB/etc/ceph/keyring\fP (or whatever is specified in the
-config file).
-.UNINDENT
-.INDENT 0.0
-.TP
-.B \-\-mkfs
-Create and mount the file systems specified in the ceph.conf for
-OSD data storage using mkfs.$type. The \fBdevs\fP option in ceph.conf
-must specify the device(s) and the \fBosd mkfs type\fP option must
-specify the file system type (normally one of btrfs, xfs, or ext4).
-.UNINDENT
-.INDENT 0.0
-.TP
-.B \-\-no\-copy\-conf
-By default, mkcephfs with \-a will copy the new configuration to
-/etc/ceph/ceph.conf on each node in the cluster.  This option
-disables that behavior.
-.UNINDENT
-.SH SUBCOMMANDS
-.sp
-The sub\-commands performed during cluster setup can be run individually with
-.INDENT 0.0
-.TP
-.B \-\-prepare\-monmap \-d dir \-c ceph.conf
-Create an initial monmap with a random fsid/uuid and store it and
-the ceph.conf in dir.
-.UNINDENT
-.INDENT 0.0
-.TP
-.B \-\-init\-local\-daemons type \-d dir
-Initialize any daemons of type type on the local host using the
-monmap in dir.  For types osd and mds, the resulting authentication
-keys will be placed in dir.  For type mon, the initial data files
-generated by \-\-prepare\-mon (below) are expected in dir.
-.UNINDENT
-.INDENT 0.0
-.TP
-.B \-\-prepare\-mon \-d dir
-Prepare the initial monitor data based on the monmap, OSD, and MDS
-authentication keys collected in dir, and put the result in dir.
-.UNINDENT
-.SH AVAILABILITY
-.sp
-\fBmkcephfs\fP is part of the Ceph distributed file system. Please refer
-to the Ceph documentation at \fI\%http://ceph.com/docs\fP for more
-information.
-.SH SEE ALSO
-.sp
-\fBceph\fP(8),
-\fBmonmaptool\fP(8),
-\fBosdmaptool\fP(8),
-\fBcrushtool\fP(8)
-.SH COPYRIGHT
-2010-2013, Inktank Storage, Inc. and contributors. Licensed under Creative Commons BY-SA
-.\" Generated by docutils manpage writer.
-.
index 82e077c33d4f39d62345bd06ff6d82977a274cba..5bcddeaefc37bbff81a4e79d2ab95abcdbc2cd2e 100644 (file)
@@ -55,7 +55,6 @@ Makefile
 /keyring
 /librados-config
 /massif.out.*
-/mkcephfs
 /mnt
 /monmaptool
 /mount.ceph
index edec05e67ec805c9917027555746dc7c2f4c80cc..47e79005078fdcda09a392a72568f0d17f318c0f 100644 (file)
@@ -241,9 +241,8 @@ bin_SCRIPTS += \
        ceph-crush-location
 
 BUILT_SOURCES += init-ceph
-su_sbin_SCRIPTS += mkcephfs
 
-shell_scripts += init-ceph mkcephfs
+shell_scripts += init-ceph
 
 
 
@@ -268,7 +267,7 @@ admin-tools: monmaptool osdmaptool crushtool ceph-authtool
 base: core-daemons admin-tools \
        cephfs ceph-syn ceph-conf \
        rados librados-config \
-       init-ceph mkcephfs ceph_mon_store_converter ceph-post-file
+       init-ceph ceph_mon_store_converter ceph-post-file
 
 
 # version stuff
index 0aa6b20f9cc8dbf86521710b38d8096c27d901d1..bde7f00618ed31bb8052fde9877f63a61edbc195 100644 (file)
@@ -452,7 +452,7 @@ int main(int argc, const char **argv)
   bufferlist magicbl;
   err = store->get(Monitor::MONITOR_NAME, "magic", magicbl);
   if (!magicbl.length()) {
-    derr << "unable to read magic from mon data.. did you run mkcephfs?" << dendl;
+    derr << "unable to read magic from mon data" << dendl;
     prefork.exit(1);
   }
   string magic(magicbl.c_str(), magicbl.length()-1);  // ignore trailing \n
index 846bd573cef760444ea502e493780c32ed9d266c..8a8063c73398f48016192428f146a7ca6e9c907b 100644 (file)
@@ -14,7 +14,7 @@
 
 . /lib/lsb/init-functions
 
-# if we start up as ./mkcephfs, assume everything else is in the
+# if we start up as ./init-ceph, assume everything else is in the
 # current directory too.
 if [ `dirname $0` = "." ] && [ $PWD != "/etc/init.d" ]; then
     BINDIR=.
@@ -348,7 +348,7 @@ for name in $what; do
                # for the mon data and admin socket.  if so, run
                # ceph-create-keys.  this is the case for (normal)
                # chef and ceph-deploy clusters, which is who needs
-               # these keys.  it's also true for default installs
+               # these keys.  it's also true for legacy installs
                # via mkcephfs, which is fine too; there is no harm
                # in creating these keys.
                get_conf mon_data "/var/lib/ceph/mon/ceph-$id" "mon data"
diff --git a/src/mkcephfs.in b/src/mkcephfs.in
deleted file mode 100644 (file)
index 2838568..0000000
+++ /dev/null
@@ -1,564 +0,0 @@
-#!/bin/sh
-#
-# mkcephfs
-#
-# This tool is designed to be flexible.  There are two ways to go:
-#
-# The easy way does everything for you using ssh keys.  This does not
-# scale well for large clusters.
-#
-#  master$ mkcephfs -a -c /etc/ceph/ceph.conf
-#
-# Alternatively, you can use whatever file distribution and/or job
-# launching you want.
-#
-#  master$ mkdir /tmp/foo
-#  master$ mkcephfs -d /tmp/foo -c /etc/ceph/ceph.conf --prepare-monmap
-#
-#     ...copy/share /tmp/foo with all osd and mds nodes at /tmp/bar...
-#
-#  osd$ mkcephfs -d /tmp/bar --init-local-daemons osd
-#  mds$ mkcephfs -d /tmp/bar --init-local-daemons mds
-#
-#     ...gather contents of /tmp/bar's back into /tmp/foo...
-#
-#  master$ mkcephfs -d /tmp/foo --prepare-mon
-#
-#     ...distribute /tmp/foo to each monitor node...
-#
-#  mon$ mkcephfs -d /tmp/foo --init-local-daemons mon
-#  
-#  master$ cp /tmp/foo/keyring.admin /etc/ceph/keyring  # don't forget!
-#
-# In the degenerate case (one node), this is just
-#
-#  mkdir /tmp/foo
-#  mkcephfs -c ceph.conf -d /tmp/foo --prepare-monmap
-#  mkcephfs -d /tmp/foo --init-local-daemons mds
-#  mkcephfs -d /tmp/foo --init-local-daemons osd
-#  mkcephfs -d /tmp/foo --prepare-mon
-#  mkcephfs -d /tmp/foo --init-local-daemons mon
-#  cp /tmp/foo/keyring.admin /etc/ceph/keyring
-#
-# or simply
-#
-#  mkcephfs -a -c ceph.conf
-#
-
-set -e
-
-trap 'echo "\nWARNING: mkcephfs is now deprecated in favour of ceph-deploy. Please see: \n http://github.com/ceph/ceph-deploy"' EXIT
-
-# if we start up as ./mkcephfs, assume everything else is in the
-# current directory too.
-if [ `dirname $0` = "." ] && [ $PWD != "/etc/init.d" ]; then
-    BINDIR=.
-    LIBDIR=.
-    ETCDIR=.
-else
-    BINDIR=@bindir@
-    LIBDIR=@libdir@/ceph
-    ETCDIR=@sysconfdir@/ceph
-fi
-
-usage_exit() {
-    echo "usage: $0 -a -c ceph.conf [-k adminkeyring] [--mkfs]"
-    echo "   to generate a new ceph cluster on all nodes; for advanced usage see man page"
-    echo "   ** be careful, this WILL clobber old data; check your ceph.conf carefully **"
-    exit
-}
-
-. $LIBDIR/ceph_common.sh
-
-
-allhosts=0
-mkfs=0
-preparemonmap=0
-prepareosdfs=""
-initdaemon=""
-initdaemons=""
-preparemon=0
-
-numosd=
-useosdmap=
-usecrushmapsrc=
-usecrushmap=
-verbose=0
-adminkeyring=""
-conf=""
-dir=""
-moreargs=""
-auto_action=0
-manual_action=0
-nocopyconf=0
-
-while [ $# -ge 1 ]; do
-case $1 in
-    -v )
-           verbose=1;
-           ;;
-    --dir | -d)
-           [ -z "$2" ] && usage_exit
-           shift
-           dir=$1
-           ;;
-    --allhosts | -a)
-           allhosts=1
-            auto_action=1
-           ;;
-    --prepare-monmap)
-           preparemonmap=1
-            manual_action=1
-           ;;
-    --prepare-osdfs)
-           [ -z "$2" ] && usage_exit
-           shift
-           prepareosdfs=$1
-            manual_action=1
-           ;;
-    --init-daemon)
-           [ -z "$2" ] && usage_exit
-           shift
-           initdaemon=$1
-            manual_action=1
-           ;;
-    --init-local-daemons)
-           [ -z "$2" ] && usage_exit
-           shift
-           initlocaldaemons=$1
-            manual_action=1
-           ;;
-    --prepare-mon)
-           preparemon=1
-            manual_action=1
-           ;;
-    --mkbtrfs | --mkfs)
-           mkfs=1
-           ;;
-    --no-copy-conf)
-           nocopyconf=1
-           ;;
-    --conf | -c)
-           [ -z "$2" ] && usage_exit
-           shift
-           conf=$1
-           ;;
-    --numosd)
-           [ -z "$2" ] && usage_exit
-           shift
-           numosd=$1
-           moreargs="$moreargs --numosd $1"
-           ;;
-    --osdmap)
-           [ -z "$2" ] && usage_exit
-           shift
-           useosdmap=$1
-           moreargs="$moreargs --osdmap $1"
-           ;;
-    --crushmapsrc)
-           [ -z "$2" ] && usage_exit
-           shift
-           usecrushmapsrc=$1
-           moreargs="$moreargs --crushmapsrc $1"
-           ;;
-    --crushmap)
-           [ -z "$2" ] && usage_exit
-           shift
-           usecrushmap=$1
-           moreargs="$moreargs --crushmap $1"
-           ;;
-    -k)
-           [ -z "$2" ] && usage_exit
-           shift
-           adminkeyring=$1
-           ;;
-    *)
-           echo unrecognized option \'$1\'
-           usage_exit
-           ;;
-esac
-shift
-done
-
-
-[ -z "$conf" ] && [ -n "$dir" ] && conf="$dir/conf"
-
-if [ $manual_action -eq 0 ]; then
-    if [ $auto_action -eq 0 ]; then
-        echo "You must specify an action. See man page."
-        usage_exit
-    fi
-elif [ $auto_action -eq 1 ]; then
-    echo "The -a option cannot be combined with other subcommands; see man page."
-    usage_exit
-fi
-
-### prepare-monmap ###
-
-if [ $preparemonmap -eq 1 ]; then
-    echo "preparing monmap in $dir/monmap"
-
-    # first, make a list of monitors
-    mons=`$CCONF -c $conf -l mon | egrep -v '^mon$' | sort`
-    args=""
-
-    type="mon"
-    for name in $mons; do
-       id=`echo $name | cut -c 4- | sed 's/^\\.//'`
-       get_conf addr "" "mon addr"
-       if [ -z "$addr" ]; then
-           echo "$0: monitor $name has no address defined." 1>&2
-           exit 1
-       fi
-       args=$args" --add $id $addr"
-    done
-
-    if [ -z "$args" ]; then
-       echo "$0: no monitors found in config, aborting." 1>&2
-       exit 1
-    fi
-
-    # build monmap
-    monmap="$dir/monmap"
-    echo $BINDIR/monmaptool --create --clobber $args --print $monmap || exit 1
-    $BINDIR/monmaptool --create --clobber $args --print $monmap || exit 1
-        
-    # copy conf
-    cp $conf $dir/conf
-
-    exit 0
-fi
-
-
-### init-daemon ###
-
-if [ -n "$initdaemon" ]; then
-    name=$initdaemon
-    type=`echo $name | cut -c 1-3`   # e.g. 'mon', if $name is 'mon1'
-    id=`echo $name | cut -c 4- | sed 's/^\\.//'`
-    name="$type.$id"
-    
-    # create /var/run/ceph (or wherever pid file and/or admin socket live)
-    get_conf pid_file "/var/run/ceph/$name.pid" "pid file"
-    rundir=`dirname $pid_file`
-    if [ "$rundir" != "." ] && [ ! -d "$rundir" ]; then
-       mkdir -p $rundir
-    fi
-    get_conf asok_file "/var/run/ceph/$name.asok" "admin socket"
-    rundir=`dirname $asok_file`
-    if [ "$rundir" != "." ] && [ ! -d "$rundir" ]; then
-       mkdir -p $rundir
-    fi
-
-    if [ $type = "osd" ]; then
-       $BINDIR/ceph-osd -c $conf --monmap $dir/monmap -i $id --mkfs --mkkey
-
-       get_conf osd_data "/var/lib/ceph/osd/ceph-$id" "osd data"
-       get_conf osd_keyring "$osd_data/keyring" "keyring"
-       $BINDIR/ceph-authtool -p -n $name $osd_keyring > $dir/key.$name
-    fi
-    
-    if [ $type = "mds" ]; then
-       get_conf mds_data "/var/lib/ceph/mds/ceph-$id" "mds data"
-       get_conf mds_keyring "$mds_data/keyring" "keyring"
-       test -d $mds_data || mkdir -p $mds_data
-       echo "creating private key for $name keyring $mds_keyring"
-       $BINDIR/ceph-authtool --create-keyring --gen-key -n $name $mds_keyring
-       $BINDIR/ceph-authtool -p -n $name $mds_keyring > $dir/key.$name
-    fi
-
-    if [ $type = "mon" ]; then
-       get_conf mon_data "/var/lib/ceph/mon/ceph-$id" "mon data"
-       mkdir -p "$mon_data"
-       if ! find "$mon_data" -maxdepth 0 -empty | read foo; then
-           echo "ERROR: $name mon_data directory $mon_data is not empty."
-           echo "       Please make sure that it is empty before running mkcephfs."
-           exit 1
-       fi
-       $BINDIR/ceph-mon -c $conf --mkfs -i $id --monmap $dir/monmap --osdmap $dir/osdmap -k $dir/keyring.mon
-    fi
-    
-    exit 0
-fi
-
-
-## init-local-daemons ##
-
-if [ -n "$initlocaldaemons" ]; then
-    get_name_list "$initlocaldaemons"
-    for name in $what; do
-       type=`echo $name | cut -c 1-3`   # e.g. 'mon', if $name is 'mon1'
-       id=`echo $name | cut -c 4- | sed 's/^\\.//'`
-       num=$id
-       name="$type.$id"
-
-       check_host || continue
-
-       $0 -d $dir --init-daemon $name  
-    done
-    exit 0
-fi
-
-
-### prepare-osdfs ###
-
-if [ -n "$prepareosdfs" ]; then
-    name=$prepareosdfs
-    type=`echo $name | cut -c 1-3`   # e.g. 'mon', if $name is 'mon1'
-    id=`echo $name | cut -c 4- | sed 's/^\\.//'`
-    name="$type.$id"
-
-    get_conf osd_data "/var/lib/ceph/osd/ceph-$id" "osd data"
-    get_conf osd_journal "$osd_data/journal" "osd journal"
-    get_conf fs_path "$osd_data" "fs path"  # mount point defaults so osd data
-    get_conf fs_devs "" "devs"
-    get_conf fs_type "" "osd mkfs type"
-
-    if [ -z "$fs_devs" ]; then
-       # try to fallback to old keys
-        get_conf tmp_btrfs_devs "" "btrfs devs"
-        if [ -n "$tmp_btrfs_devs" ]; then
-            fs_devs="$tmp_btrfs_devs"
-        else
-            echo "no devs defined for $name"
-            exit 1
-        fi
-    fi
-    if [ -z "$fs_type" ]; then
-        # try to fallback to to old keys
-        get_conf tmp_devs "" "btrfs devs"
-        if [ -n "$tmp_devs" ]; then
-            fs_type="btrfs"
-        else
-            echo No filesystem type defined!
-            exit 1
-        fi
-    fi
-
-    first_dev=`echo $fs_devs | cut '-d ' -f 1`
-    get_conf fs_opt "" "osd mount options $fs_type"
-    if [ -z "$fs_opt" ]; then
-        if [ "$fs_type" = "btrfs" ]; then
-            #try to fallback to old keys
-            get_conf fs_opt "" "btrfs options"
-        fi
-        if [ -z "$fs_opt" ]; then
-           if [ "$fs_type" = "xfs" ]; then
-               fs_opt="rw,noatime,inode64"
-           else
-                #fallback to use at least rw,noatime
-               fs_opt="rw,noatime"
-           fi
-        fi
-    fi
-    [ -n "$fs_opt" ] && fs_opt="-o $fs_opt"
-    get_conf osd_user "root" "user"
-    
-    if [ -n "$osd_journal" ] && echo "fs_devs" | grep -q -w "$osd_journal" ; then
-        echo "ERROR: osd journal device ($osd_journal) also used by devs ($fs_devs)"
-       exit 1
-    fi
-    
-    test -d $osd_data || mkdir -p $osd_data
-
-    if [ -n "$osd_journal" ]; then
-       test -d $osd_journal || mkdir -p `dirname $osd_journal`
-    fi
-
-    umount $fs_path || true
-    for f in $fs_devs ; do
-       umount $f || true
-    done
-
-    get_conf mkfs_opt "" "osd mkfs options $fs_type"
-    if [ "$fs_type" = "xfs" ] && [ -z "$mkfs_opt" ]; then
-        echo Xfs filesystem found add missing -f mkfs option!
-       mkfs_opt="-f"
-    fi
-    modprobe $fs_type || true
-    mkfs.$fs_type $mkfs_opt $fs_devs
-    mount -t $fs_type $fs_opt $first_dev $fs_path
-    chown $osd_user $fs_path
-    chmod +w $fs_path
-
-    exit 0
-fi
-
-
-
-### prepare-mon ###
-
-if [ $preparemon -eq 1 ]; then
-
-    if [ -n "$useosdmap" ]; then
-       echo "Using osdmap $useosdmap"
-       cp $useosdmap $dir/osdmap
-    else
-       echo "Building generic osdmap from $conf"
-       $BINDIR/osdmaptool --create-from-conf $dir/osdmap -c $conf
-    fi
-
-    # import crush map?
-    get_conf crushmapsrc "" "crush map src" mon global
-    if [ -n "$crushmapsrc" ]; then
-       echo Compiling crush map from $crushmapsrc to $dir/crushmap
-       $BINDIR/crushtool -c $crushmapsrc -o $dir/crushmap
-    fi
-    get_conf crushmap "$usecrushmap" "crush map" mon global
-    if [ -n "$crushmap" ]; then
-       echo Importing crush map from $crushmap
-       $BINDIR/osdmaptool --import-crush $crushmap $dir/osdmap
-    fi
-
-    # admin keyring
-    echo Generating admin key at $dir/keyring.admin
-    $BINDIR/ceph-authtool --create-keyring --gen-key -n client.admin $dir/keyring.admin
-
-    # mon keyring
-    echo Building initial monitor keyring
-    cp $dir/keyring.admin $dir/keyring.mon
-    $BINDIR/ceph-authtool -n client.admin --set-uid=0 \
-       --cap mon 'allow *' \
-       --cap osd 'allow *' \
-       --cap mds 'allow' \
-       $dir/keyring.mon
-
-    $BINDIR/ceph-authtool --gen-key -n mon. $dir/keyring.mon --cap mon 'allow *'
-
-    for k in $dir/key.*
-    do
-       kname=`echo $k | sed 's/.*key\.//'`
-       ktype=`echo $kname | cut -c 1-3`
-       kid=`echo $kname | cut -c 4- | sed 's/^\\.//'`
-       kname="$ktype.$kid"
-       secret=`cat $k`
-       if [ "$ktype" = "osd" ]; then
-           $BINDIR/ceph-authtool -n $kname --add-key $secret $dir/keyring.mon \
-               --cap mon 'allow rwx' \
-               --cap osd 'allow *'
-       fi
-       if [ "$ktype" = "mds" ]; then
-           $BINDIR/ceph-authtool -n $kname --add-key $secret $dir/keyring.mon \
-               --cap mon "allow rwx" \
-               --cap osd 'allow *' \
-               --cap mds 'allow'
-       fi
-    done
-
-    exit 0
-fi
-
-
-
-
-
-### do everything via ssh ###
-
-if [ $allhosts -eq 1 ]; then
-
-    verify_conf
-
-    # do it all
-    if [ -z "$dir" ]; then
-       dir=`mktemp -d -t mkcephfs.XXXXXXXXXX` || exit 1
-       echo "temp dir is $dir"
-       trap "rm -rf $dir ; exit" INT TERM EXIT
-    fi
-
-    $0 --prepare-monmap -d $dir -c $conf
-
-    # osd, mds
-    get_name_list "osd mds"
-    for name in $what; do
-       type=`echo $name | cut -c 1-3`   # e.g. 'mon', if $name is 'mon1'
-       id=`echo $name | cut -c 4- | sed 's/^\\.//'`
-       num=$id
-       name="$type.$id"
-
-       check_host || continue
-
-       if [ -n "$ssh" ]; then
-           rdir=`mktemp -u /tmp/mkfs.ceph.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX` || exit 1
-           echo pushing conf and monmap to $host:$rdir
-           do_cmd "mkdir -p $rdir"
-           scp -q $dir/conf $host:$rdir
-           scp -q $dir/monmap $host:$rdir
-
-           if [ $nocopyconf -eq 0 ]; then
-               # also put conf at /etc/ceph/ceph.conf
-               scp -q $dir/conf $host:/etc/ceph/ceph.conf
-           fi
-       else
-           rdir=$dir
-
-           if [ $nocopyconf -eq 0 ]; then
-               # also put conf at /etc/ceph/ceph.conf
-               cp $dir/conf /etc/ceph/ceph.conf
-           fi
-       fi
-       
-       if [ $mkfs -eq 1 ] && [ "$type" = "osd" ]; then
-           do_root_cmd "$0 -d $rdir --prepare-osdfs $name"
-       fi
-
-       do_root_cmd "$0 -d $rdir --init-daemon $name"
-
-       # collect the key
-       if [ -n "$ssh" ]; then
-           echo collecting $name key
-           scp -q $host:$rdir/key.$name $dir
-           #cleanup no longer need rdir
-           do_cmd "rm -r $rdir"
-       fi
-    done
-
-    # prepare monitors
-    $0 -d $dir --prepare-mon $moreargs
-    
-    # mons
-    get_name_list "mon"
-    for name in $what; do
-       type=`echo $name | cut -c 1-3`   # e.g. 'mon', if $name is 'mon1'
-       id=`echo $name | cut -c 4- | sed 's/^\\.//'`
-       num=$id
-       name="$type.$id"
-
-       check_host || continue
-       
-       if [ -n "$ssh" ]; then
-           rdir=`mktemp -u /tmp/mkfs.ceph.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX` || exit 1
-           echo pushing everything to $host
-           ssh $host mkdir -p $rdir
-           scp -q $dir/* $host:$rdir
-
-           if [ $nocopyconf -eq 0 ]; then
-               # also put conf at /etc/ceph/ceph.conf
-               scp -q $dir/conf $host:/etc/ceph/ceph.conf
-           fi
-       else
-           rdir=$dir
-
-           if [ $nocopyconf -eq 0 ]; then
-               # also put conf at /etc/ceph/ceph.conf
-               cp $dir/conf /etc/ceph/ceph.conf
-           fi
-       fi
-       
-       do_root_cmd "$0 -d $rdir --init-daemon $name"
-
-       if [ -n "$ssh" ]; then
-           #cleanup no longer need rdir
-           do_cmd "rm -r $rdir"
-       fi
-    done
-
-    # admin keyring
-    if [ -z "$adminkeyring" ]; then
-       get_conf adminkeyring "/etc/ceph/keyring" "keyring" global
-    fi
-    echo "placing client.admin keyring in $adminkeyring"
-    cp $dir/keyring.admin $adminkeyring
-
-    exit 0
-fi
-
index 139a05cf216280280ace7343ee18a9ce530e346a..9039b0d554333473ddfdea81464e015104ac1efc 100644 (file)
     ;osd recovery max active      = 3
 
 
-    # You may add settings for mkcephfs so that it will create and mount
-    # the file system for you. Remove the comment `#` character for
+    # You may add settings for ceph-deploy so that it will create and mount
+    # the correct type of file system. Remove the comment `#` character for
     # the following settings and replace the values in parenthesis
     # with appropriate values, or leave the following settings commented
-    # out to accept the default values. You must specify the --mkfs
-    # option with mkcephfs in order for the deployment script to
-    # utilize the following settings, and you must define the 'devs'
-    # option for each osd instance; see below.
+    # out to accept the default values.
 
     #osd mkfs type = {fs-type}
     #osd mkfs options {fs-type}   = {mkfs options}   # default for xfs is "-f"
 ;[osd.0]
 ;    host                         = delta
 
-    # If 'devs' is not specified, you're responsible for
-    # setting up the 'osd data' dir (e.g. `mkdir /var/lib/ceph/osd/ceph-0`)
-    ;devs                         = /dev/sdx
-
 ;[osd.1]
 ;    host                         = epsilon
-;    devs                         = /dev/sdy
 
 ;[osd.2]
 ;    host                         = zeta
-;    devs                         = /dev/sdx
 
 ;[osd.3]
 ;    host                         = eta
-;    devs                         = /dev/sdy