Ceph is a distributed object, block, and file storage platform
Go to file
Loic Dachary 9dce05a8cd ceph-disk: use blkid instead of sgdisk -i
sgdisk -i 1 /dev/vdb opens /dev/vdb in write mode which indirectly
triggers a BLKRRPART ioctl from udev (starting version 214 and up) when
the device is closed (see below for the udev release note). The
implementation of this ioctl by the kernel (even old kernels) removes
all partitions and adds them again (similar to what partprobe does
explicitly).

The side effects of partitions disappearing while ceph-disk is running
are devastating.

sgdisk is replaced by blkid which only opens the device in read mode and
will not trigger this unexpected behavior.

The problem does not show on Ubuntu 14.04 because it is running udev <
214 but shows on CentOS 7 which is running udev > 214.

git clone git://anonscm.debian.org/pkg-systemd/systemd.git
systemd/NEWS:
CHANGES WITH 214:

        * As an experimental feature, udev now tries to lock the
          disk device node (flock(LOCK_SH|LOCK_NB)) while it
          executes events for the disk or any of its partitions.
          Applications like partitioning programs can lock the
          disk device node (flock(LOCK_EX)) and claim temporary
          device ownership that way; udev will entirely skip all event
          handling for this disk and its partitions. If the disk
          was opened for writing, the close will trigger a partition
          table rescan in udev's "watch" facility, and if needed
          synthesize "change" events for the disk and all its partitions.
          This is now unconditionally enabled, and if it turns out to
          cause major problems, we might turn it on only for specific
          devices, or might need to disable it entirely. Device Mapper
          devices are excluded from this logic.

http://tracker.ceph.com/issues/14094 Fixes: #14094

Signed-off-by: Ilya Dryomov <idryomov@redhat.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
2015-12-21 11:37:37 +01:00
admin pybind: convert librbd bindings to Cython 2015-12-02 00:41:17 +09:00
bin make_dist.sh: rename from bin/make_dist_tarball.sh 2015-05-31 17:58:49 -04:00
ceph-erasure-code-corpus@b0d1137d31 tests: ceph-erasure-code-corpus must test SIMD variants 2015-09-03 20:55:35 +02:00
ceph-object-corpus@67383cc060 ceph-object-corpus: remove hammer foo and bar coll_t's 2015-08-27 13:29:07 -04:00
cmake/modules cmake: add nss as a suffix for pk11pub.h 2015-11-12 09:12:17 -08:00
debian Merge remote-tracking branch 'gh/jewel' 2015-12-16 10:48:15 -05:00
doc doc/release-notes: v10.0.1 2015-12-16 13:03:45 -05:00
etc etc/sysconfig/ceph: add CEPH_AUTO_RESTART_ON_UPGRADE 2015-10-06 15:18:46 +02:00
examples Fix Makefile in example/librados file. 2015-10-19 23:53:27 -07:00
fusetrace
keys new release key 2015-09-17 12:28:25 -04:00
m4
man add rbd-nbd doc 2015-11-21 23:26:44 +08:00
qa tests: ceph-disk workunit increase verbosity 2015-12-21 11:31:25 +01:00
rpm
selinux selinux: Fix man page location 2015-10-06 18:08:15 +02:00
share CodingStyle: Fix coding-style on PG related Monitor files 2015-12-10 00:11:47 +01:00
src ceph-disk: use blkid instead of sgdisk -i 2015-12-21 11:37:37 +01:00
systemd build/ops: systemd ceph-disk unit must not assume /bin/flock 2015-12-04 21:11:09 +01:00
udev ceph-disk: fix typos in udev rules 2015-09-22 08:46:56 +02:00
.gitignore tests: ignore test-suite.log 2015-11-14 17:57:23 +01:00
.gitmodule_mirrors remove libs3 submodule 2015-07-30 13:24:00 -04:00
.gitmodules remove libs3 submodule 2015-07-30 13:24:00 -04:00
.mailmap mailmap: Zeqiang Zhuang affiliation 2015-12-11 13:10:41 +05:30
.organizationmap mailmap: YankunLi affiliation 2015-12-11 13:12:01 +05:30
.peoplemap mailmap: Jenkins affiliation 2015-11-23 23:13:48 +01:00
AUTHORS
autogen.sh rocksdb: build rocksdb with its own Makefile 2015-10-17 15:56:18 -04:00
ceph.spec.in Merge remote-tracking branch 'gh/jewel' 2015-12-16 10:48:15 -05:00
ChangeLog
CMakeLists.txt signal_handler: added support for using reentrant strsignal() implementations vs. sys_siglist[] 2015-12-09 13:08:59 -05:00
CodingStyle CodingStyle: fix broken URLs 2015-11-30 21:12:37 +08:00
configure.ac Merge remote-tracking branch 'gh/jewel' 2015-12-16 10:48:15 -05:00
CONTRIBUTING.rst
COPYING SIGPIPE suppression for platforms without SO_NOSIGPIPE or MSG_NOSIGNAL 2015-11-13 08:18:35 -08:00
COPYING-GPL2
COPYING-LGPL2.1
do_autogen.sh tools: fix do_autogen.sh -R 2015-09-02 16:03:15 +02:00
doc_deps.deb.txt
Doxyfile
INSTALL doc: INSTALL redirect to online documentation 2015-12-01 14:44:02 +01:00
install-deps.sh build/ops: enable CR in CentOS 7 2015-12-08 08:25:24 +01:00
make_dist.sh make_dist.sh: bz2 only 2015-06-01 11:20:03 -07:00
make-debs.sh remove rest-bench 2015-07-30 13:21:36 -04:00
Makefile.am tests: restore run-cli-tests 2015-11-13 17:44:15 +01:00
NEWS
PendingReleaseNotes mon/PGMonitor: remove map_pg_creates, send_pg_creates commands 2015-11-23 08:38:50 -05:00
pom.xml
README
README.aix aix shared library build 2015-11-25 18:30:31 -05:00
README.cmake
README.md README.md: Add basic CMake instructions 2015-09-03 11:37:30 -04:00
README.solaris aix gcc librados port 2015-11-23 00:03:16 -05:00
README.xio
run-cmake-check.sh cmake: no need to run configure from run-cmake-check.sh 2015-12-17 14:03:15 +01:00
run-make-check.sh make-check: support MAKEOPTS overrides. 2015-08-24 03:38:27 +00:00
SubmittingPatches SubmittingPatches: there is no next; only jewel 2015-12-05 17:20:50 +01:00

