glusterfs 技術と動向 1of2

44
Copyright (C) 2011, NTTPC Communications, Inc. All Rights Reserved. 1 2011/12/8 (株)NTTPCコミュニケーションズ 第4回クラウドストレージ研究会 GlusterFS 技術と動向 1of2

Upload: keisuke-takahashi

Post on 24-May-2015

8.070 views

Category:

Technology


5 download

DESCRIPTION

2011/12/8 第4回クラウドストレージ研究会 発表資料 1/2

TRANSCRIPT

Page 1: GlusterFS 技術と動向 1of2

Copyright  (C)  2011,  NTTPC  Communications,  Inc.  All  Rights  Reserved.   1 

2011/12/8(株)NTTPCコミュニケーションズ

第4回クラウドストレージ研究会

GlusterFS 技術と動向1of2

Page 2: GlusterFS 技術と動向 1of2

Copyright  (C)  2011,  NTTPC  Communications,  Inc.  All  Rights  Reserved.   2 

発表者の紹介

高橋 敬祐 (TAKAHASHI Keisuke)

(個人用)Twitter ID : @keithseahus

•  NTTPCコミュニケーションズ在籍 (2006年〜)

–  Webマイニング系開発

–  分散FS特にGlusterFSの調査,研究,それを利用した開発及びOSS活動

–  宇宙航空関連実証実験及び開発

–  その他先端技術調査 •  出入りしている勉強会

–  VIOPS

–  クラウドネットワーク研究会

–  クラウドストレージ研究会

–  Tokyo Erlang Workshop

–  その他

•  この界隈で特に関係の深い人

–  伊藤氏 ( @thatsdone )

–  STEC 伊藤氏 ( @HarrisonIto )

–  NTTPC 中冨 ( @nakacya )

–  NTTPC 高田 ( @mikiT_T )

Google Groups: http://groups.google.com/group/gluster-ja

Page 3: GlusterFS 技術と動向 1of2

Copyright  (C)  2011,  NTTPC  Communications,  Inc.  All  Rights  Reserved.   3 

1.  GlusterFSの概要と動向2.  GlusterFSの技術

1.  ストレージの階層構造2.  分散アルゴリズム

1.  分散アルゴリズム2.  Elasticなレイアウト変更3.  特殊なケース

3.  メタデータ構造4.  レプリケーション

1.  レプリケーション2.  レプリケーションのデータフロー3.  レプリカ障害とその対応

5.  運用面での注意点

3.  FAQ4. まとめ

GlusterFS 技術と動向 1of2

Page 4: GlusterFS 技術と動向 1of2

Copyright  (C)  2011,  NTTPC  Communications,  Inc.  All  Rights  Reserved.   4 

GlusterFSの概要と動向

Page 5: GlusterFS 技術と動向 1of2

Copyright  (C)  2011,  NTTPC  Communications,  Inc.  All  Rights  Reserved.   5 

GlusterFSの概要と動向

@doryokujin

さんの もオススメ!

Page 6: GlusterFS 技術と動向 1of2

Copyright  (C)  2011,  NTTPC  Communications,  Inc.  All  Rights  Reserved.   6 

ストレージの階層構造

Page 7: GlusterFS 技術と動向 1of2

Copyright  (C)  2011,  NTTPC  Communications,  Inc.  All  Rights  Reserved.   7 

ストレージの階層構造

block device

Page 8: GlusterFS 技術と動向 1of2

Copyright  (C)  2011,  NTTPC  Communications,  Inc.  All  Rights  Reserved.   8 

ストレージの階層構造

block device

file system

GlusterFSはblock deviceを直接管理することはできません。(カーネル空間のファイルシステムではありません。)

Page 9: GlusterFS 技術と動向 1of2

Copyright  (C)  2011,  NTTPC  Communications,  Inc.  All  Rights  Reserved.   9 

ストレージの階層構造

block device

file system

VFS

Page 10: GlusterFS 技術と動向 1of2

Copyright  (C)  2011,  NTTPC  Communications,  Inc.  All  Rights  Reserved.   10 

