Sun Cluster Data Service for Samba ガイド (Solaris OS 版)

Sun Cluster HA for Samba のインストールと構成の計画

ここでは、Sun Cluster HA for Samba のインストールと構成の計画について説明します。

構成に関する制限事項

ここでは、Sun Cluster HA for Samba にのみ適用されるソフトウェアとハードウェア構成の制限事項を示します。

すべてのデータサービスに適用される制限事項については、『Sun Cluster Release Notes』を参照してください。


注意 – 注意 –

これらの制限事項を守らないと、データサービスの構成がサポートされない場合があります。



例 1 Samba インスタンスと Winbind (広域ファイルシステムの場合)


# ls -l /usr/local
total 4
drwxrwxrwx   2 root     other        512 Oct  1 16:44 bin
lrwxrwxrwx   1 root     other         13 Oct 11 11:20 samba -> /global/samba
#
# ls -l /global/samba
total 18
drwxr-xr-x   2 root     other        512 Oct 11 15:00 bin
drwxr-xr-x   3 root     other        512 Oct 14 13:49 lib
drwxr-xr-x   6 root     other        512 Oct 11 15:00 man
drwxr-xr-x   2 root     other        512 Oct 14 10:05 private
drwxr-xr-x   7 root     other        512 Oct 14 13:39 SAMBA1
drwxr-xr-x   7 root     other        512 Oct 14 13:40 SAMBA2
drwxr-xr-x   6 root     other        512 Oct 11 15:01 swat
drwxr-xr-x   3 root     other        512 Oct 14 10:45 var
drwxr-xr-x   2 root     other        512 Jan 17 09:28 winbind
#
# more /etc/vfstab (Subset of the output)
/dev/md/dg_d6/dsk/d63   /dev/md/dg_d6/rdsk/d63  /global/samba
           ufs     4       yes     logging,global
#

例 1–1 では、Samba NetBIOS インスタンス SAMBA1 の構成ディレクトリは /global/samba/SAMBA1 です。Samba NetBIOS インスタンス SAMBA2 の構成ディレクトリは /global/samba/SAMBA2 です。 Winbind の構成ディレクトリは /global/samba/winbind です。

例 1–2 は、Samba が Solaris 9 からローカルファイルシステムにインストールされており、フェイルオーバーファイルシステムに 2 つの Samba インスタンス (SMB1 および SMB2) があることを示しています。最後の出力は、Solaris Volume Manager を使用して配備された Samba に対応する /etc/vfstab エントリのサブセットです。


例 2 Samba インスタンス (フェイルオーバーファイルシステムの場合)


# ls -l /local/samba
total 4
drwxr-xr-x   2 root     other        512 Dec 19 15:51 SMB1
drwxr-xr-x   2 root     other        512 Dec 19 15:51 SMB2
#
# more /etc/vfstab (Subset of the output)
/dev/md/dg_d7/dsk/d70   /dev/md/dg_d7/rdsk/d70  /local/samba/SMB1
       ufs     3       no      logging
/dev/md/dg_d8/dsk/d80   /dev/md/dg_d8/rdsk/d80  /local/samba/SMB2
       ufs     3       no      logging
#

例 1–2 では、Samba NetBIOS インスタンス SMB1 の構成ディレクトリは /local/samba/SMB1 です。Samba NetBIOS インスタンス SMB2 の構成ディレクトリは /local/samba/SMB2 です。

構成に関する要件

これらの要件は、Sun Cluster HA for Samba にのみ適用されます。Sun Cluster HA for Samba のインストールと構成を始める前に、次の要件を満たしておく必要があります。


注意 – 注意 –

次の要件を満たさないと、データサービスの構成がサポートされない場合があります。


ADS をサポートする Windows 200x サーバーのメンバーとして Samba をセットアップする必要がある場合、クラスタノードで kerberos を構成し、Ldap と kerberos 両方のサポートを指定して Samba をコンパイルする必要があります。この作業については、Samba のマニュアルを参照してください。