============================================ Ceph - a scalable distributed storage system

Please see http://ceph.com/ for current info.

Contributing Code

Most of Ceph is licensed under the LGPL version 2.1. Some miscellaneous code is under BSD-style license or is public domain. The documentation is licensed under Creative Commons Attribution-ShareAlike (CC BY-SA). There are a handful of headers included here that are licensed under the GPL. Please see the file COPYING for a full inventory of licenses by file.

Code contributions must include a valid "Signed-off-by" acknowledging the license for the modified or contributed file. Please see the file SubmittingPatches for details on what that means and on how to generate and submit patches.

We do not require assignment of copyright to contribute code; code is contributed under the terms of the applicable license.

Build Prerequisites

The list of Debian or RPM packages dependencies can be installed with:

./install-deps.sh

Note: libsnappy-dev and libleveldb-dev are not available upstream for Debian Squeeze. Backports for Ceph can be found at ceph.com/debian-leveldb.

Building Ceph

Autotools

Developers, please refer to the Developer Guide for more information, otherwise, you can build the server daemons, and FUSE client, by executing the following:

./autogen.sh
./configure
make

(Note that the FUSE client will only be built if libfuse is present.)

CMake

Prerequisite: CMake 2.8.11

Build instructions:

mkdir build
cd build
cmake [options] /path/to/ceph/src/dir
make

(Note that /path/to/ceph/src/dir can be in the tree and out of the tree)

Dependencies

The configure script will complain about any missing dependencies as it goes. You can also refer to debian/control or ceph.spec.in for the package build dependencies on those platforms. In many cases, dependencies can be avoided with --with-foo or --without-bar switches. For example,

./configure --with-nss         # use libnss instead of libcrypto++
./configure --without-radosgw  # do not build radosgw
./configure --without-tcmalloc # avoid google-perftools dependency

Building packages

You can build packages for Debian or Debian-derived (e.g., Ubuntu) systems with

sudo apt-get install dpkg-dev
dpkg-checkbuilddeps        # make sure we have all dependencies
dpkg-buildpackage

For RPM-based systems (Red Hat, SUSE, etc.),

rpmbuild

Building the Documentation

Prerequisites

The list of package dependencies for building the documentation can be found in doc_deps.deb.txt:

sudo apt-get install `cat doc_deps.deb.txt`

Building the Documentation

To build the documentation, ensure that you are in the top-level `/ceph directory, and execute the build script. For example:

admin/build-doc