Install and configure the storage nodes

Install and configure the storage nodes

This section describes how to install and configure storage nodes that operate the account, container, and object services. For simplicity, this configuration references two storage nodes, each containing two empty local block storage devices. The instructions use /dev/sdb and /dev/sdc, but you can substitute different values for your particular nodes.

Although Object Storage supports any file system with extended attributes (xattr), testing and benchmarking indicate the best performance and reliability on XFS. For more information on horizontally scaling your environment, see the Deployment Guide.

Prerequisites

Before you install and configure the Object Storage service on the storage nodes, you must prepare the storage devices.

Note

Perform these steps on each storage node.

  1. Install the supporting utility packages:

    # apt-get install xfsprogs rsync
    
  2. Format the /dev/sdb and /dev/sdc devices as XFS:

    # mkfs.xfs /dev/sdb
    # mkfs.xfs /dev/sdc
    
  3. Create the mount point directory structure:

    # mkdir -p /srv/node/sdb
    # mkdir -p /srv/node/sdc
    
  4. Edit the /etc/fstab file and add the following to it:

    /dev/sdb /srv/node/sdb xfs noatime,nodiratime,nobarrier,logbufs=8 0 2
    /dev/sdc /srv/node/sdc xfs noatime,nodiratime,nobarrier,logbufs=8 0 2
    
  5. Mount the devices:

    # mount /srv/node/sdb
    # mount /srv/node/sdc
    
  6. Edit the /etc/rsyncd.conf file and add the following to it:

    uid = swift
    gid = swift
    log file = /var/log/rsyncd.log
    pid file = /var/run/rsyncd.pid
    address = MANAGEMENT_INTERFACE_IP_ADDRESS
    
    [account]
    max connections = 2
    path = /srv/node/
    read only = false
    lock file = /var/lock/account.lock
    
    [container]
    max connections = 2
    path = /srv/node/
    read only = false
    lock file = /var/lock/container.lock
    
    [object]
    max connections = 2
    path = /srv/node/
    read only = false
    lock file = /var/lock/object.lock
    

    Replace MANAGEMENT_INTERFACE_IP_ADDRESS with the IP address of the management network on the storage node.

    Note

    The rsync service requires no authentication, so consider running it on a private network in production environments.

  1. Edit the /etc/default/rsync file and enable the rsync service:

    RSYNC_ENABLE=true
    
  2. Start the rsync service:

    # service rsync start
    

Install and configure components

Note

Default configuration files vary by distribution. You might need to add these sections and options rather than modifying existing sections and options. Also, an ellipsis (...) in the configuration snippets indicates potential default configuration options that you should retain.

Note

Perform these steps on each storage node.

  1. Install the packages:

    # apt-get install swift swift-account swift-container swift-object
    
  1. Obtain the accounting, container, and object service configuration files from the Object Storage source repository:

    # curl -o /etc/swift/account-server.conf https://git.openstack.org/cgit/openstack/swift/plain/etc/account-server.conf-sample?h=stable/liberty
    # curl -o /etc/swift/container-server.conf https://git.openstack.org/cgit/openstack/swift/plain/etc/container-server.conf-sample?h=stable/liberty
    # curl -o /etc/swift/object-server.conf https://git.openstack.org/cgit/openstack/swift/plain/etc/object-server.conf-sample?h=stable/liberty
    
  2. Edit the /etc/swift/account-server.conf file and complete the following actions:

    • In the [DEFAULT] section, configure the bind IP address, bind port, user, configuration directory, and mount point directory:

      [DEFAULT]
      ...
      bind_ip = MANAGEMENT_INTERFACE_IP_ADDRESS
      bind_port = 6002
      user = swift
      swift_dir = /etc/swift
      devices = /srv/node
      mount_check = true
      

      Replace MANAGEMENT_INTERFACE_IP_ADDRESS with the IP address of the management network on the storage node.

    • In the [pipeline:main] section, enable the appropriate modules:

      [pipeline:main]
      pipeline = healthcheck recon account-server
      

      Note

      For more information on other modules that enable additional features, see the Deployment Guide.

    • In the [filter:recon] section, configure the recon (meters) cache directory:

      [filter:recon]
      use = egg:swift#recon
      ...
      recon_cache_path = /var/cache/swift
      
  3. Edit the /etc/swift/container-server.conf file and complete the following actions:

    • In the [DEFAULT] section, configure the bind IP address, bind port, user, configuration directory, and mount point directory:

      [DEFAULT]
      ...
      bind_ip = MANAGEMENT_INTERFACE_IP_ADDRESS
      bind_port = 6001
      user = swift
      swift_dir = /etc/swift
      devices = /srv/node
      mount_check = true
      

      Replace MANAGEMENT_INTERFACE_IP_ADDRESS with the IP address of the management network on the storage node.

    • In the [pipeline:main] section, enable the appropriate modules:

      [pipeline:main]
      pipeline = healthcheck recon container-server
      

      Note

      For more information on other modules that enable additional features, see the Deployment Guide.

    • In the [filter:recon] section, configure the recon (meters) cache directory:

      [filter:recon]
      use = egg:swift#recon
      ...
      recon_cache_path = /var/cache/swift
      
  4. Edit the /etc/swift/object-server.conf file and complete the following actions:

    • In the [DEFAULT] section, configure the bind IP address, bind port, user, configuration directory, and mount point directory:

      [DEFAULT]
      ...
      bind_ip = MANAGEMENT_INTERFACE_IP_ADDRESS
      bind_port = 6000
      user = swift
      swift_dir = /etc/swift
      devices = /srv/node
      mount_check = true
      

      Replace MANAGEMENT_INTERFACE_IP_ADDRESS with the IP address of the management network on the storage node.

    • In the [pipeline:main] section, enable the appropriate modules:

      [pipeline:main]
      pipeline = healthcheck recon object-server
      

      Note

      For more information on other modules that enable additional features, see the Deployment Guide.

    • In the [filter:recon] section, configure the recon (meters) cache and lock directories:

      [filter:recon]
      use = egg:swift#recon
      ...
      recon_cache_path = /var/cache/swift
      recon_lock_path = /var/lock
      
  5. Ensure proper ownership of the mount point directory structure:

    # chown -R swift:swift /srv/node
    
  6. Create the recon directory and ensure proper ownership of it:

    # mkdir -p /var/cache/swift
    # chown -R root:swift /var/cache/swift
    
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.