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 1632777 - Need Support for Cloud Instances That Use LVM-hosted "/"
Summary: Need Support for Cloud Instances That Use LVM-hosted "/"
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: cloud-utils-growpart
Version: 7.6
Hardware: x86_64
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Eduardo Otubo
QA Contact: Huijuan Zhao
URL:
Whiteboard:
Depends On:
Blocks: 1579000
TreeView+ depends on / blocked
 
Reported: 2018-09-25 14:06 UTC by Sandro Bonazzola
Modified: 2020-10-07 11:01 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1343571
Environment:
Last Closed: 2020-10-07 11:01:34 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1799953 0 None None None 2020-07-10 13:53:54 UTC

Description Sandro Bonazzola 2018-09-25 14:06:01 UTC
+++ This bug was initially created as a clone of Bug #1343571 +++

Description of problem:
Current packaging of cloud-initramfs-tools only supports expansion of disk hosting "/" if "/" is hosted on a disk that is either wholly unpartitioned or is partitioned with standard (primary/logical/extended). Currently, there is no support for expansion of partitions containing an LVM-hosted "/".

Note: some security compliance suites (e.g., DISA STIGs) mandate the use of a specific minimum set of partitions implemented via LVM2. 

Version-Release number of selected component (if applicable):

dracut-modules-growroot version 0.20-2
cloud-utils-growpart version 0.27-10

Tested on RHEL 6.7 & 6.8 as well as CentOS 6.7 and 6.8 (hosted within AWS)

How reproducible:
Nothing to reproduce: it's in the package design

Steps to Reproduce:
1. Launch cloud instance with LVM-partitioned root filesystem - setting root disk size greater than template-size
2. Install dracut-modules-growroot
3. Reboot: 

Actual results:
When system comes back from reboot, partition hosting the root volume-group remains the same size

Expected results:
Partition containing the root volume group expands

Additional info:
A slight modification to the /usr/share/dracut/modules.d/50growroot/growroot.sh file to add logic for finding what partition hosts "/" will allow the final:

if out=$(growpart --update off "${rootdisk}" "${partnum}" 2>&1) ; then
                _info "${out}"

statement to function, correctly. As a quick-n-dirty work-around, I've changed the original snippet:

_growroot() {
        # Remove 'block:' prefix and find the root device
        rootdev=$(readlink -f "${root#block:}")


with:

> _growroot() {
> 	# Compute root-device
> 	if [ -z "${root##*mapper*}" ]
> 	then
> 		set -- "${root##*mapper/}"
> 		VOLGRP=${1%-*}
> 		ROOTVOL=${1#*-}
> 		rootdev=$(readlink -f $(pvs --noheadings | awk '/'${VOLGRP}'/{print $1}'))
> 		_info "'/' is hosted on an LVM2 volume: setting \$rootdev to ${rootdev}"
> 	else
> 		# Remove 'block:' prefix and find the root device
> 		rootdev=$(readlink -f "${root#block:}")
> 	fi


In mine. Obviously, it assumes that "/" will never span multiple PVs, so, probably wants some cleanup.

Further note: while the above code-change allows the grow-root against the partition containing the PV hosting "/" to succeed, it typically requires a reboot to fully-effect: first boot grows what is seen by sfdisk; second boot grows what is seen by lsblk (and pvresize).

Comment 4 Eduardo Otubo 2020-10-07 11:01:34 UTC
It's too late to add this capability to RHEL 7.9 and RHEL 7 in general is in maintenance support phase. We'll look at this in RHEL-8 (refer to bug 1810878).


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