Red Hat Training

A Red Hat training course is available for Red Hat OpenStack Platform

4.2. rsyncd の設定

複製が必ず行われるように、まずお使いのファイルシステムの rsyncd を設定してから、Object Storage サービスをインストールして設定します。以下の手順では、各ストレージノードに root ユーザーでログインして実行する必要があります。本手順では、XFS ストレージディスクが少なくとも 2 つ、各ストレージノードにマウントされていることが前提です。

例4.2 2 つの XFS ストレージディスクの/etc/fstab のエントリー例

/dev/sdb1	/srv/node/d1	xfs inode64,noatime,nodiratime	0 0
/dev/sdb2	/srv/node/d2	xfs inode64,noatime,nodiratime	0 0

手順4.1 rsyncd の設定

  1. コントローラーの /etc/hosts ファイルからのアドレスをコピーして、ストレージノードの IP アドレスを追加します。また、すべてのノードに /etc/hosts ファイルの全アドレスが指定されているようにします。
  2. rsync および xinetd パッケージをインストールします。
    # yum install rsync xinetd
  3. テキストエディターで /etc/rsyncd.conf ファイルを開いて以下の行を追加します。
    ##assumes 'swift' has been used as the Object Storage user/group
    uid = swift
    gid = swift
    log file = /var/log/rsyncd.log
    pid file = /var/run/rsyncd.pid
    ##address on which the rsync daemon listens
    address = LOCAL_MGT_NETWORK_IP
    	
    [account]
    max connections = 2
    path = /srv/node/
    read only = false
    write only      = no
    list            = yes
    incoming chmod  = 0644
    outgoing chmod  = 0644
    lock file = /var/lock/account.lock
    
    [container]
    max connections = 2
    path = /srv/node/
    read only = false
    write only      = no
    list            = yes
    incoming chmod  = 0644
    outgoing chmod  = 0644
    lock file = /var/lock/container.lock
    
    [object]
    max connections = 2
    path = /srv/node/
    read only = false
    write only      = no
    list            = yes
    incoming chmod  = 0644
    outgoing chmod  = 0644
    lock file = /var/lock/object.lock

    注記

    複数のアカウント、コンテナー、オブジェクトのセクションを使用することができます。
  4. /etc/xinetd.d/rsync ファイルを開いて、以下の情報を追加します。
    service rsync
     {
         port            = 873
         disable         = no
         socket_type     = stream
         protocol        = tcp
         wait            = no
         user            = root
         group           = root
         groups          = yes
         server          = /usr/bin/rsync
         bind            = LOCAL_MGT_NETWORK_IP
         server_args = --daemon --config /etc/rsync.conf
     }
  5. xinetd サービスを起動して、ブート時に起動するように設定します。
    # systemctl start xinetd.service
    # systemctl enable xinetd.service