Libro sobre Proxmox maestria
Chapter 7
Before we create OSDs, we need to know the drives available in the nodes and the drive names. The following command format will give us a list of drives for a node in the cluster:
Using the following command format we can get a disk list from the Ceph OSD node: cephadmin@ceph-mon-01:-/pmxceph$ ceph-deploy disk list ceph-osd-01
The following is the information displayed after the disk list command is executed:
[ceph_deploy.cli] [INFO ] Invoked (1.4.0): /usr/bin/ceph-deploy disk
[ceph-osd-01] [DEBUG] connected to host: ceph-osd-01
[ceph-osd-01][DEBUG ] detect platform information from remote host
[ceph-osd-01][DEBUG ] detect machine type
[ceph_deploy.osd] [INFO ] Distro info: Ubuntu 12.04 precise
[ceph_deploy.osd] [DEBUG] Listing disks on ceph-osd-01...
[ceph-osd-01] [INFO ] Running command: sudo ceph-disk list
[ceph-osd-01] [DEBUG ] /dev/sda :
[ceph-osd-01] [DEBUG]
/dev/sdal other, ext2, mounted on /boot /dev/sda2 other
/dev/sda5 other, LVM2_member
[ceph-osd-01][DEBUG ] /dev/vda other, unknown
We can see from the previous information that the drives/dev/vda and /dev/vdb are the HDDs we are going to use to create OSDs on the ceph-osd-01 node. First, we need to format the drive using the following commands:
# ceph-deploy disk zap ceph-osd-01: /dev/vda
This will erase all the data on the drives and have them ready to accept the OSD daemon. Now we will create the OSD with a single command per OSD. For our four OSDs in this cluster, we are going to run the following four commands:
# ceph-deploy osd create ceph-osd-01: /dev/vda
# ceph-deploy osd create ceph-osd-01: /dev/vdb
# ceph-deploy osd create ceph-osd-02: /dev/vda # ceph-deploy osd create ceph-osd-02: /dev/vdb