| | 151 | === Grow Storage === |
| | 152 | Can increase the size of an existing disk. This can be done dynamically (no need to go offline): |
| | 153 | * In AWS console, locate the Volume & Create a Snapshot (just in case you wish to rollback) |
| | 154 | * Modify Volume, set the new size |
| | 155 | * Login to server to resize the filesystem (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recognize-expanded-volume-linux.html): |
| | 156 | {{{ |
| | 157 | # Identify the volumes present & their labels |
| | 158 | file -s /dev/xvd* |
| | 159 | # See old filesystem sizes |
| | 160 | df -h |
| | 161 | # See new volume sizes & check if a partition needs resizing |
| | 162 | lsblk |
| | 163 | # *If* an xvdf1 partition needs extending (no need if the filesystem is just inside a disk xvdf) |
| | 164 | growpart /dev/xvdf 1 |
| | 165 | # Extend the filesystem |
| | 166 | resize2fs /dev/xvdf |
| | 167 | # Confirm that this has taken effect |
| | 168 | df -h |
| | 169 | }}} |