ストレージの階層構造

block device

file system

VFS

glusterfsd

GlusterFSはカーネル空間ファイルシステムの上で動作します。下位のファイルシステムへの操作はglusterfsdが行います。

Page 11: GlusterFS 技術と動向 1of2

Copyright  (C)  2011,  NTTPC  Communications,  Inc.  All  Rights  Reserved.   11 

ストレージの階層構造

block device

file system

VFS

glusterfsd

glusterfs

glusterfsがglusterfsdへの命令を実行します。glusterfs-glusterfsd間はデフォルトではTCP/IPで接続されます。

Page 12: GlusterFS 技術と動向 1of2

Copyright  (C)  2011,  NTTPC  Communications,  Inc.  All  Rights  Reserved.   12 

ストレージの階層構造

block device

file system

VFS

glusterfsd

glusterfs

FUSE

glusterfsにはFUSEとのI/Fがあります。

Page 13: GlusterFS 技術と動向 1of2

Copyright  (C)  2011,  NTTPC  Communications,  Inc.  All  Rights  Reserved.   13 

ストレージの階層構造

block device

file system

VFS

glusterfsd

glusterfs

FUSE

VFS

そのため、POSIX準拠のファイルシステムとしてマウントすることができます。

Page 14: GlusterFS 技術と動向 1of2

Copyright  (C)  2011,  NTTPC  Communications,  Inc.  All  Rights  Reserved.   14 

ストレージの階層構造

block device

file system

VFS

glusterfsd

glusterfs

FUSE

VFS

Page 15: GlusterFS 技術と動向 1of2

Copyright  (C)  2011,  NTTPC  Communications,  Inc.  All  Rights  Reserved.   15 

分散アルゴリズム

Page 16: GlusterFS 技術と動向 1of2

Copyright  (C)  2011,  NTTPC  Communications,  Inc.  All  Rights  Reserved.   16 

分散アルゴリズム

Page 17: GlusterFS 技術と動向 1of2

Copyright  (C)  2011,  NTTPC  Communications,  Inc.  All  Rights  Reserved.   17 

分散アルゴリズム

①0〜399

②400〜799

③800〜1199

注)ハッシュ値及びbrick名は説明のために簡略化してあります。以下同じ。

Page 18: GlusterFS 技術と動向 1of2

Copyright  (C)  2011,  NTTPC  Communications,  Inc.  All  Rights  Reserved.   18 

分散アルゴリズム

①0〜399

②400〜799

③800〜1199/path/to/fileA

768

A

Page 19: GlusterFS 技術と動向 1of2

Copyright  (C)  2011,  NTTPC  Communications,  Inc.  All  Rights  Reserved.   19 

分散アルゴリズム

①0〜399

②400〜799

③800〜1199/path/to/fileA

768

A

Page 20: GlusterFS 技術と動向 1of2

Copyright  (C)  2011,  NTTPC  Communications,  Inc.  All  Rights  Reserved.   20 

Elasticなレイアウト変更

Page 21: GlusterFS 技術と動向 1of2

Copyright  (C)  2011,  NTTPC  Communications,  Inc.  All  Rights  Reserved.   21 

Elasticなレイアウト変更

①0〜399

②400〜799

③800〜1199

①0〜299

②300〜599

③600〜899

④900〜1199

古いハッシュテーブル(3 bricks)

新しいハッシュテーブル(4 bricks)

A

brick追加直後の状態(gluster volume add-brick ④)

既存データの読み書きは 古いハッシュテーブルに基づき

実行される。

Page 22: GlusterFS 技術と動向 1of2

Copyright  (C)  2011,  NTTPC  Communications,  Inc.  All  Rights  Reserved.   22 

Elasticなレイアウト変更

①0〜399

②400〜799

③800〜1199

①0〜299

②300〜599

③600〜899

④900〜1199

古いハッシュテーブル(3 bricks)

新しいハッシュテーブル(4 bricks)

/path/to/fileB 1024

A

B

新規ファイルの作成には新しいハッシュテーブルを使う

Page 23: GlusterFS 技術と動向 1of2

Copyright  (C)  2011,  NTTPC  Communications,  Inc.  All  Rights  Reserved.   23 

Elasticなレイアウト変更

①0〜399

②400〜799

③800〜1199

①0〜299

②300〜599

③600〜899

④900〜1199

古いハッシュテーブル(3 bricks)

新しいハッシュテーブル(4 bricks)

/path/to/fileB 1024

A

BB

新規ファイルの作成には新しいハッシュテーブルを使う

リンク先brickの書かれた スパースファイル

Page 24: GlusterFS 技術と動向 1of2

Copyright  (C)  2011,  NTTPC  Communications,  Inc.  All  Rights  Reserved.   24 

Elasticなレイアウト変更

①0〜399

②400〜799

③800〜1199

①0〜299

②300〜599

③600〜899

④900〜1199

古いハッシュテーブル(3 bricks)

新しいハッシュテーブル(4 bricks)

A

BB

rebalanceを実行(gluster volume rebalance <volume> start)

Page 25: GlusterFS 技術と動向 1of2

Copyright  (C)  2011,  NTTPC  Communications,  Inc.  All  Rights  Reserved.   25 

Elasticなレイアウト変更

①0〜399

②400〜799

③800〜1199

①0〜299

②300〜599

③600〜899

④900〜1199

古いハッシュテーブル(3 bricks)

新しいハッシュテーブル(4 bricks)

A

BB

rebalanceを実行(gluster volume rebalance <volume> start)

A

リンク先brickの書かれた スパースファイル

Page 26: GlusterFS 技術と動向 1of2

Copyright  (C)  2011,  NTTPC  Communications,  Inc.  All  Rights  Reserved.   26 

Elasticなレイアウト変更

①0〜399

②400〜799

③800〜1199

①0〜299

②300〜599

③600〜899

④900〜1199

古いハッシュテーブル(3 bricks)

新しいハッシュテーブル(4 bricks)

A

BB

A

リンク先brickの書かれた スパースファイル

rebalanceを実行中...

Page 27: GlusterFS 技術と動向 1of2

Copyright  (C)  2011,  NTTPC  Communications,  Inc.  All  Rights  Reserved.   27 

Elasticなレイアウト変更

①0〜399

②400〜799

③800〜1199

①0〜299

②300〜599

③600〜899

④900〜1199

古いハッシュテーブル(3 bricks)

新しいハッシュテーブル(4 bricks)

A

BB

rebalanceを実行中...

Page 28: GlusterFS 技術と動向 1of2

Copyright  (C)  2011,  NTTPC  Communications,  Inc.  All  Rights  Reserved.   28 

Elasticなレイアウト変更

①0〜399

②400〜799

③800〜1199

①0〜299

②300〜599

③600〜899

④900〜1199

古いハッシュテーブル(3 bricks)

新しいハッシュテーブル(4 bricks)

A

BB

rebalanceを実行中...

/path/to/fileC 384C

rebalance中のファイル生成処理は...

Page 29: GlusterFS 技術と動向 1of2

Copyright  (C)  2011,  NTTPC  Communications,  Inc.  All  Rights  Reserved.   29 

Elasticなレイアウト変更

①0〜399

②400〜799

③800〜1199

①0〜299

②300〜599

③600〜899

④900〜1199

古いハッシュテーブル(3 bricks)

新しいハッシュテーブル(4 bricks)

A

BB

rebalanceを実行中...

/path/to/fileC 384

C

C

rebalance実行前と同様

Page 30: GlusterFS 技術と動向 1of2

Copyright  (C)  2011,  NTTPC  Communications,  Inc.  All  Rights  Reserved.   30 

Elasticなレイアウト変更

①0〜399

②400〜799

③800〜1199

①0〜299

②300〜599

③600〜899

④900〜1199

古いハッシュテーブル(3 bricks)

新しいハッシュテーブル(4 bricks)

A

BB

C

C

rebalance完了

古いハッシュテーブルを破棄

Page 31: GlusterFS 技術と動向 1of2

Copyright  (C)  2011,  NTTPC  Communications,  Inc.  All  Rights  Reserved.   31 

