みなさんこんにちは。
私が働いている会社はそれぞれ非常に動的に発展しており、サーバーとユーザーの数は増えています。 弾力性の問題は以前よりも重要になっています。
歴史的に、一部のデータはファイル内にあり、クライアントはNFSを介してバックエンドに接続します。 ただし、中央サーバーを障害ポイントにしたくありませんでした。
Rsync-optionsはすぐに浅くなります。 他の人々の質問と経験、およびいくつかのs3fsテストを研究したところ、これは分散ストレージの第一候補でしたが、GlusterFSが選ばれました。
メインサイトのリンクで詳細を確認することはできませんが、
コミュニティはそのようなリポジトリが私たちの目的に非常に適している
と言います。 GlusterFSの主な機能は、クライアントが現在利用可能なウィザードに書き込み、操作が再開された後、レプリケーションをアクセス不能にすることです。
それでは、セットアップを始めましょう。 古いNFSも同時にサーバー上で動作することを予約します。それらは同じマシン上で非常にうまくいきます。 これは、NFSからの移行中に必要でした。
サーバーをインストールします。
aptitude install glusterfs-server
構成(/etc/glusterfs/glusterfsd.vol)について説明します。
volume posix type storage/posix option directory /mnt/Files end-volume volume locks type features/locks subvolumes posix end-volume volume Files type performance/io-threads option thread-count 8 subvolumes locks end-volume volume server type protocol/server option transport-type tcp option auth.login.Files.allow user
2番目のサーバーでglusterfs-serverパッケージと構成(/etc/glusterfs/glusterfsd.vol)を複製します。
クライアントをインストールします。
aptitude install glusterfs-client
クライアントの構成(/etc/glusterfs/glusterfs.vol)について説明します。
volume server1.com type protocol/client option transport-type tcp option username user option password secret_pass option remote-host 10.132.259.159
ヒューズモジュールのロード
modprobe fuse
FSをマウントしてみてください
/usr/sbin/glusterfs -f /etc/glusterfs/glusterfs.vol /mnt/Files df -h /etc/glusterfs/glusterfs.vol 199G 120G 70G 64% /mnt/Files
今、小さな熊手について。 Gluster-FSは、fstabを介した再起動時にマウントされません。 ヒューズモジュールは自動的にロードされません。 カーネルを再構築できますが、簡単に再構築できます。
/ etc / initramfs-tools / modulesを最後に追加します。
fuse
私たちは実施します:
update-initramfs -u -k `uname -r`
/ etc / fstabに追加:
/etc/glusterfs/glusterfs.vol /mnt/Files glusterfs defaults 0 0
再起動して利益を得ます。
さて、テストに関する質問を見越して、Gluster-fs vs NFS vs POHMELFSのいくつかの指標を示します。 ファイルの重量は約700Mbです。
GlusterFS:
root@domU-12-41-56-0F-34-81:~
POHMELFS(ここから
POHMELFS:新しい方法でNFSを取得 ):
stolen@stolen ~/soft/pohmelfs-server.git $ time cat /mnt/pohmel/share/GRTMPVOL_RU_20.10.08.iso >/dev/null real 1m37.150s user 0m0.010s sys 0m1.270s stolen@stolen ~/soft/pohmelfs-server.git $ time cat /mnt/pohmel/share/GRTMPVOL_RU_20.10.08.iso >/dev/null real 0m0.591s user 0m0.003s sys 0m0.257s stolen@stolen ~/soft/pohmelfs-server.git $ time cat /mnt/upload/share/GRTMPVOL_RU_20.10.08.iso >/dev/null real 1m3.719s user 0m0.003s sys 0m0.400s
NFS:
root@domU-12-41-56-0F-34-81:run$ time cat /mnt/Files/ubuntu-11.10-desktop-amd64+mac.iso > /dev/null real 0m15.220s user 0m0.008s sys 0m0.423s root@domU-12-41-56-0F-34-81:run$ time cat /mnt/Files/ubuntu-11.10-desktop-amd64+mac.iso > /dev/null real 0m16.139s user 0m0.005s sys 0m0.160s root@domU-12-41-56-0F-34-81:run$ time cat /mnt/Files/ubuntu-11.10-desktop-amd64+mac.iso > /dev/null real 0m18.812s user 0m0.006s sys 0m0.177s
小さなファイルでGlusteFSとNFSをテストします。
これらの目的のために、700個のファイルを生成し、少しの内容でそれらを詰まらせるスクリプトをスケッチしました。
GlusterFS、コピー:
root@domU-12-31-36-0F-71-81:~
NFSコピー:
root@domU-12-41-39-01-D1-71:~
GlusterFS、削除:
root@domU-12-31-36-0F-71-81:~
NFSの削除:
root@domU-12-41-39-01-D1-71:~
UPD: NFSおよびGlusterFS用の小さなファイルのテストを追加しました。