Skip to content

Commit

Permalink
udev: trigger ceph-disk-activate directly from udev
Browse files Browse the repository at this point in the history
There is no need to depend on upstart for this.

Signed-off-by: Sage Weil <[email protected]>
  • Loading branch information
Sage Weil committed Feb 14, 2013
1 parent d1904b2 commit 5bd85ee
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 13 deletions.
3 changes: 2 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ EXTRA_DIST += \
src/test/run-cli-tests-maybe-unset-ccache \
src/test/cli \
src/test/downloads \
udev/50-rbd.rules
udev/50-rbd.rules \
udev/95-ceph-osd.rules


all-local:
Expand Down
2 changes: 2 additions & 0 deletions ceph.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/ceph/

# udev rules
install -D -m 644 udev/50-rbd.rules $RPM_BUILD_ROOT/lib/udev/rules.d/50-rbd.rules
install -D -m 644 udev/95-ceph-osd.rules $RPM_BUILD_ROOT/lib/udev/rules.d/95-ceph-osd.rules

%clean
rm -rf $RPM_BUILD_ROOT
Expand Down Expand Up @@ -397,6 +398,7 @@ fi
/sbin/ceph-disk-activate
/sbin/ceph-disk-prepare
/sbin/ceph-create-keys
/lib/udev/rules.d/95-ceph-osd.rules

#################################################################################
%files fuse
Expand Down
1 change: 1 addition & 0 deletions debian/ceph.install
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ usr/share/man/man8/monmaptool.8
usr/share/man/man8/ceph-clsinfo.8
usr/share/man/man8/ceph-debugpack.8
etc/bash_completion.d/ceph
lib/udev/rules.d/95-ceph-osd.rules
1 change: 1 addition & 0 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ install: build
$(MAKE) DESTDIR=$(DESTDIR) install
sed -i "/dependency_libs/ s/'.*'/''/" `find . -name '*.la'`
install -D -m 644 udev/50-rbd.rules $(DESTDIR)/lib/udev/rules.d/50-rbd.rules
install -D -m 644 udev/95-ceph-osd.rules $(DESTDIR)/lib/udev/rules.d/95-ceph-osd.rules

# Add here commands to install the package into debian/testpack.
# Build architecture-independent files here.
Expand Down
1 change: 0 additions & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -1115,7 +1115,6 @@ EXTRA_DIST += \
$(srcdir)/upstart/ceph-osd.conf \
$(srcdir)/upstart/ceph-osd-all.conf \
$(srcdir)/upstart/ceph-osd-all-starter.conf \
$(srcdir)/upstart/ceph-osd-activate.conf \
$(srcdir)/upstart/ceph-mds.conf \
$(srcdir)/upstart/ceph-mds-all.conf \
$(srcdir)/upstart/ceph-mds-all-starter.conf \
Expand Down
11 changes: 0 additions & 11 deletions src/upstart/ceph-osd-activate.conf

This file was deleted.

5 changes: 5 additions & 0 deletions udev/95-ceph-osd.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# activate ceph-tagged partitions
ACTION=="add", SUBSYSTEM=="block", \
ENV{DEVTYPE}=="partition", \
ENV{ID_PART_ENTRY_TYPE}=="4fbd7e29-9d25-41b8-afd0-062c0ceff05d", \
RUN+="/usr/sbin/ceph-disk-activate --mount /dev/$name"

0 comments on commit 5bd85ee

Please sign in to comment.