Skip to content

Instantly share code, notes, and snippets.

@joelio
Created September 16, 2013 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joelio/01d017e0c8d49a6b4c20 to your computer and use it in GitHub Desktop.
Save joelio/01d017e0c8d49a6b4c20 to your computer and use it in GitHub Desktop.
The script reads fro CWD, so keep best to start from known clean.
#ceph-deploy -v new vm-ds-0{1,2,3}
This creates the new initial monitor members and bootstraps the config
#ceph-deploy -v mon create vm-ds-0{1,2,3}
This puts on the monitor keyrings etc - creates the initial monitor map
{wait for a minute or two, keys get generated so needs some entropy}
#ceph-deploy -v gatherkeys vm-ds-01
Now you should be able to run
#ceph -s
It should return something about the cluster health (proably WARN as there are no OSDs yet).. this is good. If you get an auth error, see me.
Now to install the OSDs. This step creates a GPT labeled disk and one XFS partition per disk. Disks used are /dev/sd{b,c,d,e,f,g}
for n in 1 2 3 4 5 6
do
ceph-deploy -v osd create --zap-disk vm-ds-0$n:/dev/sdb vm-ds-0$n:/dev/sdc vm-ds-0$n:/dev/sdd vm-ds-0$n:/dev/sde vm-ds-0$n:/dev/sdf vm-ds-0$n:/dev/sdg
done
This takes a while.. got for a brew
When done, you should see something like
#ceph -s
root@vm-ds-01:~# ceph -s
health HEALTH_OK
monmap e1: 3 mons at {vm-ds-01=192.168.2.1:6789/0,vm-ds-02=192.168.2.2:6789/0,vm-ds-03=192.168.2.3:6789/0}, election epoch 16, quorum 0,1,2 vm-ds-01,vm-ds-02,vm-ds-03
osdmap e2787: 36 osds: 36 up, 36 in
pgmap v325238: 1392 pgs: 1392 active+clean; 73940 MB data, 221 GB used, 66778 GB / 66999 GB avail; 0B/s rd, 144KB/s wr, 44op/s
mdsmap e1: 0/0/1 up
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment