summaryrefslogtreecommitdiff
path: root/install-guide/source/storage-install-ubuntu-debian.rst
blob: a429989dd2a2b89c87d342155b726fb503a89c7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
.. _storage-ubuntu-debian:

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 <http://docs.openstack.org/developer/swift/deployment_guide.html>`_.

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.

#. Install the supporting utility packages:

   .. code-block:: console

      # apt-get install xfsprogs rsync

#. Format the ``/dev/sdb`` and ``/dev/sdc`` devices as XFS:

   .. code-block:: console

      # mkfs.xfs /dev/sdb
      # mkfs.xfs /dev/sdc

#. Create the mount point directory structure:

   .. code-block:: console

      # mkdir -p /srv/node/sdb
      # mkdir -p /srv/node/sdc

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

   .. code-block:: none

        /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

#. Mount the devices:

   .. code-block:: console

      # mount /srv/node/sdb
      # mount /srv/node/sdc

#. Create or edit the ``/etc/rsyncd.conf`` file to contain the following:

   .. code-block:: none

      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.

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

   .. code-block:: none

      RSYNC_ENABLE=true

8. Start the ``rsync`` service:

   .. code-block:: console

      # 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.

#. Install the packages:

   .. code-block:: console

      # 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:

   .. code-block:: console

      # 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/mitaka

3.  .. include:: storage-include1.txt
4.  .. include:: storage-include2.txt
5.  .. include:: storage-include3.txt
6. Ensure proper ownership of the mount point directory structure:

   .. code-block:: console

      # chown -R swift:swift /srv/node

7. Create the ``recon`` directory and ensure proper ownership of it:

   .. code-block:: console

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