How to Increase Disk Space Size of a Container in OpenVZ

Increase Disk Space in OpenVZ – Pheonix Solutions guide showing OpenVZ container storage allocation and vzctl disk space configuration.

Posted Date: 29 November 2020
Last Updated: 19 November 2026

Introduction

Increase disk space in OpenVZ containers by updating the storage limits assigned to a specific container. OpenVZ provides the vzctl command to manage container settings, including disk space allocation.

When a container requires additional storage, you can identify its container ID, update the disk space limits, and verify the available storage.

In this tutorial, we will explain how to increase disk space in OpenVZ using three simple steps.

Prerequisites

Before increasing disk space in an OpenVZ container, make sure you have:

  • Access to the OpenVZ server.
  • Root or appropriate administrative privileges.
  • The container ID (CTID) for which you want to increase disk space.
  • Basic knowledge of Linux commands.

How to Increase Disk Space in OpenVZ

Step 1: Check the List of Running Containers

The first step to increase disk space in OpenVZ is to identify the container that requires additional storage.

Check the list of all running containers using the following command:

vzlist

This command displays the running containers and their corresponding container IDs.

Review the output and identify the CTID of the container whose disk space you want to increase. You will need this ID in the next step.

Screenshot 1: Insert the original screenshot showing the output of the vzlist command.

Alt text: Increase Disk Space in OpenVZ – running container list showing container IDs using the vzlist command.

Step 2: Increase the OpenVZ Container Disk Space

After identifying the container ID, use the following command to increase its disk space:

vzctl set CTID --diskspace SoftLimit:HardLimit --save

Command explanation:

  • CTID – The container ID number obtained from the vzlist command.
  • SoftLimit:HardLimit – Specifies the required disk space limits.
  • --save – Saves the updated container configuration.

For example, if you want to increase the disk space to 50 GB for container ID 109, use the following command:

vzctl set 109 --diskspace 50G:49G --save

In this example, 109 is the container ID, and 50G:49G represents the specified soft and hard disk space limits.

Replace the example container ID and disk space values with the required values for your container.

Step 3: Verify the Container Disk Space

After updating the disk space configuration, verify the storage information of the selected container.

Run the following command:

vzctl exec CTID df -h

Replace CTID with the container ID you identified in Step 1.

This command executes df -h inside the selected container and displays its disk space information.

Review the output to check the available storage after increasing disk space in OpenVZ.

Conclusion

Increasing disk space in OpenVZ is a straightforward process using the vzctl command. First, identify the required container using vzlist. Next, update its disk space limits using vzctl set. Finally, verify the storage information using vzctl exec CTID df -h.

By following these three steps, you can increase disk space in an OpenVZ container and check its storage information.

Official Documentation

How Pheonix Solutions Can Help

Looking for reliable server management and cloud infrastructure solutions?

Pheonix Solutions provides DevOps, cloud infrastructure, server administration, and container management services to help businesses maintain reliable IT environments.

Our experts can help you manage OpenVZ containers, configure server resources, troubleshoot infrastructure issues, and maintain server performance.

Contact our experts to discuss your requirements.

admin

Our team has expertise across software and web development, WordPress, e-commerce, mobile applications, UI/UX, cloud and infrastructure, DevOps, CI/CD, API integration, security, testing, automation, and technical support. The team also works with AI-based software solutions, LLMs, AI workflows, AI agents, and intelligent application development to help businesses automate processes and build smarter digital solutions. We focus on developing, deploying, maintaining, and optimising secure, scalable, and reliable technology solutions while helping businesses adopt modern technologies and drive digital transformation.

Leave a Comment

Scroll to Top