6 - name: stop ceph-osd@2 daemon
11 - name: stop ceph-osd@0 daemon
22 command: "ceph --cluster {{ cluster }} osd destroy osd.2 --yes-i-really-mean-it"
25 command: "ceph --cluster {{ cluster }} osd destroy osd.0 --yes-i-really-mean-it"
34 command: "ceph-volume --cluster {{ cluster }} lvm zap /dev/sdd1 --destroy"
38 - name: redeploy osd.2 using /dev/sdd1
39 command: "ceph-volume --cluster {{ cluster }} lvm create --bluestore --data /dev/sdd1 --osd-id 2"
43 # osd.0 device (zap without --destroy that removes the LV)
44 - name: zap test_group/data-lv1
45 command: "ceph-volume --cluster {{ cluster }} lvm zap test_group/data-lv1"
49 - name: prepare osd.0 again using test_group/data-lv1
50 command: "ceph-volume --cluster {{ cluster }} lvm prepare --bluestore --data test_group/data-lv1 --osd-id 0"
54 - name: activate all to start the previously prepared osd.0
55 command: "ceph-volume lvm activate --all"
60 command: "ceph-volume lvm list"
64 - name: create temporary directory
70 - name: create a 5GB sparse file
71 command: fallocate -l 5G {{ tmpdir.path }}/sparse.file
73 - name: find an empty loop device
75 register: losetup_list
77 - name: setup loop device with sparse file
78 command: losetup {{ losetup_list.stdout }} {{ tmpdir.path }}/sparse.file
80 - name: create volume group
81 command: vgcreate test_zap {{ losetup_list.stdout }}
84 - name: create logical volume 1
85 command: lvcreate --yes -l 50%FREE -n data-lv1 test_zap
88 - name: create logical volume 2
89 command: lvcreate --yes -l 50%FREE -n data-lv2 test_zap
92 # zapping the first lv shouldn't remove the vg, allowing the second zap to succeed
93 - name: zap test_zap/data-lv1
94 command: "ceph-volume --cluster {{ cluster }} lvm zap --destroy test_zap/data-lv1"
98 - name: zap test_zap/data-lv2
99 command: "ceph-volume --cluster {{ cluster }} lvm zap --destroy test_zap/data-lv2"