Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

4.5. リソース設定のテスト

Samba の設定に成功した場合は、クラスターのノードで Samba 共有をマウントできます。以下の例の手順では、Samba 共有をマウントしています。
  1. クラスターノードの既存のユーザーを smbpasswd ファイルに追加してパスワードを割り当てます。以下の例では、既存のユーザー smbuser を追加しています。
    [root@z1 ~]# smbpasswd -a smbuser
    New SMB password:
    Retype new SMB password:
    Added user smbuser
    
  2. Samba 共有をマウントします。
    [root@z1 ~]# mkdir /mnt/sambashare
    [root@z1 ~]# mount -t cifs -o user=smbuser //198.162.1.151/public /mnt/sambashare
    Password for smbuser@//198.162.1.151/public:  ********
    
  3. ファイルシステムがマウントされているかどうかを確認します。
    [root@z1 ~]# mount | grep /mnt/sambashare
    //198.162.1.151/public on /mnt/sambashare type cifs (rw,relatime,vers=1.0,cache=strict,username=smbuser,domain=LINUXSERVER,uid=0,noforceuid,gid=0,noforcegid,addr=10.37.167.205,unix,posixpaths,serverino,mapposix,acl,rsize=1048576,wsize=65536,echo_interval=60,actimeo=1)
    
Samba の復元を確認するには、以下の手順を行います。
  1. 以下のコマンドを使用して CTDB リソースを手動で停止します。
    [root@z1 ~]# pcs resource debug-stop ctdb
  2. このリソースを停止すると、システムによってサービスが復元されます。pcs status コマンドを使用してクラスターのステータスを確認します。ctdb-clone リソースが開始したことがわかりますが、ctdb_monitor がエラーしたこともわかります。
    [root@z1 ~]# pcs status
    ...
    Clone Set: ctdb-clone [ctdb]
         Started: [ z1.example.com z2.example.com ]
    ...
    Failed Actions:
    * ctdb_monitor_10000 on z1.example.com 'unknown error' (1): call=126, status=complete, exitreason='CTDB status call failed: connect() failed, errno=111',
        last-rc-change='Thu Oct 19 18:39:51 2017', queued=0ms, exec=0ms
    ...
    
    このステータスのエラーを消去するには、クラスターノードの 1 つで以下のコマンドを実行します。
    [root@z1 ~]# pcs resource cleanup ctdb-clone