]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
ceph-disk: test re-using an existing journal partition
authorDan van der Ster <daniel.vanderster@cern.ch>
Fri, 12 Dec 2014 11:40:19 +0000 (12:40 +0100)
committerLoic Dachary <ldachary@redhat.com>
Sat, 13 Dec 2014 14:01:45 +0000 (15:01 +0100)
commite0f052a10daecfd091e33a4380ef2505dbe05379
tree5dedc9f5cb9f3b34d5000ddccf235ae7e5c85def
parent0e4cb57bcc52099aeb57a4616c9b93708c596882
ceph-disk: test re-using an existing journal partition

Add a ceph-disk test to first setup an OSD with a separate journal
block device, then tear down the OSD (simulating a failure) and create
a new OSD which re-uses the same journal device.

Add create_dev / destroy_dev helpers that encapsulate the operations
that ensure the partition table is up to date in the kernel and the
symlinks are created as expected. In particular it makes sure the kernel
is aware that the partition table of a newly created device is
empty. If the device previously existed and the kernel was not informed
of the latest partition table updates via partprobe / partx, it may
have cached an old partition table which can create all sorts of
unexpected behaviors such as a failure to create the by-partuuid
symbolic links as described in http://tracker.ceph.com/issues/10146
Refs: #10146

Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch>
Signed-off-by: Loic Dachary <ldachary@redhat.com>
src/test/ceph-disk.sh