summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo Zhang <nguzcf@gmail.com>2017-05-24 09:46:40 +0200
committerLeo Zhang <nguzcf@gmail.com>2017-05-24 19:51:36 +0200
commit06018fa79176e62f5dd7837a2ebe62081c36266b (patch)
tree3d857e3c82cce07422bd8196ebbdac7787f026be
parentMerge pull request #15206 from ifed01/wip-fix-rbd-bench (diff)
downloadceph-06018fa79176e62f5dd7837a2ebe62081c36266b.tar.xz
ceph-06018fa79176e62f5dd7837a2ebe62081c36266b.zip
build: remove ceph-disk-udev entirely
Signed-off-by: Leo Zhang <nguzcf@gmail.com>
-rw-r--r--alpine/APKBUILD.in2
-rw-r--r--ceph.spec.in1
-rw-r--r--debian/ceph-osd.install1
-rw-r--r--src/CMakeLists.txt1
-rwxr-xr-xsrc/ceph-disk-udev85
5 files changed, 1 insertions, 89 deletions
diff --git a/alpine/APKBUILD.in b/alpine/APKBUILD.in
index 1a2ff4e0d86..f1ab9aa27d6 100644
--- a/alpine/APKBUILD.in
+++ b/alpine/APKBUILD.in
@@ -301,7 +301,7 @@ osd() {
depends="ceph-base parted gptfdisk"
_pkg $_bindir ceph-clsinfo ceph-bluefs-tool ceph-objectstore-tool ceph-osd
- _pkg $_sbindir ceph-disk ceph-disk-udev
+ _pkg $_sbindir ceph-disk
_pkg $_libexecdir/ceph ceph-osd-prestart.sh
_pkg $_udevrulesdir 60-ceph-by-parttypeuuid.rules 95-ceph-osd.rules
install -m 750 -o $_ceph_uid -g $_ceph_gid -d \
diff --git a/ceph.spec.in b/ceph.spec.in
index 30831c11c30..48e53454c58 100644
--- a/ceph.spec.in
+++ b/ceph.spec.in
@@ -1390,7 +1390,6 @@ fi
%{_bindir}/ceph-objectstore-tool
%{_bindir}/ceph-osd
%{_sbindir}/ceph-disk
-%{_sbindir}/ceph-disk-udev
%{_libexecdir}/ceph/ceph-osd-prestart.sh
%dir %{_udevrulesdir}
%{_udevrulesdir}/60-ceph-by-parttypeuuid.rules
diff --git a/debian/ceph-osd.install b/debian/ceph-osd.install
index 9f520ec4769..b1532d5e98d 100644
--- a/debian/ceph-osd.install
+++ b/debian/ceph-osd.install
@@ -1,7 +1,6 @@
lib/udev/rules.d/95-ceph-osd.rules
lib/udev/rules.d/60-ceph-by-parttypeuuid.rules
usr/sbin/ceph-disk
-usr/sbin/ceph-disk-udev
usr/bin/ceph-clsinfo
usr/bin/ceph-objectstore-tool
usr/bin/ceph-bluestore-tool
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index ad658e722b5..7f19ddab939 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -944,7 +944,6 @@ install(PROGRAMS
install(PROGRAMS
${CMAKE_SOURCE_DIR}/src/ceph-create-keys
# ${CMAKE_SOURCE_DIR}/src/ceph-disk
- ${CMAKE_SOURCE_DIR}/src/ceph-disk-udev
DESTINATION sbin)
add_subdirectory(bash_completion)
diff --git a/src/ceph-disk-udev b/src/ceph-disk-udev
deleted file mode 100755
index 8846d26030e..00000000000
--- a/src/ceph-disk-udev
+++ /dev/null
@@ -1,85 +0,0 @@
-#! /bin/sh
-
-# Wrapper for the ceph udev rules. Since older versions of udev+blkid
-# do not support gpt label fields, this shell script is invoked from
-# the udev rule to read the needed gpt label fields and call the
-# appropriate ceph OSD functions.
-
-PARTNO=$1
-NAME=$2
-PARENT_NAME=$3
-
-# Get GPT partition type guid
-ID_PART_ENTRY_TYPE=$(/usr/sbin/sgdisk --info=${PARTNO} /dev/${PARENT_NAME} | grep "Partition GUID code" | awk '{print $4}' | tr '[:upper:]' '[:lower:]')
-
-if [ -z "$ID_PART_ENTRY_TYPE" ]; then
- exit
-fi
-
-ID_PART_ENTRY_UUID=$(/usr/sbin/sgdisk --info=${PARTNO} /dev/${PARENT_NAME} | grep "Partition unique GUID" | awk '{print $4}' | tr '[:upper:]' '[:lower:]')
-
-# set up the symlinks
-mkdir -p /dev/disk/by-partuuid
-ln -sf ../../${NAME} /dev/disk/by-partuuid/$ID_PART_ENTRY_UUID
-mkdir -p /dev/disk/by-parttypeuuid
-ln -sf ../../${NAME} /dev/disk/by-parttypeuuid/${ID_PART_ENTRY_TYPE}.${ID_PART_ENTRY_UUID}
-
-case $ID_PART_ENTRY_TYPE in
-
-45b0969e-9b03-4f30-b4c6-b4b80ceff106)
- # JOURNAL_UUID
- # activate ceph-tagged journal partitions.
- /usr/sbin/ceph-disk -v activate-journal /dev/${NAME}
- ;;
-
-45b0969e-9b03-4f30-b4c6-5ec00ceff106)
- # DMCRYPT_JOURNAL_UUID
- # Map journal if using dm-crypt
- /sbin/cryptsetup --key-file /etc/ceph/dmcrypt-keys/${ID_PART_ENTRY_UUID} --key-size 256 create ${ID_PART_ENTRY_UUID} /dev/${NAME}
- ;;
-
-45b0969e-9b03-4f30-b4c6-35865ceff106)
- # DMCRYPT_LUKS_JOURNAL_UUID
- # Map journal if using dm-crypt
- /sbin/cryptsetup --key-file /etc/ceph/dmcrypt-keys/${ID_PART_ENTRY_UUID} luksOpen /dev/${NAME} ${ID_PART_ENTRY_UUID}
- ;;
-
-4fbd7e29-9d25-41b8-afd0-062c0ceff05d)
- # OSD_UUID
- # activate ceph-tagged partitions.
- /usr/sbin/ceph-disk -v activate /dev/${NAME}
- ;;
-
-4fbd7e29-9d25-41b8-afd0-5ec00ceff05d)
- # DMCRYPT_OSD_UUID
- # Map data device and activate ceph-tagged partitions
- # for dm-crypted data devices
- /sbin/cryptsetup --key-file /etc/ceph/dmcrypt-keys/${ID_PART_ENTRY_UUID} --key-size 256 create ${ID_PART_ENTRY_UUID} /dev/${NAME}
- bash -c 'while [ ! -e /dev/mapper/${ID_PART_ENTRY_UUID} ];do sleep 1; done'
- /usr/sbin/ceph-disk activate /dev/mapper/${ID_PART_ENTRY_UUID}
- ;;
-
-4fbd7e29-9d25-41b8-afd0-35865ceff05d)
- # DMCRYPT_LUKS_OSD_UUID
- # Map data device and activate ceph-tagged partitions
- # for dm-crypted data devices
- /sbin/cryptsetup --key-file /etc/ceph/dmcrypt-keys/${ID_PART_ENTRY_UUID} luksOpen /dev/${NAME} ${ID_PART_ENTRY_UUID}
- bash -c 'while [ ! -e /dev/mapper/${ID_PART_ENTRY_UUID} ];do sleep 1; done'
- /usr/sbin/ceph-disk activate /dev/mapper/${ID_PART_ENTRY_UUID}
- ;;
-
-89c57f98-2fe5-4dc0-89c1-f3ad0ceff2be)
- # TOBE_UUID
- ;;
-
-89c57f98-2fe5-4dc0-89c1-5ec00ceff2be)
- # DMCRYPT_TOBE_UUID
- ;;
-
-*)
- # Not a Ceph device
- ;;
-
-esac
-
-exit