Linux Server

Partitionserweiterung via CLI

1. Installation der Tools

Falls die Tools im Rescue-System oder auf dem Minimalsystem fehlen:

Bash

# Debian / Ubuntu
apt update && apt install cloud-guest-utils fdisk -y

2. Durchführung (CLI)

  1. Partitionstabelle erweitern:Angenommen, /dev/vda ist die Disk und Partition 1 soll erweitert werden (beachte das Leerzeichen zwischen Disk und Partitionsnummer):Bashgrowpart /dev/vda 1
  2. Dateisystem vergrößern:
    • Für ext4:Bashresize2fs /dev/vda1
    • Für XFS:(XFS muss gemountet sein, um es zu erweitern)Bashmount /dev/vda1 /mnt xfs_growfs /mnt

Dokumentation & Hilfe


Guide: Partition Expansion via CLI (Cloud/Server Standard)

If no graphical user interface (GUI) is available, this is the professional standard. We use growpart to expand the partition table and resize2fs (ext4) or xfs_growfs (XFS) to resize the filesystem.

1. Tool Installation

If the tools are missing in the rescue system or minimal installation:

Bash

# Debian / Ubuntu
apt update && apt install cloud-guest-utils fdisk -y

2. Execution (CLI)

  1. Expand Partition Table:Assuming /dev/vda is the disk and partition 1 needs expansion (note the space between disk and partition number):Bashgrowpart /dev/vda 1
  2. Resize Filesystem:
    • For ext4:Bashresize2fs /dev/vda1
    • For XFS:(XFS must be mounted to be resized)Bashmount /dev/vda1 /mnt xfs_growfs /mnt

Documentation & Resources

Hinweis zur GParted-Installation: GParted benötigt zwingend einen X-Server (grafische Umgebung). Auf einem Headless-Server ohne GUI macht eine Installation keinen Sinn, da das Programm nicht starten wird. In diesem Fall ist der obige CLI-Weg der einzig korrekte.