3 source $CEPH_ROOT/qa
/standalone
/ceph-helpers.sh
5 [ `uname` = FreeBSD
] && exit 0
11 export CEPH_MON
="127.0.0.1:7146" # git grep '\<7146\>' : there must be only one
13 CEPH_ARGS
+="--fsid=$(uuidgen) --auth-supported=none "
14 CEPH_ARGS
+="--mon-host=$CEPH_MON "
15 # avoid running out of fds in rados bench
16 CEPH_ARGS
+="--filestore_wbthrottle_xfs_ios_hard_limit=900 "
17 CEPH_ARGS
+="--filestore_wbthrottle_btrfs_ios_hard_limit=900 "
18 local funcs
=${@:-$(set | sed -n -e 's/^\(TEST_[0-9a-z_]*\) .*/\1/p')}
19 for func
in $funcs ; do
20 setup
$dir ||
return 1
21 $func $dir ||
return 1
22 teardown
$dir ||
return 1
26 function TEST_filestore_to_bluestore
() {
29 local flimit
=$
(ulimit -n)
30 if [ $flimit -lt 1536 ]; then
31 echo "Low open file limit ($flimit), test may fail. Increase to 1536 or higher and retry if that happens."
34 run_mon
$dir a ||
return 1
35 run_mgr
$dir x ||
return 1
36 run_osd
$dir 0 ||
return 1
37 osd_pid
=$
(cat $dir/osd
.0.pid
)
38 run_osd
$dir 1 ||
return 1
39 run_osd
$dir 2 ||
return 1
46 rados bench
-p foo
10 write -b 4096 --no-cleanup ||
return 1
49 while kill $osd_pid; do sleep 1 ; done
52 mv $dir/0 $dir/0.old ||
return 1
53 mkdir
$dir/0 ||
return 1
54 ofsid
=$
(cat $dir/0.old
/fsid
)
55 echo "osd fsid $ofsid"
57 CEPH_ARGS
+="--log-file $dir/cot.log --log-max-recent 0 "
58 ceph-objectstore-tool
--type bluestore
--data-path $dir/0 --fsid $ofsid \
60 ceph-objectstore-tool
--data-path $dir/0.old
--target-data-path $dir/0 \
64 run_osd_bluestore
$dir 0 ||
return 1
66 while ! ceph osd stat |
grep '3 up' ; do sleep 1 ; done
67 ceph osd metadata
0 |
grep bluestore ||
return 1
73 # and make sure mon is sync'ed
76 wait_for_clean ||
return 1
82 # compile-command: "cd ../.. ; make -j4 && test/osd/osd-dup.sh"