Skip to content

Commit

Permalink
Merge branch 'master' into wip-midkraken-upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
jdurgin committed Apr 17, 2017
2 parents 2484df5 + b01bf48 commit 651a808
Show file tree
Hide file tree
Showing 230 changed files with 8,177 additions and 1,928 deletions.
3 changes: 2 additions & 1 deletion .organizationmap
Expand Up @@ -360,6 +360,7 @@ Red Hat <contact@redhat.com> Jenkins <jenkins@ceph.com>
Red Hat <contact@redhat.com> João Eduardo Luís <joao@redhat.com>
Red Hat <contact@redhat.com> John Spray <jspray@redhat.com>
Red Hat <contact@redhat.com> John Wilkins <jwilkins@redhat.com>
Red Hat <contact@redhat.com> Jos Collin <jcollin@redhat.com>
Red Hat <contact@redhat.com> Josh Durgin <jdurgin@redhat.com>
Red Hat <contact@redhat.com> JuanJose 'JJ' Galvez <jgalvez@redhat.com>
Red Hat <contact@redhat.com> Kefu Chai <kchai@redhat.com>
Expand Down Expand Up @@ -483,6 +484,7 @@ The Linux Box <contact@linuxbox.com> Casey Bodley <casey@linuxbox.com>
The Linux Box <contact@linuxbox.com> Matt Benjamin <matt@linuxbox.com>
The University of Arizona <contact@arizona.edu> James Ryan Cresawn <jrcresawn@gmail.com>
Time Warner Cable Inc. <contact@twcable.com> Bryan Stillwell <bryan.stillwell@twcable.com>
Trendy Tech <contact@trendytech.com.cn> shiqi <m13913886148@gmail.com>
Ubuntu Kylin <contact@ubuntukylin.com> Min Chen <minchen@ubuntukylin.com>
UMCloud <contact@umcloud.com> Jiaying Ren <mikulely@gmail.com>
UMCloud <contact@umcloud.com> Rongze Zhu <zrzhit@gmail.com>
Expand Down Expand Up @@ -638,7 +640,6 @@ Unaffiliated <no@organization.net> Shang Ding <dingshang2013@163.com>
Unaffiliated <no@organization.net> Shanggao Qiu <qiushanggao@qq.com>
Unaffiliated <no@organization.net> Shawn Chen <cxwshawn@gmail.com>
Unaffiliated <no@organization.net> Shawn Edwards <lesser.evil@gmail.com>
Unaffiliated <no@organization.net> shiqi <m13913886148@gmail.com>
Unaffiliated <no@organization.net> Simon Guinot <simon.guinot@sequanux.org>
Unaffiliated <no@organization.net> Stephen F Taylor <steveftaylor@gmail.com>
Unaffiliated <no@organization.net> Steve Stock <steve@technolope.org>
Expand Down
2 changes: 1 addition & 1 deletion admin/build-doc
Expand Up @@ -57,7 +57,7 @@ cd build-doc
[ -z "$vdir" ] && vdir="$TOPDIR/build-doc/virtualenv"

if [ ! -e $vdir ]; then
virtualenv --system-site-packages $vdir
virtualenv --system-site-packages $vdir -p python2
fi
$vdir/bin/pip install --quiet -r $TOPDIR/admin/doc-requirements.txt

Expand Down
3 changes: 3 additions & 0 deletions admin/serve-doc
@@ -1,4 +1,6 @@
#!/usr/bin/python
from __future__ import print_function

import SimpleHTTPServer
import SocketServer
import os
Expand All @@ -24,6 +26,7 @@ httpd = SocketServer.TCPServer(
ReusingTCPServer,
)
try:
print("Serving doc at port: http://localhost:8080")
httpd.serve_forever()
except KeyboardInterrupt:
pass
13 changes: 8 additions & 5 deletions cmake/modules/CTags.cmake
Expand Up @@ -12,13 +12,16 @@ function(add_tags name)
COMMAND git config --file .gitmodules --get-regexp path
COMMAND awk "/${TAGS_SRC_DIR}/ { print $2 }"
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
RESULT_VARIABLE result_code
OUTPUT_VARIABLE submodules
OUTPUT_STRIP_TRAILING_WHITESPACE)
string(REPLACE "${TAGS_SRC_DIR}/" "" submodules ${submodules})
# cmake list uses ";" as the delimiter, so split the string manually
# before iterating in it.
string(REPLACE "\n" ";" submodules ${submodules})
list(APPEND excludes ${submodules})
if(${result_code} EQUAL 0)
string(REPLACE "${TAGS_SRC_DIR}/" "" submodules ${submodules})
# cmake list uses ";" as the delimiter, so split the string manually
# before iterating in it.
string(REPLACE "\n" ";" submodules ${submodules})
list(APPEND excludes ${submodules})
endif()
endif()
message(STATUS "exclude following files under ${TAGS_SRC_DIR}: ${excludes}")
# add_custom_target() accepts a list after "COMMAND" keyword, so we should
Expand Down
6 changes: 6 additions & 0 deletions doc/cephfs/client-config-ref.rst
Expand Up @@ -147,6 +147,12 @@
:Type: Integer
:Default: ``131072`` (128KB)

