4. レプリケーション
Copyright (C) 2011, NTTPC Communications, Inc. All Rights Reserved. 4
5. レプリケーション
A
VFS
FUSE
glusterfs
glusterfsd glusterfsd
VFS VFS
file system file system
block device block device
Copyright (C) 2011, NTTPC Communications, Inc. All Rights Reserved. 5
6. レプリケーション
VFS
glusterfsが...
FUSE
A glusterfs
glusterfsd glusterfsd
VFS VFS
file system file system
block device block device
Copyright (C) 2011, NTTPC Communications, Inc. All Rights Reserved. 6
7. レプリケーション
VFS
FUSE
レプリケーションを行う
glusterfs
glusterfsd glusterfsd
VFS VFS
file system file system
A A
block device block device
Copyright (C) 2011, NTTPC Communications, Inc. All Rights Reserved. 7
8. レプリケーション
レプリカのペアはbrick単位で固定
レプリカ1/2 レプリカ2/2
B B
brick4-1 brick4-2
A A
brick3-1 brick1-1 brick3-2 brick1-2
C C
brick2-1 brick2-2
上記ボリューム作成例:
# gluster volume create <volume> replica 2 brick1-1 brick1-2
brick2-1 brick2-2 brick3-1 brick3-2 brick4-1 brick4-2
Copyright (C) 2011, NTTPC Communications, Inc. All Rights Reserved. 8
9. レプリケーションのデータフロー
Copyright (C) 2011, NTTPC Communications, Inc. All Rights Reserved. 9
10. レプリケーションのデータフロー
VFS
FUSE
glusterfs
glusterfsd glusterfsd
Copyright (C) 2011, NTTPC Communications, Inc. All Rights Reserved. 10
11. レプリケーションのデータフロー
A
VFS
FUSE
glusterfs
glusterfsd glusterfsd
Copyright (C) 2011, NTTPC Communications, Inc. All Rights Reserved. 11
14. レプリケーションのデータフロー
すべてのレプリカを同時に転送
VFS
FUSE
glusterfs
A A
glusterfsd glusterfsd
Copyright (C) 2011, NTTPC Communications, Inc. All Rights Reserved. 14
15. レプリケーションのデータフロー
ネットワークの速度や遅延の影響を受ける
VFS
FUSE
glusterfs
A
A
glusterfsd glusterfsd
Copyright (C) 2011, NTTPC Communications, Inc. All Rights Reserved. 15
16. レプリケーションのデータフロー
すべてのレプリカの転送が完了したら処理を終了
VFS
FUSE
glusterfs
A A
glusterfsd glusterfsd
Copyright (C) 2011, NTTPC Communications, Inc. All Rights Reserved. 16
19. レプリケーションのデータフロー
VFS
FUSE
A
glusterfs
A A
glusterfsd glusterfsd
Copyright (C) 2011, NTTPC Communications, Inc. All Rights Reserved. 19
20. レプリケーションのデータフロー
NFSでマウントした場合
VFS (NFSv3 クライアント)
glusterfs (NFSv3 サーバ)
glusterfsd glusterfsd
Copyright (C) 2011, NTTPC Communications, Inc. All Rights Reserved. 20
21. レプリケーションのデータフロー
NFSでマウントした場合
A
VFS (NFSv3 クライアント)
glusterfs (NFSv3 サーバ)
glusterfsd glusterfsd
Copyright (C) 2011, NTTPC Communications, Inc. All Rights Reserved. 21
22. レプリケーションのデータフロー
クライアントから転送されるデータ量は
レプリカ数の影響を受けない
VFS (NFSv3 クライアント)
A
glusterfs (NFSv3 サーバ)
glusterfsd glusterfsd
Copyright (C) 2011, NTTPC Communications, Inc. All Rights Reserved. 22
23. レプリケーションのデータフロー
glusterfsより先の処理についてはFUSEと同様
VFS (NFSv3 クライアント)
A A
glusterfs (NFSv3 サーバ)
glusterfsd glusterfsd
Copyright (C) 2011, NTTPC Communications, Inc. All Rights Reserved. 23
24. レプリカ障害とその対応
Copyright (C) 2011, NTTPC Communications, Inc. All Rights Reserved. 24
27. 運用面での注意点
Copyright (C) 2011, NTTPC Communications, Inc. All Rights Reserved. 27
28. 運用面での注意点
OSやハードウェアの監視を怠らないで下さい。
VFS
FUSE glusterfsからは
glusterfsdの状態しか見えない。
glusterfs
glusterfsd
ファイルシステム以下で異常が起きて
も、glusterfsdはケアしない。
VFS
例えばread-only file systemや
file system
input-output errorは
block device ユーザに返ってしまう。
Copyright (C) 2011, NTTPC Communications, Inc. All Rights Reserved. 28
29. 運用面での注意点
……。
volumeがfullになる前にadd-brickとrebalanceを。
A
/path/to/fileA
③800〜1199
A
768
①0〜399
A ②400〜799 A
ファイル生成がエラーになります。
Copyright (C) 2011, NTTPC Communications, Inc. All Rights Reserved. 29
31. FAQ
Copyright (C) 2011, NTTPC Communications, Inc. All Rights Reserved. 31
32. FAQ
Q. レプリカの数を
変更できますか?
A. できません。
どうしても、という場合は、
レプリカ数を変更したボリュームを別途作成し、
データ移行を行うことになります。
他にももっと良い方法があるかもしれません。
Copyright (C) 2011, NTTPC Communications, Inc. All Rights Reserved. 32
33. FAQ
Q. NFSマウントした場合に
fcntl()やflock()が
効かないのですが。
A. 効きません。
RFC 1813 のAnnexで規定するNLM (Network Lock Manager)を、
GlusterFSのNFSサーバが実装していないためです。
FUSEではこれらのロックが有効です。
Copyright (C) 2011, NTTPC Communications, Inc. All Rights Reserved. 33
34. FAQ
Q. レプリカ障害中に、
レプリカ数は保たれますか?
A. 保たれません。
レプリケーションを構成するノードがアクセス不能となった場合に
そのノードの代替を他のノードが務めることはありません。
replace-brickを用いれば、ノードの入れ替えは可能です。
Copyright (C) 2011, NTTPC Communications, Inc. All Rights Reserved. 34
35. FAQ
Q. マルチテナンシーを
実現するには?
A. 他の手段との組み合わせが
必要です。
サーバ仮想化やVLAN等を組み合わせれば、
異なるユーザ同士を隔離できます。
Copyright (C) 2011, NTTPC Communications, Inc. All Rights Reserved. 35
36. FAQ
Q. rebalanceって
コスト高いですよね?
A. はい。
現在上手くやる方法を考えています。
現状だと、rebalanceのstart/stopを利用して、
例えば深夜帯などトラフィックの少ない時間帯のみ実行する等
運用による解決を考えています。
Copyright (C) 2011, NTTPC Communications, Inc. All Rights Reserved. 36
37. FAQ
Q. 最大の導入実績(台数)は?
A. Gluster社の公式発表には、
某商用サービスPのケースで
「3データセンタに6台ずつ」
とあります。
…古くからある情報です。
Copyright (C) 2011, NTTPC Communications, Inc. All Rights Reserved. 37
38. FAQ
Q. 向き不向きを教えて下さい。
A. 汎用的な用途に
向いていると思います。
シンプルでイージー、それでいてPOSIX準拠の
I/Fを持っているためです。
反面、ある特定用途専用の分散FSには敵いません。
Copyright (C) 2011, NTTPC Communications, Inc. All Rights Reserved. 38
39. FAQ
Q. 「スケールアウトNAS」と
どっちがいいの?
A. ノーコメントです。
私自身はプログラマなので、ハードウェアプロダクトには
詳しくありません。ただ「スケールアウトNAS」の機能性は
魅力的だと思っています。
分散FSならハードウェアを選べるので、
ベンダロックインのリスクがありません。
これをどう評価するか次第だと思います。
Copyright (C) 2011, NTTPC Communications, Inc. All Rights Reserved. 39
40. FAQ
Q. 某分散FSと
どっちがいいの?
A. ノーコメントです。
用途次第だと思います。
また、SwiftやZFSのように、組み合わせて使える
相性の良い分散FSもあります。
Copyright (C) 2011, NTTPC Communications, Inc. All Rights Reserved. 40
45. 参考
• クリスピー・クリーム・ドーナツはクリスピー・クリーム・ドーナツ・ジャパン
株式会社の登録商標です。
• 十万石まんじゅうは株式会社十万石ふくさやの登録商標です。
• Charlie and the Chocolate Factory, 2005, Warner Bros. All rights
reserved.
• ビアード・パパは株式会社 麦の穂の登録商標です。
Copyright (C) 2011, NTTPC Communications, Inc. All Rights Reserved. 45