Samba コンポーネントと依存関係 — Sun Cluster HA for Samba データサービスは、Samba インスタンスとそれぞれのコンポーネントを保護するように構成できます。表 1–3 で、各コンポーネントとコンポーネント間の依存関係について簡単に説明します。

表 3 Samba と依存関係 (-> 記号で示す)

コンポーネント 

説明 

Samba (必須)

-> Winbind リソース (Winbind と単一の Samba インスタンスを配備する場合)。詳細は、以下の説明を参照してください。

-> Winbind リソースグループ (Winbind と複数の Samba インスタンスを配備する場合)。詳細は、以下の説明を参照してください。

-> SUNW.HAStoragePlus リソース

SUNW.HAStoragePlus リソースは、Samba のファイルシステムのマウントポイントを管理し、ファイルシステムがマウントされるまでは Samba が起動しないようにします。 

Winbind(任意)

-> SUNW.HAStoragePlus リソース

SUNW.HAStoragePlus リソースは、Winbind のファイルシステムのマウントポイントを管理し、ファイルシステムがマウントされるまでは Winbind が起動しないようにします。 


注 –

Samba コンポーネントの詳細は、smbd(8)nmbd(8)winbindd(8)、および smb.conf(5) のマニュアルページを参照してください。


Winbind を使用する Samba のインスタンスが 1 つだけ構成に含まれる場合、Winbind リソースを Samba リソースと同じリソースグループに登録する必要があります。また、Winbind リソースが Samba リソースと同じ構成ディレクトリを使用するようにしなければなりません。Samba リソースの起動は Winbind リソースに依存するようにしなければなりません。Resource_dependencies については、r_properties(5) のマニュアルページを参照してください。

Winbind を使用する Samba のインスタンスが構成に複数含まれる場合は、Winbind リソースをスケーラブルリソースにして、個別の構成ディレクトリを与え、すべての Samba リソースの起動が Winbind スケーラブルリソースグループに依存するようにしなければなりません。RG_dependencies については、rg_properties(5) のマニュアルページを参照してください。Winbind の構成ディレクトリを広域ファイルシステムとしてマウントする必要があります。

各 Samba コンポーネントは、/opt/SUNWscsmb/xxx/util に構成/登録ファイルがあります。xxx は個々の Samba コンポーネントを表す 3 文字の略語です。これらのファイルによって、Sun Cluster に Samba コンポーネントを登録できます。

これらのファイル内では、適切な依存関係が適用されます。


例 3 Sun Cluster 用の Samba 構成/登録ファイル


# cd /opt/SUNWscsmb
#
# ls -l samba/util
total 6
-rwxr-xr-x   1 root     sys         1526 Dec 20 14:44 samba_config
-rwxr-xr-x   1 root     sys          736 Dec 20 14:44 samba_register
#
# ls -l winbind/util
total 4
-rwxr-xr-x   1 root     sys         1006 Dec 20 14:44 winbind_config
-rwxr-xr-x   1 root     sys          613 Dec 20 14:44 winbind_register
#
# more samba/util/samba_config
::::::::::::::
samba/util/samba_config
::::::::::::::
#
# Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
# 
# This file will be sourced in by samba_register and the parameters
# listed below will be used.
#
# These parameters can be customized in (key=value) form
#
#        RS - name of the resource for the application
#        RG - name of the resource group containing RS
#   SMB_BIN - name of the Samba bin directory
#  SMB_SBIN - name of the Samba sbin directory
#              (If no sbin then specify the bin directory)
#  SMB_INST - name of the Samba configuration directory
#   SMB_LOG - name of the Samba log directory
#               for log.smbd and log.nmbd
#              (If not specified will default
#               to $SMB_INST/logs) 
#SMB_LIB_PATH - name of library paths to LD_LIBRARY_PATH
#    FMUSER - name of the Samba fault monitor user
#    FMPASS - name of the Samba fault monitor user password
#  FMDOMAIN - name of the NT-domain faultmonitor user is configured on.
#             ( This should be used if faultmonitor user is not configured
#               on the same NT-domain Samba is member to )
#        LH - name of the LogicalHostname SC resource
#    HAS_RS - name of the Samba HAStoragePlus SC resource
#
#       The following two examples illustrate sample parameters
#       for Samba packaged with Solaris 9 and Samba downloaded
#       from http://www.samba.org. 
#
#       Please be aware that /global/samba, /global/samba/SAMBA1 and
#       uid/pwd of samba are used just as examples. You will need 
#       change this if your values are different.
#
#       SUNWsmb* packaged with Solaris 9
#
#       SMB_BIN=/usr/sfw/bin
#       SMB_SBIN=/usr/sfw/sbin
#       SMB_INST=/local/samba/SMB1
#       SMB_LOG=/local/samba/SMB1/logs
#       FMUSER=samba
#       FMPASS=samba
#       FMDOMAIN=
#
#       Latest production release from http://www.samba.org
#
#       SMB_BIN=/global/samba/bin
#       SMB_SBIN=/global/samba/sbin or /global/samba/bin
#       SMB_INST=/global/samba/SAMBA1
#       SMB_LOG=/global/samba/SAMBA1/logs
#       FMUSER=samba
#       FMPASS=samba
#       FMDOMAIN=
#

RS=
RG=
SMB_BIN=
SMB_SBIN=
SMB_INST=
SMB_LOG=
SMB_LIB_PATH=/usr/lib:/usr/local/lib
FMUSER=
FMPASS=
FMDOMAIN=
LH=
HAS_RS=
::::::::::::::
# more winbind/util/winbind_config
::::::::::::::
winbind/util/winbind_config
::::::::::::::
#
#
# Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
# This file will be sourced in by samba_register and the parameters
# listed below will be used.
#
# These parameters can be customized in (key=value) form
#
#        RS - name of the resource for the application
#        RG - name of the resource group containing RS
#    WB_BIN - name of the Winbind bin directory
#    WB_SBIN - name of the Winbind sbin directory. Used in Samba 3.
#   WB_INST - name of the Winbind configuration directory
#    NTUSER - name of the NT fault monitor user
#WB_LIB_PATH- name of library paths to LD_LIBRARY_PATH
#WB_DISCACHE - Should winbind cache be disabled. Used in Samba 3.
#WB_SINGLEMODE - Should winbind run in single mode. Used in Samba 3.
#        LH - name of the LogicalHostname SC resource
#    HAS_RS - name of the Winbind HAStoragePlus SC resource
#
#       The following example illustrates sample parameters
#       for the latest production release of Samba downloaded
#       from http://www.samba.org.
#
#
#       Latest production release from http://www.samba.org
#
#       WB_BIN=/global/samba/bin
#       WB_SBIN=/global/samba/sbin
#       WB_INST=/global/samba/winbind
#       NTUSER=samba
#

RS=
RG=
WB_BIN=
WB_SBIN=
WB_INST=
NTUSER=
WB_LIB_PATH=/usr/lib:/usr/local/lib
WB_DISCACHE=FALSE
WB_SINGLEMODE=FALSE
LH=
HAS_RS=

ADS をサポートする Windows 200x サーバーのメンバーとして Samba を設定する必要があり、Samba バイナリが Ldap および kerberos ライブラリと静的にリンクしていない場合、/opt/SUNWscsmb/samba/utils/samba_config の SMB_LIB_PATH パラメータと、/opt/SUNWscsmb/winbind/utils/winbind_config の WB_LIB_PATH を構成して、これらのバイナリが存在するディレクトリを指定する必要があります。

smb.conf ファイル — Sun Cluster HA for Samba データサービスには、サンプルの smb.conf ファイルがあります。以下のパラメータが設定されていることを確認してください。


注 –

smb.conf ファイルは Samba で最も重要なファイルと言えます。smb.conf(5) のマニュアルページを参照し、以下のパラメータの構成に関する詳細を確認してください。Solaris 9 に含まれる Samba のマニュアルページを参照するには SUNWsfman パッケージがインストールされている必要があります。



注 –

ほかの smb.conf エントリを作成し、それらのエントリにパス変数が必要な場合、以後のパス名が関連する Samba または Winbind インスタンスの構成ディレクトリ内で作成されていることを確認する必要があります。