Skip to content

fortis.te.ua

IT блог

Menu
  • Про блог
Menu

How to grow partition in AWS instance

Posted on 24.07.2023 by sirius

Currently 11Gb disk space added but now need to expand partition.

1. First, make sure you have growpart installed. It is usually part of the cloud-guest-utils package. You can install it using the package manager for your Linux distribution. For example, on Debian/Ubuntu-based systems, you can use:

sudo apt-get update 
sudo apt-get install cloud-guest-utils

2. After installing cloud-guest-utils, you can use the growpart command to resize the partition. In your case, you want to resize the first partition (nvme0n1p1) to occupy the available free space on the disk.

sudo growpart /dev/nvme0n1 1

This command will resize the first partition (nvme0n1p1) to use all the available free space on the disk.

3. After you have extended the partition, you need to resize the file system to utilize the new partition size. The command you use will depend on the file system type. Assuming your root partition is formatted as ext4, you can use the following command:

sudo resize2fs /dev/nvme0n1p1

The resize2fs command will resize the ext4 file system to use the entire size of the resized partition.

Result:

Залишити відповідь Скасувати відповідь

Ваша e-mail адреса не оприлюднюватиметься. Обов’язкові поля позначені *

Недавні записи

  • Create swap space on Ubuntu
  • How to grow partition in AWS instance
  • How to create local docker registry
  • Як додати image до JFrog artifactory
  • Доступ до Ubuntu 20.04 по RDP

Останні коментарі

  1. sirius до Інсталяція Zabbix

Архіви

  • Липень 2023
  • Січень 2023
  • Грудень 2022
  • Листопад 2022
  • Жовтень 2022
  • Липень 2022
  • Червень 2022

Категорії

  • AWS
  • BASH
  • Docker
  • Docker
  • GitHub
  • HTTP(s)
  • Jenkins
  • Linux
  • Networking
  • ssh
  • Tools
  • Ubuntu 20.04
  • VSphere
  • Windows
  • Zabbix
  • Без категорії
©2023 fortis.te.ua | Built using WordPress and Responsive Blogily theme by Superb