summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-06-17 15:43:40 -0700
committerSage Weil <sage@inktank.com>2013-06-17 15:47:39 -0700
commitaa8834831dbfcdebb96841686e3707e552c349f6 (patch)
tree345f59de5a1ac23fa06cb5aa3687b9b6dd50ba9e
parent261964adc5a7efe7c0efac2d527bc10a95498e45 (diff)
downloadceph-aa8834831dbfcdebb96841686e3707e552c349f6.tar.gz
ceph-disk: add some notes on wth we are up to
Signed-off-by: Sage Weil <sage@inktank.com> (cherry picked from commit 8c6b24e9039079e897108f28d6af58cbc703a15a)
-rwxr-xr-xsrc/ceph-disk42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/ceph-disk b/src/ceph-disk
index 3f15a9a1d22..bd7e6206ae8 100755
--- a/src/ceph-disk
+++ b/src/ceph-disk
@@ -14,6 +14,48 @@ import tempfile
import uuid
import lockfile
+"""
+Prepare:
+ - create GPT partition
+ - mark the partition with the ceph type uuid
+ - create a file system
+ - mark the fs as ready for ceph consumption
+ - entire data disk is used (one big partition)
+ - a new partition is added to the journal disk (so it can be easily shared)
+
+ - triggered by administrator or ceph-deploy, e.g. 'ceph-disk <data disk> [journal disk]
+
+Activate:
+ - mount the volume in a temp loation
+ - allocate an osd id (if needed)
+ - remount in the correct location /var/lib/ceph/osd/$cluster-$id
+ - start ceph-osd
+
+ - triggered by udev when it sees the OSD gpt partition type
+ - triggered by admin 'ceph-disk activate <path>'
+ - triggered on ceph service startup with 'ceph-disk activate-all'
+
+We rely on /dev/disk/by-partuuid to find partitions by their UUID;
+this is what the journal symlink inside the osd data volume normally
+points to.
+
+activate-all relies on /dev/disk/by-parttype-uuid/$typeuuid.$uuid to
+find all partitions. We install special udev rules to create these
+links.
+
+udev triggers 'ceph-disk activate <dev>' or 'ceph-disk
+activate-journal <dev>' based on the partition type.
+
+On old distros (e.g., RHEL6), the blkid installed does not recognized
+GPT partition metadata and the /dev/disk/by-partuuid etc. links aren't
+present. We have a horrible hack in the form of ceph-disk-udev that
+parses gparted output to create the symlinks above and triggers the
+'ceph-disk activate' etc commands that udev normally would do if it
+knew the GPT partition type.
+
+"""
+
+
CEPH_OSD_ONDISK_MAGIC = 'ceph osd volume v026'
JOURNAL_UUID = '45b0969e-9b03-4f30-b4c6-b4b80ceff106'