DRBD – Getting started [対訳]

DRBD – Getting started(http://www.drbd.org/drbd8-howto.html) の対訳。

誤訳がありましたらコメントにてご指摘ください。

次: DRBD – Migrating DRBD resources [対訳]
Installation

インストール

If you install via tarball, you want to read the README and INSTALL notes first.

もし tarball からインストールしたいのであれば、 README と INSTALL を最初に読んだ方がよい。

You want to also read the upgrade*.txt files in the drbd src directory, or online in the drbd subversion repository.

また、 drbd ソースディレクトリかオンラインの drbd subversion リポジトリに存在する upgrade*.txt ファイル群も読んだ方がよい。

Along with the DRBD tarball or your installed DRBD package, you should find a well commented example configuration file. In the tarball this is in ./scripts/drbd.conf, in installed binary packages it most likely ends up in /usr/share/doc/drbd, /usr/share/doc/packages/drbd, or similar.

DRBD の tarball もしくはインストールされた DRBD パッケージと一緒に、たくさんコメントが書かれた設定ファイル例を見つけられるだろう。 tarball の場合 ./scripts/drbd.conf に、バイナリパッケージでインストールした場合はたいてい /usr/share/doc/drbd とか /usr/share/doc/packages/drbd とかにある。

You edit that to your needs, copy it to /etc/drbd.conf on both nodes, and check that the meta-disk points to the right location.

必要に応じてそのファイルを編集し、両方のノードに /etc/drbd.conf としてコピーし、 meta-disk が正しい場所を向いているか確認する。

DRBD meta data

DRBD のメタデータ

DRBD allows you to either place its meta data on the same backing device where it puts the actual usable production data (internal meta data), or on a separate block device (external meta data). Before DRBD 8, the space required for DRBD meta data was fixed at 128MB, regardless of device size. Starting with DRBD 8, you may refer to this table for estimates of DRBD meta data sizes:

DRBD ではデータを格納するデバイス上にメタデータを同居させる方法(内部メタデータ)と、別のデバイスに分ける方法(外部メタデータ)のどちらかの方法でメタデータを格納出来る。 DRBD 8 以前では、DRBD メタデータに要求されるスペースはデバイスのサイズに関わらず 128MB に固定されていた。 DRBD 8 からは、DRBD メタデータのサイズは以下のテーブルから見積もることができる。

Block device size DRBD meta data
1 GB 2 MB
100 GB 5 MB
1 TB 33 MB
4 TB 128 MB

Make sure you don’t direct DRBD to write its meta data to a place where you already have existing data you still need. Also, if you are using internal meta data on an existing block device with a file system on it, make sure you shrink that file system first!

まだ必要としているデータが存在している場所に対して DRBD がメタデータを書き込まないように注意しよう。また、すでにファイルシステムを持っているブロックデバイスで内部メタデータを使用する場合は、はじめにファイルシステムを圧縮している(縮めている)ことを確認すること。

Bringing up your DRBDs

DRBD を立ち上げる

Now that we have that drbd.conf, copy it to /etc/drbd.conf on both nodes. Then, on both nodes, do a drbdadm up all. It should come up as both nodes Secondary and Inconsistent.

drbd.conf が出来たら、両方のノードに /etc/drbd.conf としてコピーする。そしたら両方のノードで drbdadm up all を実行する。両方ともセカンダリかつ不整合として起動するはず。

The latter is because the underlying storage is not yet synchronized, and DRBD has no way of knowing whether you want the initial sync from left-to-right, or right-to-left. So you have to tell it. If you have no data in the underlying block devices, it does not matter. But if you have an existing filesystem on the lower level device, and now you sync in the wrong direction, you’d need to get your latest backup ready afterwards…

なんでそうなるか。それはストレージがまだ同期されていないからで、その上 DRBD は右から左に同期すべきなのか、それとも左から右なのか、あなたが最初の同期をどちらにしたいのか知る方法がないから。なのでそれを教えてあげなければならない。もしなにもデータを持っていないブロックデバイスで構成しているのであれば、それはどうでもいいことだろう。しかしすでに構成するデバイスがファイルシステムを持っていて、仮に間違った方向に同期してしまったなら、あなたは最新のバックアップデータの準備をしなければならなくなるだろう。

Performing the initial device synchronization

最初のデバイス同期の実行

You choose which node shall become Primary for the first time (the one with the good data, if you have some), then you do drbdadm — –overwrite-data-of-peer primary all. The result is a full synchronization of the underlying devices (we call this the initial full sync).

まず最初にプライマリになってほしいノード(もしデータがある状態なら条件の良いデータを持っている方)を選択する。そして drbdadm — -overwrite-data-of-peer primary all を実行する。結果としてデバイスの完全な同期がとられる(これを初期フル同期と呼ぶ)。

The device is usable right away, so if you have no file system already, you should create one now.

実行後すぐにデバイスは利用可能になる。もしファイルシステムがない状態なら作ることが出来る。

Change from versions prior to DRBD 8

DRBD 8 からの変更されたこと

Prior to DRBD 8, what is now the –overwrite-data-of-peer option used to be –do-what-I-say. We changed the option because we found out that people mistakenly believed –do-what-I-say could be used to force any drbdadm command, regardless of its implications.

DRBD 8 から –do-what-I-say のために –overwrite-data-of-peer が利用される。このオプションを変更した理由は、その実装にも関わらず –do-what-I-say がすべての drbdadm コマンドを強制することに使えると勘違いする人たちがいることに気づいたからだ。

次: DRBD – Migrating DRBD resources [対訳]

Comments are closed.