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 адреса не оприлюднюватиметься. Обов’язкові поля позначені *

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

  • Налаштування DHCP клієнта і сервера на cisco роутері
  • Налаштування статичної маршрутизації на маршрутизаторі cisco (Setup static route in cisco routers)
  • Install Loki and start as service.
  • Create swap space on Ubuntu
  • How to grow partition in AWS instance

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

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

Архіви

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

Категорії

  • AWS
  • BASH
  • cisco
  • Docker
  • Docker
  • GitHub
  • HTTP(s)
  • Jenkins
  • Linux
  • Monitoring
  • Networking
  • ssh
  • Tools
  • Trash
  • Ubuntu 20.04
  • VSphere
  • Windows
  • Zabbix
©2024 fortis.te.ua | Built using WordPress and Responsive Blogily theme by Superb