Search Our Database
How to extend partition for Linux Server
Introduction
As your system data grows over time, system administrators and server users need to expand disk space to prevent server downtime and service disruptions on IPServerOne Linux servers. This guide explains how to safely extend an existing partition and resize the filesystem directly within your operating system environment. By using standard Linux terminal utilities on your Debian-based or RHEL-based machine, you can allocate unassigned disk space and expand your storage capacity on-demand without losing existing files.
Prerequisite
- Access to the Linux server via SSH terminal or VNC console
- Root privileges or a user account with full sudo access
- Basic knowledge of Linux command-line operations
Step-by-step guide
Step 1: Access the instance vis SSH
- Log in to your Linux server via SSH as root or a user with sudo privileges – [How to login to your Linux Server via SSH]
Step 2: Extending the partition
Debian-based Linux (Ubuntu / Debian)
Extending partitions on Debian-based systems typically utilizes growpart to expand the partition table followed by resize2fs to resize the ext4 file system online.
RHEL-based Linux (AlmaLinux / Rocky Linux)
RHEL-based distributions commonly utilize the XFS file system. The partition expansion is handled using growpart and increased using xfs_growfs.
Step 3: Verified the changes
- Confirm that the extra space is recognized by the file system.
df -h
Conclusion
By following this guidance, you can successfully extend the partition for your Linux server across Debian-based or RHEL-based distributions without disrupting existing server files.
For additional assistance or if you encounter any issues, please contact our support team at support@ipserverone.com.