Elasticなレイアウト変更

①0〜299

②300〜599

③600〜899

④900〜1199

C

B

BA

C

Page 32: GlusterFS 技術と動向 1of2

Copyright  (C)  2011,  NTTPC  Communications,  Inc.  All  Rights  Reserved.   32 

特殊なケース

Page 33: GlusterFS 技術と動向 1of2

Copyright  (C)  2011,  NTTPC  Communications,  Inc.  All  Rights  Reserved.   33 

特殊なケース

①0〜399

②400〜799

③800〜1199

一部brickがdisk full!!

Page 34: GlusterFS 技術と動向 1of2

Copyright  (C)  2011,  NTTPC  Communications,  Inc.  All  Rights  Reserved.   34 

特殊なケース

①0〜399

②400〜799

③800〜1199/path/to/fileA

768

A そこへ新規ファイル作成

Page 35: GlusterFS 技術と動向 1of2

Copyright  (C)  2011,  NTTPC  Communications,  Inc.  All  Rights  Reserved.   35 

特殊なケース

①0〜399

②400〜799

③800〜1199/path/to/fileA

768

A

A

リンク付きスパースファイル

実体は書き込み可能な brickへ

Page 36: GlusterFS 技術と動向 1of2

Copyright  (C)  2011,  NTTPC  Communications,  Inc.  All  Rights  Reserved.   36 

メタデータ構造

Page 37: GlusterFS 技術と動向 1of2

Copyright  (C)  2011,  NTTPC  Communications,  Inc.  All  Rights  Reserved.   37 

メタデータ構造

Page 38: GlusterFS 技術と動向 1of2

Copyright  (C)  2011,  NTTPC  Communications,  Inc.  All  Rights  Reserved.   38 

メタデータ構造

メタデータ (xattr)

(実)データ

Page 39: GlusterFS 技術と動向 1of2

Copyright  (C)  2011,  NTTPC  Communications,  Inc.  All  Rights  Reserved.   39 

メタデータ構造

block device

file system

VFS

glusterfsd

glusterfs

FUSE

VFS

A

Page 40: GlusterFS 技術と動向 1of2

Copyright  (C)  2011,  NTTPC  Communications,  Inc.  All  Rights  Reserved.   40 

メタデータ構造

block device

file system

VFS

glusterfsd

glusterfs

FUSE

VFS

A

glusterfsがxattrを記述 (するようにglusterfsdに命令)

Page 41: GlusterFS 技術と動向 1of2

Copyright  (C)  2011,  NTTPC  Communications,  Inc.  All  Rights  Reserved.   41 

メタデータ構造

block device

file system

VFS

glusterfsd

glusterfs

FUSE

VFS

A

glusterfsdがfile system上にxattrを記述

Page 42: GlusterFS 技術と動向 1of2

Copyright  (C)  2011,  NTTPC  Communications,  Inc.  All  Rights  Reserved.   42 

メタデータ構造

           block device

          file system

  VFS

glusterfsd

glusterfs

FUSE

VFS

A B

glusterfsを 経由しないと xattrが付与 されない!

Page 43: GlusterFS 技術と動向 1of2

Copyright  (C)  2011,  NTTPC  Communications,  Inc.  All  Rights  Reserved.   43 

メタデータ構造

           block device

          file system

  VFS

glusterfsd

glusterfs

FUSE

VFS

A B

原則、GlusterFS経由では アクセスできない。

但し、ディレクトリエントリとして 見えてしまう場合もある。

Page 44: GlusterFS 技術と動向 1of2

Copyright  (C)  2011,  NTTPC  Communications,  Inc.  All  Rights  Reserved.   44 

メタデータ構造

ディレクトリに付与されるxattr trusted.gfid

trusted.glusterfs.dht trusted.glusterfs.test

ファイルに付与されるxattr trusted.gfid

trusted.afr.<volume>-client-<number> trusted.afr.<volume>-client-<number++>

trusted.<volume>-stripe-<number>.stripe-count trusted.<volume>-stripe-<number>.stripe-index