-
-
Save i-kumagai/4290c45bb9f156315e19 to your computer and use it in GitHub Desktop.
rbd striping
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
※ストライピング対応のイメージの作成 | |
# rbd create --size 10 --stripe-unit 2097152 --stripe-count 2 --image-format 2 test3 | |
※イメージ内のデータすべてを"0"(文字)で埋める(sample program) | |
# python bin/rbd_write.py test3 0 10 0 | |
※2MB/4MB/6MB/8MB/10MBのユニットの境界にa~iの文字を書き込み(sample program) | |
# python bin/rbd_write.py test3 a 1 2097151 | |
# python bin/rbd_write.py test3 b 1 2097152 | |
# python bin/rbd_write.py test3 c 1 4194303 | |
# python bin/rbd_write.py test3 d 1 4194304 | |
# python bin/rbd_write.py test3 e 1 6291455 | |
# python bin/rbd_write.py test3 f 1 6291456 | |
# python bin/rbd_write.py test3 g 1 8388607 | |
# python bin/rbd_write.py test3 h 1 8388608 | |
# python bin/rbd_write.py test3 i 1 10485759 | |
※radosからオブジェクトデータを取得 | |
# rados get -p rbd rbd_data.26b12ae8944a.0000000000000000 | |
# rados get -p rbd rbd_data.26b12ae8944a.0000000000000001 | |
# rados get -p rbd rbd_data.26b12ae8944a.0000000000000002 | |
※取得したデータを確認(4MB,4MB,2MBのデータになっています) | |
# ls -l rbd* | |
-rw-r--r-- 1 root root 4194304 Jun 24 11:43 rbd_data.26b12ae8944a.0000000000000000 | |
-rw-r--r-- 1 root root 4194304 Jun 24 11:43 rbd_data.26b12ae8944a.0000000000000001 | |
-rw-r--r-- 1 root root 2097152 Jun 24 11:43 rbd_data.26b12ae8944a.0000000000000002 | |
※取得したオブジェクトデータのa~iのindexを確認 | |
# python bin/check_offset.py test3/rbd_data.26b12ae8944a.0000000000000000 a | |
2097151 | |
# python bin/check_offset.py test3/rbd_data.26b12ae8944a.0000000000000001 b | |
0 | |
# python bin/check_offset.py test3/rbd_data.26b12ae8944a.0000000000000001 c | |
2097151 | |
# python bin/check_offset.py test3/rbd_data.26b12ae8944a.0000000000000000 d | |
2097152 | |
# python bin/check_offset.py test3/rbd_data.26b12ae8944a.0000000000000000 e | |
4194303 | |
# python bin/check_offset.py test3/rbd_data.26b12ae8944a.0000000000000001 f | |
2097152 | |
# python bin/check_offset.py test3/rbd_data.26b12ae8944a.0000000000000001 g | |
4194303 | |
# python bin/check_offset.py test3/rbd_data.26b12ae8944a.0000000000000002 h | |
0 | |
# python bin/check_offset.py test3/rbd_data.26b12ae8944a.0000000000000002 i | |
2097151 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment