diff --git a/doc/enlarge_disk_copr_be.rst b/doc/enlarge_disk_copr_be.rst deleted file mode 100644 index 61adf34f0..000000000 --- a/doc/enlarge_disk_copr_be.rst +++ /dev/null @@ -1,26 +0,0 @@ -.. _enlarge_disk_copr_be: - -How to enlarge disk on copr-be -============================== - -1. Login to Amazon AWS [amazon-aws] (`us-east-1` region) and go to EC2 -2. Open volumes from the left menu -3. Filter `copr-be-prod` -4. In case something goes wrong, 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 about - one hour. -5. After creating a snapshot, right-click on `copr-be-prod` and click on `Modify Volume` -6. In the size field, write how big you want the volume to be -7. After the enlargement is done (this may take several hours if we speak about TB) -8. Run:: - - [comment]: # (nvme reset /dev/nvme1 - we don't have to do this anymore) - growpart /dev/nvme1n1 1 - resize2fs /dev/nvme1n1p1 - -9. Delete the snapshot from step 4 - - -[amazon-aws]: https://id.fedoraproject.org/saml2/SSO/Redirect?SPIdentifier=urn:amazon:webservices&RelayState=https://console.aws.amazon.com diff --git a/doc/enlarge_volumes.rst b/doc/enlarge_volumes.rst new file mode 100644 index 000000000..6ec8930f9 --- /dev/null +++ b/doc/enlarge_volumes.rst @@ -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 diff --git a/doc/maintenance_documentation.rst b/doc/maintenance_documentation.rst index 0ea5e17dc..d0e3eee91 100644 --- a/doc/maintenance_documentation.rst +++ b/doc/maintenance_documentation.rst @@ -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