Samba 3.2 のクラスタ機能検証手順

提供:Samba-JP
2008年10月5日 (日) 15:38時点におけるMonyo (トーク | 投稿記録)による版
ナビゲーションに移動検索に移動

Samba 3.2 系列の新機能の一つにクラスタ機能があります。

以下、Debian 開発版(コードネーム lenny)を用いた、クラスタ機能の検証手順を解説します。

なお、lenny を用いた理由は、検証に必要なパッケージがすべてデフォルトで用意されているためです。

iscsi ターゲットの作成

クラスタ機能を利用するには、共有ディスクが必要です。

Samba のクラスタ機能は、共有ディスクの実装に依存しませんが、比較的手軽にできる共有ディスクとして、ここでは iscsi のターゲットを動作させることにします。

以下、 base-system のインストールのみを行った lenny を前提として手順を紹介します。

  • telnetd のインストール
リモートマシンから設定を行うため、「telnetd」をインストールしました。なお ssh にしなかったのは、インストールするパッケージを最低限にしたかったためです。
iscsi1:~# apt-get install telnetd
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  openbsd-inetd
The following NEW packages will be installed:
  openbsd-inetd telnetd
0 upgraded, 2 newly installed, 0 to remove and 101 not upgraded.
Need to get 0B/75.5kB of archives.
After this operation, 238kB of additional disk space will be used.
Do you want to continue [Y/n]?
Selecting previously deselected package openbsd-inetd.
(Reading database ... 11668 files and directories currently installed.)
Unpacking openbsd-inetd (from .../openbsd-inetd_0.20080125-1_i386.deb) ...
Selecting previously deselected package telnetd.
Unpacking telnetd (from .../telnetd_0.17-36_i386.deb) ...
Processing triggers for man-db ...
Setting up openbsd-inetd (0.20080125-1) ...
Stopping internet superserver: inetd.
Not starting internet superserver: no services enabled.
Setting up telnetd (0.17-36) ...
Adding user telnetd to group utmp
  • 作業用ユーザの作成
telnetでログインするために、「local」というユーザーを作成しました。
iscsi1:~# useradd -u 501 -m local
iscsi1:~# passwd local
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
  • ホスト名の設定
ここではホスト名を「iscsi1」に設定しました。
echo iscsi1 > /etc/hostname
  • IP アドレスの設定
検証だけなら DHCP でも動作しますが、ここでは一応 192.168.135.20 というアドレスを付与しました。
 # The loopback network interface
 auto lo
 iface lo inet loopback
 
 # The primary network interface
 auto eth0
 #iface eth0 inet dhcp
 iface eth0 inet static
         address 192.168.135.20
         netmask 255.255.255.0
         network 192.168.135.0
       broadcast 192.168.135.255
         gateway 192.168.135.2
  • パッケージのインストール