RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 977028 - Root partition does not get resized to the available space
Summary: Root partition does not get resized to the available space
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: guest-images
Version: 6.4
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: 6.5
Assignee: Joey Boggs
QA Contact: Virtualization Bugs
URL:
Whiteboard: node
: 1016787 (view as bug list)
Depends On: 888996 1052486 1078517
Blocks: 1052453 1064970 1100286 1100959
TreeView+ depends on / blocked
 
Reported: 2013-06-22 18:08 UTC by Attila Fazekas
Modified: 2019-01-17 13:06 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1064970 (view as bug list)
Environment:
Last Closed: 2014-10-22 18:42:54 UTC
Target Upstream Version:
Embargoed:
jhenner: needinfo-


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1517308 0 medium CLOSED Images virtual size is unnecessarily big 2021-07-30 08:01:15 UTC
Red Hat Product Errata RHBA-2014:1697 0 normal SHIPPED_LIVE rhel-guest-image enhancement update 2014-10-22 22:42:47 UTC

Internal Links: 1517308

Description Attila Fazekas 2013-06-22 18:08:10 UTC
In an OpenStack environment the root partition and filesystem expected to be resized to the maximum available space at boot time.

The vda size is depends on the the flavor type,
usually up to 160GiB.

rhel-server-x86_64-kvm-6.4_20130130.0-3.qcow2

Comment 2 Perry Myers 2013-08-08 13:53:41 UTC
This doesn't seem like an issue specific to the RHEL qcow2 image.  From the description it seems like it would be an issue specific to how OpenStack/RHOS uses those images.

Can you provide more detail?  Is there something missing from the RHEL qcow2 image that makes the resize in OpenStack fail?

Comment 3 Attila Fazekas 2013-08-09 05:07:15 UTC
Resizing the disk itself is the OpenStack responsibility and it is done.

The filesystem and partition size remains the original size. This resize should be done by the image itself.

This package https://bugzilla.redhat.com/show_bug.cgi?id=916087 has the tool for resizing the image at initrd/initramfs time, before the root filesystem mounted.

Comment 4 RHEL Program Management 2013-10-14 03:18:57 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 5 Wei Shi 2013-12-26 08:11:05 UTC
1. Install dracut-modules-growroot-0.20-0.4.bzr85.el6eng.noarch, depends on cloud-utils-growpart-0.27-9.el6eng.x86_64.
2. mkinitrd --force /boot/initramfs-$(uname -r).img $(uname -r)
3. lsinitrd /boot/initramfs-$(uname -r).img | grep growroot
4. fdisk -l
5. # qemu-img info rhel-guest-image-6.5-20131220.3.x86_64.qcow2 
image: rhel-guest-image-6.5-20131220.3.x86_64.qcow2
file format: qcow2
virtual size: 50G (53687091200 bytes)
disk size: 439M
cluster_size: 65536
# qemu-img resize rhel-guest-image-6.5-20131220.3.x86_64.qcow2 +100G
Image resized.
# qemu-img info rhel-guest-image-6.5-20131220.3.x86_64.qcow2
image: rhel-guest-image-6.5-20131220.3.x86_64.qcow2
file format: qcow2
virtual size: 150G (161061273600 bytes)
disk size: 439M
cluster_size: 65536
6. fdisk -l

Comment 6 Eric Rich 2014-02-03 21:20:05 UTC

*** This bug has been marked as a duplicate of bug 1045242 ***

Comment 10 Jaroslav Henner 2014-05-21 14:47:55 UTC
Without this, we would have to make workarounds to use this image for deploying openstack compute nodes on. This is what our tests are doing and what we think we should do to test the image.

Comment 13 Jaroslav Henner 2014-05-23 07:57:20 UTC
I have VERIFIED this by uploading rhel-guest-image-6.5-20140522.0.x86_64.qcow2
to Openstack Grizzly and booting VM with different flavors, one of 80G, other with 20G disk:

`--> ssh cloud-user.3.2 
[cloud-user@bar ~]$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1        79G  877M   74G   2% /
tmpfs           3,9G     0  3,9G   0% /dev/shm

[cloud-user@bar ~]$  sudo fdisk -l /dev/vda

Disk /dev/vda: 85.9 GB, 85899345920 bytes
255 heads, 63 sectors/track, 10443 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00036382

   Device Boot      Start         End      Blocks   Id  System
/dev/vda1   *           1       10443    83882373+  83  Linux


`--> ssh cloud-user.3.8
[cloud-user@foo ~]$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1        20G  866M   18G   5% /
tmpfs           939M     0  939M   0% /dev/shm

 sudo fdisk -l /dev/vda

Disk /dev/vda: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00036382

   Device Boot      Start         End      Blocks   Id  System
/dev/vda1   *           1        2610    20963801   83  Linux

Comment 14 Jaroslav Henner 2014-05-24 14:21:28 UTC
*** Bug 1016787 has been marked as a duplicate of this bug. ***

Comment 16 yuliu 2014-09-11 05:51:41 UTC
Version:
rhel-guest-image-6.6-20140910.0.x86_64.qcow2

Steps:
1. qemu-img resize $image +10G
2. launch booted image, and check the root partition

# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1        26G  755M   24G   4% /
tmpfs           246M     0  246M   0% /dev/shm

Verified as above.

Comment 18 errata-xmlrpc 2014-10-22 18:42:54 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2014-1697.html


Note You need to log in before you can comment on or make changes to this bug.