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"
40 command: "ceph-volume --cluster {{ cluster }} lvm zap /dev/sdd2 --destroy"
44 - name: redeploy osd.2 using /dev/sdd1
45 command: "ceph-volume --cluster {{ cluster }} lvm create --filestore --data /dev/sdd1 --journal /dev/sdd2 --osd-id 2"
50 # note: we don't use --destroy here to test this works without that flag.
51 # --destroy is used in the bluestore tests
52 - name: zap test_group/data-lv1
53 command: "ceph-volume --cluster {{ cluster }} lvm zap test_group/data-lv1"
57 # osd.0 journal device (zap without --destroy that removes the LV)
59 command: "ceph-volume --cluster {{ cluster }} lvm zap /dev/sdc1"
63 - name: prepare osd.0 again using test_group/data-lv1
64 command: "ceph-volume --cluster {{ cluster }} lvm prepare --filestore --data test_group/data-lv1 --journal /dev/sdc1 --osd-id 0"
68 - name: activate all to start the previously prepared osd.0
69 command: "ceph-volume lvm activate --filestore --all"
74 command: "ceph-volume lvm list"
78 - name: create temporary directory
84 - name: create a 5GB sparse file
85 command: fallocate -l 5G {{ tmpdir.path }}/sparse.file
87 - name: find an empty loop device
89 register: losetup_list
91 - name: setup loop device with sparse file
92 command: losetup {{ losetup_list.stdout }} {{ tmpdir.path }}/sparse.file
94 - name: create volume group
95 command: vgcreate test_zap {{ losetup_list.stdout }}
98 - name: create logical volume 1
99 command: lvcreate --yes -l 50%FREE -n data-lv1 test_zap
102 - name: create logical volume 2
103 command: lvcreate --yes -l 50%FREE -n data-lv2 test_zap
106 # zapping the first lv shouldn't remove the vg, allowing the second zap to succeed
107 - name: zap test_zap/data-lv1
108 command: "ceph-volume --cluster {{ cluster }} lvm zap --destroy test_zap/data-lv1"
112 - name: zap test_zap/data-lv2
113 command: "ceph-volume --cluster {{ cluster }} lvm zap --destroy test_zap/data-lv2"