Skip to content

Commit

Permalink
docs: how to enlarge copr-backend storage
Browse files Browse the repository at this point in the history
Closes: #2938
  • Loading branch information
praiskup committed Oct 26, 2023
1 parent c24a0f3 commit 57c9c97
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions doc/raid_on_backend.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,52 @@ Attaching volume
There's a `ansible configuration`_ for this, and `list of volumes`_.


Adding more space
-----------------

1. Create two ``gp3`` volumes in EC2 of the same size and type, tag them with
``FedoraGroup: copr``, ``CoprInstance: production``, ``CoprPurpose:
infrastructure``. Attach them to a freshly started temporary instance (we
don't want to overload I/O with the initial RAID sync on production backend!)
Make sure the instance has enough EBS throughput to perform the initial sync
quickly enough.

2. Always partition the disk with a single partition, otherwise kernel might
have troubles to auto-assemple the disk arrays::

cfdisk /dev/nvmeXn1
cfdisk /dev/nvmeYn1

3. Create the ``raid1`` array on both the new **partitions**::

$ mdadm --create --name=raid-be-03 --verbose /dev/mdXYZ --level=1 --raid-devices=2 /dev/nvmeXn1p1 /dev/nvmeYn1p1

Wait till the new array is synchronized (may take hours or days). Check the
details with ``mdadm -Db /dev/md/raid-be-03``. See the tips bellow how to
make the sync speed unlimited with ``sysctl``.

.. note::

In case the disk is marked "readonly", you might need
the ``mdadm --readwrite /dev/md/raid-be-03`` command.

4. Place the new ``raid1`` array into the volume group as a new physical
volume (vgextend does pvcreate automatically)::

$ vgextend copr-backend-data /dev/md/raid-be-03

5. Extend the logical volume to span all the free space::

$ lvextend -l +100%FREE /dev/copr-backend-data/copr-backend-data

6. Resize the underlying ``ext4`` filesystem (takes 15 minutes and more!)::

$ resize2fs /dev/copr-backend-data/copr-backend-data

7. Switch the volume types from ``gpp3`` to ``sc1``, we don't need the power of
``gp3`` for backend purposes.


Other tips
----------

Expand Down

0 comments on commit 57c9c97

Please sign in to comment.