5.4 KiB
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.
Install the supporting utility packages:
ubuntu or debian
# apt-get install xfsprogs rsyncrdo
# yum install xfsprogs rsyncobs
# zypper install xfsprogs rsyncFormat the
/dev/sdband/dev/sdcdevices as XFS:# mkfs.xfs /dev/sdb # mkfs.xfs /dev/sdcCreate the mount point directory structure:
# mkdir -p /srv/node/sdb # mkdir -p /srv/node/sdcEdit the
/etc/fstabfile 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 2Mount the devices:
# mount /srv/node/sdb # mount /srv/node/sdcCreate or edit the
/etc/rsyncd.conffile 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.lockReplace
MANAGEMENT_INTERFACE_IP_ADDRESSwith the IP address of the management network on the storage node.Note
The
rsyncservice requires no authentication, so consider running it on a private network in production environments.
ubuntu or debian
Edit the
/etc/default/rsyncfile and enable thersyncservice:RSYNC_ENABLE=trueStart the
rsyncservice:# service rsync start
obs or rdo
Start the
rsyncdservice and configure it to start when the system boots:# systemctl enable rsyncd.service # systemctl start rsyncd.service
Install and configure components
Note
Perform these steps on each storage node.
Install the packages:
ubuntu or debian
# apt-get install swift swift-account swift-container swift-objectrdo
# yum install openstack-swift-account openstack-swift-container \ openstack-swift-objectobs
# zypper install openstack-swift-account \ openstack-swift-container openstack-swift-object python-xml
ubuntu or rdo or debian
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/mitaka # curl -o /etc/swift/container-server.conf https://git.openstack.org/cgit/openstack/swift/plain/etc/container-server.conf-sample?h=stable/mitaka # curl -o /etc/swift/object-server.conf https://git.openstack.org/cgit/openstack/swift/plain/etc/object-server.conf-sample?h=stable/mitakaEnsure proper ownership of the mount point directory structure:
# chown -R swift:swift /srv/nodeCreate the
recondirectory and ensure proper ownership of it:# mkdir -p /var/cache/swift # chown -R root:swift /var/cache/swift # chmod -R 775 /var/cache/swift
obs
Ensure proper ownership of the mount point directory structure:
# chown -R swift:swift /srv/node