ソースコンパイラのインストールglusterfs

注意:glusterfs yumのサーバーをインストールするときに、ソースのインストールを使用する理由は、いくつかのライブラリの問題の使用に主に依存しています

  • 3 glusterfsにサーバを準備(も正式スプリットブレインの発生を防止するために、少なくとも三つの推奨)、各サーバは、/ etc /ホスト追加下記以下(例えば、DNSサーバを使用して、DNSがDNSで追加)
10.853.113 glusterfs- 1 .example.comと
 10.853.114 glusterfs- 2 .example.comと
 10.853.115 glusterfs- 3 .example.comと
#yumをインストールしたautoconfのautomakeにバイソンcmockery2-develのDOS2UNIXフレックスヒューズ-develのglib2-develのlibacl-develののlibaio-develのlibattr-develのlibcurlの-develのlibibverbs-develのlibrdmacm-develのlibtirpc-develののlibtoolのlibxml2-develのLVM2-develのメイクのopenssl-develのpkgconfig pyliblzmaのpython-develののpython-eventletのpython-netifacesのpython-ペースト展開のpython-のsimplejsonのpython-スフィンクスのpython-WebObに関するpyxattrのreadline-develのrpmのビルドのsqlite-develのSystemTapの-SDT-develのタールユーザ空間-RCU-develの
#CDのユーザ空間-rcu- マスター
#。/ ブートストラップ
#。/ 設定
#が作る && make installを
#1にldconfigを
  • ダウンロードglusterfsソースコードと/home/glusterfs-5.7、このバージョン5.7を解凍
  •  システムディレクトリにコピーglusterfsのlib(コンパイルgluster時間が使用されます)
#CD /ホーム/ glusterfs- 5.7 #CP -r libglusterfs / srcには/ usr / local /含ん/ glusterfs 
  • UUID依存ライブラリは、yumを-y libuuid-develのインストール
  • コピーglupy(コンパイルgluster時間が使用されます)
#cpは-r /ホーム/ glusterfs-xlatorsマスター/ xlators / glupy / /ホーム/ glusterfs- 5.7 / xlators /機能/
  • glusterfsの実装に応じて、公式文書によると、
#CDの/home/glusterfs-5.7 
#./ autogen.sh #。/設定--without- libtirpc #。/ --enable-設定GNFSの #が作る #をインストールします

次のエラーが発生する可能性があり、メイクで 

../../../../contrib/userspace-rcu/rculist-extra.h:336:エラー:再定義の' cds_list_add_tail_rcu ' 
 無効 cds_list_add_tail_rcu(構造体 cds_list_head * NEWP、
       ^ 
ファイルに含まれてから glusterd- rcu.h:150 から glusterd-sm.h:26 より glusterd.h:28 より glusterd.c:19  /usr/local/include/urcu/rculist.h:446注:以前の定義は' cds_list_add_tail_rcuは' ここにあった
  のボイド cds_list_add_tail_rcu(構造体 cds_list_headの*のNEWPは、

条件付きコンパイルを追加するファイルに関数を次Cds_list_add_tail_rcu

/ usr / local /含める/ urcu / rculist.h
 /ホーム/ glusterfs- 5.7 /contrib/userspace-rcu/rculist-extra.h
#ifndefのCDS_LIST_ADD_TAIL_CRU
 の#define CDS_LIST_ADD_TAIL_CRU
 静的インライン
 ボイド cds_list_add_tail_rcu(構造体 cds_list_head * NEWP、
                 構造体 cds_list_head * ヘッド)
{ 
        NEWP - >次= ヘッド。
        NEWP - > PREV =頭部> 前。
        rcu_assign_pointer(ヘッド - > prev-> 次に、NEWP)。
        ヘッド - > PREV = NEWP。
} 
#endifの
  • ディスクをフォーマットして、ディレクトリをマウントする3台のサーバーに次のコマンドを実行します。
mkfs.xfs -iサイズ= 512 / DEV / VDB 
ます。mkdir -p /データ/ レンガ
エコー' の/ dev / VDB /データ/ブリックXFSデフォルト1 2 ' >>の/ etc /はfstabに
マウント -a &&マウント
  • ブートを設定し、3台のサーバで以下のコマンドを実行してglusterfsを開始
上の#chkconfigをするglusterd 
#のglusterd
  • MASTER1上で以下のコマンドを実行し、ピアを追加
#glusterピアプローブglusterfs-1.example.com 
#glusterピアプローブglusterfs-2.example.com
#glusterピアプローブglusterfs-3.example.com #glusterピア・ステータス
  • MASTER1、サイズ5Gにボリュームを作成して開始
glusterボリュームがボリューム-5Gのレプリカを作成する3 glusterfs1   .example.comの:/データ/ブリック/ glusterfs1 glusterfs2 .example.comの:/データ/ブリック/ glusterfs2 glusterfs3 .example.comの:/データ/レンガ/ glusterfs3 
glusterボリューム開始ボリューム -5G

ボリュームを表示するには、以下のコマンドを使用します。

glusterボリュームのステータス
glusterボリューム情報

詳細については、複製されたモードのコンテナ環境を推奨してご覧ください公式ドキュメントを、パターンの一部に放棄されている注意を払います

  • クライアントマシンのクライアントglusterfsにインストールされています
#yumをglusterfs-クライアントをインストール-y
  • クライアントでサーバボリュームをマウントし、第一の方法は、マウントするNFSを使用している、とglusterfsを用いて第2のコマンドラインは、同じ効果をマウント
マウント-t glusterfs glusterfs- 1 .example.comの:/体積-5G /データ/ mounttest / 
glusterfs --volfile-ID =体積5G --volfileサーバ= glusterfs- 1 .example.comの/データ/ glusterfsclient

 

PS:

  • glusterコマンドラインはで見つけることができる公式ドキュメント
  • エラーは、ボリュームのアドオンを削除するときに発生する可能性があるなど、環境をクリーンアップするために以下の方法を使用します。「/データ/レンガ/ glusterfs1は、すでに一部のエラーです」
#RM -rf /data/brick/glusterfs1/.glusterfs/ 
#setfattr -x trusted.glusterfs.volume-ID /データ/ブリック/ glusterfs1 /

参考:

https://www.cnblogs.com/jicki/p/5801712.html

https://www.ibm.com/developerworks/cn/opensource/os-cn-glusterfs-docker-volume/index.html

https://jimmysong.io/kubernetes-handbook/practice/using-glusterfs-for-persistent-storage.html

おすすめ

転載: www.cnblogs.com/charlieroro/p/11204250.html