procedures:enlargedisk
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| procedures:enlargedisk [2025/03/05 10:51] – created andrea.sala | procedures:enlargedisk [2025/03/05 11:51] (current) – [Extend the file system of EBS volumes] andrea.sala | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== | + | ======= |
| + | |||
| + | ==== Before you begin ==== | ||
| + | |||
| + | * Create a snapshot of the volume, in case you need to roll back your changes. For more information, | ||
| + | * Confirm that the volume modification succeeded and that it is in theoptimizing or completed state. For more information, | ||
| + | * Ensure that the volume is attached to the instance and that it is formatted and mounted. For more information, | ||
| + | * (Linux instances only) If you are using logical volumes on the Amazon EBS volume, you must use Logical Volume Manager (LVM) to extend the logical volume. For instructions about how to do this, see the Extend the LV section in the article [[https:// | ||
| + | |||
| + | ===== Linux instances ===== | ||
| + | < | ||
| + | Note | ||
| + | The following instructions walk you through the process of extending XFS and Ext4 file systems for Linux. For information about extending a different file system, see its documentation. | ||
| + | </ | ||
| + | Before you can extend a file system on Linux, you must extend the partition, if your volume has one. | ||
| + | |||
| + | ==== Extend the file system of EBS volumes ==== | ||
| + | |||
| + | Use the following procedure to extend the file system for a resized volume. | ||
| + | |||
| + | Note that device and partition naming differs for Xen instances and instances built on the Nitro System(https:// | ||
| + | AWS CLI command, and for ' | ||
| + | < | ||
| + | aws ec2 describe-instance-types --instance-type instance_type --query " | ||
| + | </ | ||
| + | A value of nitro indicates that your instance is Nitro-based. A value of xen indicates that your instance is Xen-based. | ||
| + | |||
| + | === To extend the file system of EBS volumes === | ||
| + | |||
| + | 1 Connect to your instance([[https:// | ||
| + | |||
| + | 2 Resize the partition, if needed. To do so: | ||
| + | |||
| + | - Check whether the volume has a partition. Use the lsblk command. | ||
| + | |||
| + | --**Nitro instance example** | ||
| + | In the following example output, the root volume (nvme0n1) has two partitions (nvme0n1p1 and nvme0n1p128), | ||
| + | |||
| + | < | ||
| + | sudo lsblk | ||
| + | </ | ||
| + | --**Xen instance example** | ||
| + | In the following example output, the root volume (xvda) has a partition (xvda1), while the additional volume (xvdf) has no partition. | ||
| + | |||
| + | < | ||
| + | |||
| + | |||
| + | **Troubleshooting tip** | ||
| + | \\ | ||
| + | If you do not see the volume in the command output, ensure that the volume is attached to the instance([[https:// | ||
| + | \\ \\ | ||
| + | -Check whether the partition needs to be extended. In the lsblk command output from the previous step, compare the partition size and the volume size. | ||
| + | If the partition size is smaller than the volume size, continue to the next step. If the partition size is equal to the volume size, the partition can't be extended. | ||
procedures/enlargedisk.1741171872.txt.gz · Last modified: by andrea.sala
