|
ニュース検索
ピックアップ
今週のIT求人情報
|
2003年6月20日 00:00
Linux 用 Coda 分散ファイルシステム――5Coda サーバーの設定
Coda サーバーの設定は、同じような分散ファイルシステムサーバーの設定に比べると、 非常に簡単だ。 なぜなら、Coda サーバーのパッケージには、 必要な情報をすべてプロンプトするシェルスクリプトがあるからだ。 このセクションではスクリプトを実行する前に、 サーバーがエクスポートしたデータを Coda が保存するのに使うディスクパーティションをフォーマットし、 マウントしなければいけない。 これは、標準の ext2 パーティションにすべきだろう。 ジャーナルファイルシステムに対する書き込みはトランザクションの特性で同期化の問題が発生する恐れがあるため、 Coda サーバーのデータは、 ext3 などのようなジャーナルファイルシステムのパーティションにホスティングすべきではない。 分散ファイルシステムデータパーティション用の標準の Coda(および AFS)変換では、 データは /vicepa(vice パーティション A)、/vicepb(vice パーティションB)などにマウントするのが普通だ。 vice は、Coda の親プロジェクトである AFS が元々使っていた分散ファイルシステムの名称だ。 Coda のデータを格納するパーティションに加え、 ログ用にファイルまたはパーティションを2つ指定する必要がある。 Coda は、そのうちのひとつにログ情報を、 もうひとつにログメタデータ(ログデータのサマリー)を格納する。 Coda サーバーを実稼動に使うつもりなら、 ファイルよりパーティションを使ったほうが優れたパフォーマンスが得られる。 このセクションの例では、わかりやすくするためにファイルを使い、 この目的のために作成した /usr/coda/logs ディレクトリにファイルを格納した。 以下は、Coda のvice セットアップスクリプトを起動する全トランスクリプトだ。 読みやすくするため、スクリプトに対するレスポンスは赤 にした。 ここでは、エンターキーを押せばデフォルト値が設定される箇所も含め、 プロンプトにはすべて回答を明示した。 コメントは標準テキスト形式でちりばめられ、 スクリプトへの入出力は verbatim テキスト形式で表示されている。 vice-setup Welcome to the Coda Server Setup script! Setting up config files for a coda server. Do you want the file /etc/coda/server.conf created? [yes] yes What is the root directory for your coda server(s)? [/vice] /vice Setting up /vice. Directories under /vice are set up. Is this the master server, aka the SCM machine? (y/n) y Setting up tokens for authentication. The following token must be identical on all servers. Enter a random token for update authentication : foobar The following token must be identical on all servers. Enter a random token for auth2 authentication : foobar The following token must be identical on all servers. Enter a random token for volutil authentication : foobar tokens done! 最初の(この例では唯一の)Coda サーバーが通常マスターサーバーだ。 マスターサーバーは Coda クライアントにボリュームの位置、その他の情報を与える。 Coda がさまざまな種類の認証に使用するランダムトークン(上記例では「foobar」)としてユーザーが入力するテキストストリングは、 どんな文字列でもいい。 Setting up the file list for update client Filelist for update ready. /etc/services already has new services registered! Good. /etc/services ready for Coda Now installing files specific to the SCM... Setting up servers file. Enter an id for the SCM server. (hostname distfs) The serverid is a unique number between 0 and 255. You should avoid 0, 127, and 255. serverid: 1 done! Initializing the VSGDB to contain the SCM as E0000100 /vice/db/VSGDB set up Setting up ROOTVOLUME file Enter the name of the rootvolume (< 32 chars) : codaroot サーバー ID 番号とルートボリューム名は好きなものにできる。 出荷時の Coda の設定では、 通常標準的な数字と名前を使っている。 Setting up users and groups for Coda You need to give me a uid (not 0) and username (not root) for a Coda System:Administrator member on this server, (sort of a Coda super user) Enter the uid of this user: 666 Enter the username of this user: codaroot Going to rebuild the protection databases moving /vice/db/prot_users.db to /vice/db/prot_users.db.old moving /vice/db/prot_index.db to /vice/db/prot_index.db.old An initial administrative user codaroot (id 666) with Coda password changeme now exists. このセクションで指定する UID(ユーザーID)とユーザー名は、 実際に存在する Linux ユーザーでなくていい。 これらは、Coda 認証メカニズム内で使うものだ。 Coda システム管理者として指定したユーザー名は覚えておく必要がある。 アカウントの作成、システム管理者が所有する Coda ファイルシステムの一部での ACL の設定といった特権的な操作を行うときはいつでも、 システム管理者として認証される必要があるからだ。 A server needs a small log disk partition, preferably on a disk by itself. It also needs a metadata partition of approx 4% of your filespace. For trial purposes you may give ordinary files instead of raw partitions. Keep all size small if you do this. Production servers will want partitions for speed. --------------------------- WARNING: you are going to play with your partitions now. verify all answers you give. --------------------------- WARNING: these choices are not easy to change once you are up and running. Are you ready to set up RVM? [yes/no] yes What is your log partition? /usr/coda/logs/log_disk_file.log The log size must be smaller than you log partition. We recommend not more than 30M log size, and 2M is a good choice. What is your log size? (enter as e.g. ’2M’) 2M What is your data partition (or file)? /usr/coda/logs/data_disk_file.log The data size must be approx 4% of you server file space. We have templates for servers of approx: 500M, 1G, 2.2G, 3.3G, 8G (you can store less, but not more on such servers). The corresponding data sizes are 22M, 44M, 90M, 130M, 315M. Pick one of the defaults, otherwise I will bail out What is the size of you data partition (or file) [22M, 44M, 90M, 130M, 200M, 315M]: 22M ----------------------------- WARNING: DATA and LOG partitions are about to be wiped. log area: /usr/coda/logs/log_disk_file.log, size 2M. data area: /usr/coda/logs/data_disk_file.log, size 22M. Proceed, and wipe out old data? [y/n] y LOG file has been initialized! Rdsinit will initialize data and log. This takes a while. rvm_initialize succeeded. Going to initialize data file to zero, could take awhile. done. rds_zap_heap completed successfully. rvm_terminate succeeded. RVM setup is done! 前のセクションでは、Coda が内部ステータス情報を格納すべき場所を指定している。 それは、ファイルまたは既存のディスクパーティション、どちらでもいい。 出荷時の Coda 環境では、ログデータと Coda トランザクションメタデータ (Coda のデータ転送、照合、ファイルステータスなど内部で回復可能なバーチャルメモリ情報)は、 パフォーマンス向上のためにディスクパーティションに格納するようになっている。 実験では、通常パーティションではなく、ファイルを使う。 Your server directories will hold the files (not directories). You can currently only have one directory per disk partition. Where shall we store your file data [/vicepa]? /vicepa Shall I set up a vicetab entry for /vicepa (y/n) y Select the maximum number of files for the server. [256K, 1M, 2M, 16M]: 16M Server directory /vicepa is set up! このセクションの始めで説明したように、 このセクションで指定するパーティションは、 Coda サーバーのセットアップスクリプトを起動させる前に作成し、 マウントしておく必要がある。 Congratulations: your configuration is ready...and now to get going do the following: start the auth2 server as: auth2 start rpc2portmap as: rpc2portmap start updatesrv as: updatesrv start updateclnt as: updateclnt -h distfs.vonhagen.org start the fileserver: startserver & wait until the server is up: tail -f /vice/srv/SrvLog create your root volume: createvol_rep codaroot E0000100 /vicepa setup a client: venus-setup distfs.vonhagen.org 20000 start venus: venus enjoy Coda. for more information see http://www.coda.cs.cmu.edu. Coda サーバーのセットアップスクリプトからの最後のメッセージでは、 Coda サーバーの設定が完了した後に、 実際にサーバーを開始するには何をしなければならないかが説明されている。 このセクションで言及したアプリケーションはすべて、 Coda サーバーパッケージ一部として /usr/sbin ディレクトリにインストールされ、 このディレクトリはルートユーザーのパス内に置かれ、 絶対パス名でなくても参照することができる。 以下は、Coda に必要なプロセスを開始するトランスクリプトだ。 /usr/sbin/auth2 /usr/sbin/rpc2portmap /usr/sbin/updatesrv /usr/sbin/updateclnt -h distfs.vonhagen.org Creating /vice/spool startserver & v[2] 15112 updateclnt コマンドの引数として指定するホスト名は、 この Coda サーバーをインストールしているホスト名でなければいけない。 updateclnt サーバーはファイルサーバー間のシステムバイナリを同期し、 マシンを制御している。 この場合、両方とも同じなので概念上は必要ないが、 それでもシステムから要求される。 Coda サーバーに命を吹き込むのにあとひとつ必要なのは、 Coda データ用にとっておいたパーティションに、 読み/書き Coda ボリュームを実際にコピーすることだ。 以下は、そのためのコマンドと出力の例だ。 Coda サーバーのセットアップスクリプトの最終出力で指定されたとおりに、 正確にコマンドを入力しなければならない。 インストール処理中に指定した値をコマンドが使用するからだ。 createvol_rep codaroot E0000100 /vicepa Getting initial version of /vice/vol/BigVolumeList. V_BindToServer: binding to host distfs.vonhagen.org GetVolumeList finished successfully V_BindToServer: binding to host distfs.vonhagen.org Servers are (distfs ) HexGroupId is 7f000000 creating volume codaroot.0 on distfs (partition /vicepa) V_BindToServer: binding to host distfs.vonhagen.org V_BindToServer: binding to host distfs.vonhagen.org Set Log parameters Fetching volume lists from servers: V_BindToServer: binding to host distfs.vonhagen.org GetVolumeList finished successfully distfs - success V_BindToServer: binding to host distfs.vonhagen.org VLDB completed. <echo codaroot 7f000000 1 1000001 0 0 0 0 0 0 0 E0000100 >> /vice/db/VRList.new> V_BindToServer: binding to host distfs.vonhagen.org VRDB completed. Do you wish this volume to be Backed Up (y/n)? [n] n この時点では、Coda サーバーは起動するが、 Coda クライアントはまだサーバーに接続する方法を知らない。 Coda クライアントは、どのマスターサーバーが、自分が関連している管理ドメインを制御しているのか知る必要がある。 次回は、Coda クライアントがサーバーと通信できるように変更する方法(インストール方法についてはこの記事の始めに説明した)を説明する。 次回は Coda クライアントと Coda サーバーの接続 »
新着ニュース・コラム ホワイトペーパー
|
注目のトピックス 話題の記事
カラオケ「JOYSOUND」に新機種、ギター演奏やコラボ動画でバンド活動ができるように
「ピース」サインはギリシャでは侮辱の仕草―トリップアドバイザー「外国でやってはいけないハンドサイン」
目の疲れや肩こり・腰痛、その原因は PC やスマホが発する“ブルーライト”
NIFTY-Serve の「フォーラム」が1年限定で復活
地図サイト「MapFan」、全キャリアの Android・iPhone に対応
⇒一覧を見る
アクセスランキング
最新コラム一覧
|
||||||||||||||||||||