5 Adding and removing Ceph OSD Daemons to your cluster may involve a few more
6 steps when compared to adding and removing other Ceph daemons. Ceph OSD Daemons
7 write data to the disk and to journals. So you need to provide a disk for the
8 OSD and a path to the journal partition (i.e., this is the most common
9 configuration, but you may configure your system to your own needs).
11 In Ceph v0.60 and later releases, Ceph supports ``dm-crypt`` on disk encryption.
12 You may specify the ``--dmcrypt`` argument when preparing an OSD to tell
13 ``ceph-deploy`` that you want to use encryption. You may also specify the
14 ``--dmcrypt-key-dir`` argument to specify the location of ``dm-crypt``
17 You should test various drive configurations to gauge their throughput before
18 before building out a large cluster. See `Data Storage`_ for additional details.
24 To list the disks on a node, execute the following command::
26 ceph-deploy disk list {node-name [node-name]...}
32 To zap a disk (delete its partition table) in preparation for use with Ceph,
33 execute the following::
35 ceph-deploy disk zap {osd-server-name}:{disk-name}
36 ceph-deploy disk zap osdserver1:sdb
38 .. important:: This will delete all data.
44 Once you create a cluster, install Ceph packages, and gather keys, you
45 may prepare the OSDs and deploy them to the OSD node(s). If you need to
46 identify a disk or zap it prior to preparing it for use as an OSD,
47 see `List Disks`_ and `Zap Disks`_. ::
49 ceph-deploy osd prepare {node-name}:{data-disk}[:{journal-disk}]
50 ceph-deploy osd prepare osdserver1:sdb:/dev/ssd
51 ceph-deploy osd prepare osdserver1:sdc:/dev/ssd
53 The ``prepare`` command only prepares the OSD. On most operating
54 systems, the ``activate`` phase will automatically run when the
55 partitions are created on the disk (using Ceph ``udev`` rules). If not
56 use the ``activate`` command. See `Activate OSDs`_ for
59 The foregoing example assumes a disk dedicated to one Ceph OSD Daemon, and
60 a path to an SSD journal partition. We recommend storing the journal on
61 a separate drive to maximize throughput. You may dedicate a single drive
62 for the journal too (which may be expensive) or place the journal on the
63 same disk as the OSD (not recommended as it impairs performance). In the
64 foregoing example we store the journal on a partitioned solid state drive.
66 You can use the settings --fs-type or --bluestore to choose which file system
67 you want to install in the OSD drive. (More information by running
68 'ceph-deploy osd prepare --help').
70 .. note:: When running multiple Ceph OSD daemons on a single node, and
71 sharing a partioned journal with each OSD daemon, you should consider
72 the entire node the minimum failure domain for CRUSH purposes, because
73 if the SSD drive fails, all of the Ceph OSD daemons that journal to it
80 Once you prepare an OSD you may activate it with the following command. ::
82 ceph-deploy osd activate {node-name}:{data-disk-partition}[:{journal-disk-partition}]
83 ceph-deploy osd activate osdserver1:/dev/sdb1:/dev/ssd1
84 ceph-deploy osd activate osdserver1:/dev/sdc1:/dev/ssd2
86 The ``activate`` command will cause your OSD to come ``up`` and be placed
87 ``in`` the cluster. The ``activate`` command uses the path to the partition
88 created when running the ``prepare`` command.
94 You may prepare OSDs, deploy them to the OSD node(s) and activate them in one
95 step with the ``create`` command. The ``create`` command is a convenience method
96 for executing the ``prepare`` and ``activate`` command sequentially. ::
98 ceph-deploy osd create {node-name}:{disk}[:{path/to/journal}]
99 ceph-deploy osd create osdserver1:sdb:/dev/ssd1
104 .. To list the OSDs deployed on a node(s), execute the following command::
106 .. ceph-deploy osd list {node-name}
112 .. note:: Coming soon. See `Remove OSDs`_ for manual procedures.
114 .. To destroy an OSD, execute the following command::
116 .. ceph-deploy osd destroy {node-name}:{path-to-disk}[:{path/to/journal}]
118 .. Destroying an OSD will take it ``down`` and ``out`` of the cluster.
120 .. _Data Storage: ../../../start/hardware-recommendations#data-storage
121 .. _Remove OSDs: ../../operations/add-or-rm-osds#removing-osds-manual