swift/doc/source/install/storage-install-ubuntu-debian.rst
Tim Burke cb37d3acd6 docs: Clean up mount options
* Stop specifying logbufs=8; that's the default
* Stop including nodiratime with noatime; the latter implies the former

Nothing wrong with being explicit, I suppose, but may as well keep the
mount options to what we can easily explain: we want noatime because
Swift does not use atime, so we don't want to lose any performance to
tracking atime.

Change-Id: I1e52b4368ad7eb375964eee5132bc50297536355
2020-05-03 00:43:57 -07:00

4.5 KiB

Install and configure the storage nodes for Ubuntu and Debian

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.

This section applies to Ubuntu 14.04 (LTS) and Debian.

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. Find the UUID of the new partitions:

    # blkid
  5. Edit the /etc/fstab file and add the following to it:

    UUID="<UUID-from-output-above>" /srv/node/sdb xfs noatime 0 2
    UUID="<UUID-from-output-above>" /srv/node/sdc xfs noatime 0 2
  6. Mount the devices:

    # mount /srv/node/sdb
    # mount /srv/node/sdc
  7. Create or edit the /etc/rsyncd.conf file to contain the following:

    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.

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

    RSYNC_ENABLE=true
  9. 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
  2. Obtain the accounting, container, and object service configuration files from the Object Storage source repository:

    # curl -o /etc/swift/account-server.conf https://opendev.org/openstack/swift/raw/branch/master/etc/account-server.conf-sample
    # curl -o /etc/swift/container-server.conf https://opendev.org/openstack/swift/raw/branch/master/etc/container-server.conf-sample
    # curl -o /etc/swift/object-server.conf https://opendev.org/openstack/swift/raw/branch/master/etc/object-server.conf-sample
  3. Ensure proper ownership of the mount point directory structure:

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

    # mkdir -p /var/cache/swift
    # chown -R root:swift /var/cache/swift
    # chmod -R 775 /var/cache/swift