-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
doc: describe how to enlarge btrfs volumes
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
Showing
3 changed files
with
46 additions
and
27 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters