]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tests: ceph-disk.sh test for second journal partition
authorLoic Dachary <ldachary@redhat.com>
Wed, 4 Mar 2015 14:43:15 +0000 (15:43 +0100)
committerLoic Dachary <ldachary@redhat.com>
Tue, 10 Mar 2015 16:50:29 +0000 (17:50 +0100)
Create an OSD with data on a disk, journal on another
This will add a new partition to $journal, the previous
one will remain.

Add 200MB to the file supporting the pseudo disk exposed via the loop
device: as we create more OSDs, more 100MB partitions will be created
for journals.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
src/test/ceph-disk.sh

index d20f6cf887c79004c646b11f7eacbe13b0d51b88..8049aa0fc0a36333ed218ef99116c9ec679ffb18 100755 (executable)
@@ -302,9 +302,9 @@ function test_activate_dir() {
 function create_dev() {
     local name=$1
 
-    dd if=/dev/zero of=$name bs=1024k count=200
     set -x
     echo create_dev $name >&2
+    dd if=/dev/zero of=$name bs=1024k count=400 > /dev/null
     losetup --find $name
     local dev=$(losetup --associated $name | cut -f1 -d:)
     ceph-disk zap $dev > /dev/null 2>&1
@@ -334,12 +334,27 @@ function activate_dev_body() {
 
     setup
     run_mon
+    #
+    # Create an OSD with data on a disk, journal on another
+    #
+    test_activate $disk ${disk}p1 $journal || return 1
+    kill_daemons
+    umount ${disk}p1 || return 1
+    teardown
+
+    setup
+    run_mon
+    #
+    # Create an OSD with data on a disk, journal on another
+    # This will add a new partition to $journal, the previous
+    # one will remain.
+    #
+    ceph-disk zap $disk || return 1
     test_activate $disk ${disk}p1 $journal || return 1
     kill_daemons
     umount ${disk}p1 || return 1
     teardown
 
-    # reuse the journal partition
     setup
     run_mon
     test_activate $newdisk ${newdisk}p1 ${journal}p1 || return 1