``client_reconnect_stale``

:Description: Automatically reconnect stale session.
:Type: Boolean
:Default: ``false``

``client_snapdir``

:Description: Set the snapshot directory name.
Expand Down
3 changes: 2 additions & 1 deletion doc/cephfs/createfs.rst
Expand Up @@ -52,7 +52,8 @@ an *active* state. For example, in a single MDS system:
e5: 1/1/1 up {0=a=up:active}
Once the filesystem is created and the MDS is active, you are ready to mount
the filesystem:
the filesystem. If you have created more than one filesystem, you will
choose which to use when mounting.

- `Mount CephFS`_
- `Mount CephFS as FUSE`_
Expand Down
59 changes: 59 additions & 0 deletions doc/cephfs/disaster-recovery.rst
Expand Up @@ -216,3 +216,62 @@ Note that this command acts as a normal CephFS client to find all the
files in the filesystem and read their layouts, so the MDS must be
up and running.

Using an alternate metadata pool for recovery
---------------------------------------------

.. warning::

There has not been extensive testing of this procedure. It should be
undertaken with great care.

If an existing filesystem is damaged and inoperative, it is possible to create
a fresh metadata pool and attempt to reconstruct the filesystem metadata
into this new pool, leaving the old metadata in place. This could be used to
make a safer attempt at recovery since the existing metadata pool would not be
overwritten.

.. caution::

During this process, multiple metadata pools will contain data referring to
the same data pool. Extreme caution must be exercised to avoid changing the
data pool contents while this is the case. Once recovery is complete, the
damaged metadata pool should be deleted.

To begin this process, first create the fresh metadata pool and initialize
it with empty file system data structures:

::

ceph fs flag set enable_multiple true --yes-i-really-mean-it
ceph osd pool create recovery <pg-num> replicated <crush-ruleset-name>
ceph fs new recovery-fs recovery <data pool> --allow-dangerous-metadata-overlay
cephfs-data-scan init --force-init --filesystem recovery-fs --alternate-pool recovery
ceph fs reset recovery-fs --yes-i-realy-mean-it
cephfs-table-tool recovery-fs:all reset session
cephfs-table-tool recovery-fs:all reset snap
cephfs-table-tool recovery-fs:all reset inode

Next, run the recovery toolset using the --alternate-pool argument to output
results to the alternate pool:

::

cephfs-data-scan scan_extents --alternate-pool recovery --filesystem <original filesystem name>
cephfs-data-scan scan_inodes --alternate-pool recovery --filesystem <original filesystem name> --force-corrupt --force-init <original data pool name>

If the damaged filesystem contains dirty journal data, it may be recovered next
with:

::

cephfs-journal-tool --rank=<original filesystem name>:0 event recover_dentries list --alternate-pool recovery
cephfs-journal-tool --rank recovery-fs:0 journal reset --force

After recovery, some recovered directories will have incorrect link counts.
Ensure the parameter mds_debug_scatterstat is set to false (the default) to
prevent the MDS from checking the link counts, then run a forward scrub to
repair them. Ensure you have an MDS running and issue:

::

ceph daemon mds.a scrub_path / recursive repair
7 changes: 5 additions & 2 deletions doc/cephfs/fuse.rst
@@ -1,8 +1,7 @@
=========================
Mount Ceph FS as a FUSE
Mount Ceph FS using FUSE
=========================

For Ceph version 0.55 and later, ``cephx`` authentication is on by default.
Before mounting a Ceph File System in User Space (FUSE), ensure that the client
host has a copy of the Ceph configuration file and a keyring with CAPS for the
Ceph metadata server.
Expand Down Expand Up @@ -30,6 +29,10 @@ For example::
sudo mkdir /home/usernname/cephfs
sudo ceph-fuse -m 192.168.0.1:6789 /home/username/cephfs

If you have more than one filesystem, specify which one to mount using
the ``--client_mds_namespace`` command line argument, or add a
``client_mds_namespace`` setting to your ``ceph.conf``.

See `ceph-fuse`_ for additional details.

To automate mounting ceph-fuse, you may add an entry to the system fstab_.
Expand Down
3 changes: 3 additions & 0 deletions doc/cephfs/kernel.rst
Expand Up @@ -19,6 +19,9 @@ approach reads the secret from a file. For example::

sudo mount -t ceph 192.168.0.1:6789:/ /mnt/mycephfs -o name=admin,secretfile=/etc/ceph/admin.secret
If you have more than one filesystem, specify which one to mount using
the ``mds_namespace`` option, e.g. ``-o mds_namespace=myfs``.

See `User Management`_ for details on cephx.

To unmount the Ceph file system, you may use the ``umount`` command. For example::
Expand Down

0 comments on commit 651a808

Please sign in to comment.