Skip to content

Commit

Permalink
doc: describe how to enlarge btrfs volumes
Browse files Browse the repository at this point in the history
This might be handy;  while on it, I'm removing the part that relates to
resizing backend volume (we now have RAID10 volume, and a separate doc).
  • Loading branch information
praiskup authored and FrostyX committed Jun 19, 2023
1 parent e65fef0 commit 5e4bc85
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 27 deletions.
26 changes: 0 additions & 26 deletions doc/enlarge_disk_copr_be.rst

This file was deleted.

45 changes: 45 additions & 0 deletions doc/enlarge_volumes.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
.. _enlarge_volumes:

How to enlarge disk partitions
==============================

This document describes how to enlarge Fedora Copr infrastructure volumes hosted
in AWS.


How to enlarge btrfs non-data partitions
----------------------------------------

At some point, Fedora Cloud images moved to btrfs and we inherited those. From
time to time we need to enlarge `/` partition, or alike. We don't do
"snapshots" in this part becase we don't treat the critical (data) volumes.

1. `Login to AWS`_, find the volume in question, and enlarge accordingly
2. SSH to the corresponding machine, and run something like::

[root@copr-fe copr-frontend][PROD]# growpart /dev/nvme0n1 5
CHANGED: partition=5 start=2265088 old: size=102592479 end=104857567 new: size=144535519 end=146800607

[root@copr-fe copr-frontend][PROD]# btrfs filesystem resize max /
Resize device id 1 (/dev/nvme0n1p5) from 48.92GiB to max


How to enlarge other partititions
---------------------------------

1. `Login to AWS`_, find the volume in question
2. In case something goes wrong, you may create a snapshot with the same tags
the volume already has (see instructions in AWS Tips-and-Tricks). Name it so
that the snapshot can then be distinguished from the others, because after
enlarging the disk it will be deleted. Note that creating the snapshot can
take quite some time.
3. Enlarge the volume accordingly (may take hours, if we speak about TBs)
4. SSH to the VM, and run something like::

$ nvme reset /dev/nvme1 # NOTE! we don't have to do this anymore, check lsblk
$ growpart /dev/nvme1n1 1
$ resize2fs /dev/nvme1n1p1

5. Delete the snapshot from step 2, if any.

.. _`Login to AWS`: https://id.fedoraproject.org/saml2/SSO/Redirect?SPIdentifier=urn:amazon:webservices&RelayState=https://console.aws.amazon.com
2 changes: 1 addition & 1 deletion doc/maintenance_documentation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ This section contains information about maintenance topics. You may also be inte
:maxdepth: 1

aws_tips_and_tricks
enlarge_disk_copr_be
enlarge_volumes
raid_on_backend
backup_recovery

Expand Down

0 comments on commit 5e4bc85

Please sign in to comment.