System Status
Buy Now
  • Email & Apps
  • Office 365
Login
  • MyRackspace Portal
  • Cloud Control Panel
  • Rackspace Webmail Login
  • Cloud Office Control Panel
  • Support Home
  • How-To
  • Developer Documentation
  •  Blogs 
    • Expert Insights Tech Blog
    • Rackspace Blog
    • Solve: Thought Leadership

Support Network

End-to-End Multicloud Solutions.   Solving Together.â„¢   Learn more at Rackspace.com

How–To Home

Cloud Servers

  • Introduction
  • FAQ
  • All Articles

Linux device does not show the correct disk space after a resize

Last updated on:  2020-03-24

Authored by:  John Garcia


This article explains why a Linux® root partition might appear unchanged after you resize a server and how to correct the issue.

Disk configuration types

Some Linux images enable you to select one of the following disk configurations when you create a server:

  • Automatic: The default option that formats additional drive space and expands the root partition to fill the entire system disk with a resize.
  • Manual: The option that provides additional customization options for the disk and avoids additional boot process time. This option leaves the root partition unchanged and leaves any additional space unformatted and unpartitioned.

Note: Use the df -h command to view filesystem information, such as Name, Size, Used Space, Available Space, Use Percentage, and Mount.

Sample df -h command output

[root@expanse ~]# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/xvda1       40G  1.7G   36G   5% /

The issue and the solution

With the manual disk configuration, the root partition shows as unchanged after the resize completes. To correct this error, use the following command to perform a file system extension:

resize2fs /dev/xvd<xx>

NOTE: You need to replace the <xx> portion of the command with the appropriate filesystem name, such as /dev/xvda1.

After the command completes, rerun the df -h command to confirm success. You should see output similar to the following:

[root@expanse ~]# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/xvda1       79G  1.7G   74G   3% /

Share this information:

©2020 Rackspace US, Inc.

Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License

See license specifics and DISCLAIMER

About Rackspace
  • About
  • Customer Stories
  • Events
  • Programs
Blogs
  • The Rackspace Blog
  • Expert Insights Tech Blog
  • Solve: Thought Leadership
  • News
  • Contact Information
  • Legal
  • Careers
Site Information
  • Style Guide for Technical Content
  • Trademarks
  • Privacy Statement
  • Website Terms
Support Network
  • Support Network Home
  • Rackspace How-To
  • API Documentation
  • Developer Center
  • ©2020 Rackspace US, Inc.