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 1423357 - Backport resizepart command from parted 3.1.90
Summary: Backport resizepart command from parted 3.1.90
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: parted
Version: 7.4
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Brian Lane
QA Contact: Release Test Team
Petr Bokoc
URL:
Whiteboard:
Depends On:
Blocks: 1420851 1478303
TreeView+ depends on / blocked
 
Reported: 2017-02-17 05:39 UTC by Abhishek Karvi
Modified: 2020-04-15 15:18 UTC (History)
12 users (show)

Fixed In Version: parted-3.1-29
Doc Type: Enhancement
Doc Text:
*parted* can now resize partitions using the "resizepart" command The ability to resize disk partitions using the "resizepart NUMBER END" command is now backported to the *parted* disk partitioning utility distributed with Red Hat Enterprise Linux 7. See the *parted(8)* man page for information. Note that this command only resizes partitions, not file systems residing on them. Use file system utilities such as *resize2fs* to grow or shrink file systems.
Clone Of:
Environment:
Last Closed: 2018-04-10 17:40:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0948 0 None None None 2018-04-10 17:41:19 UTC

Description Abhishek Karvi 2017-02-17 05:39:32 UTC
Description of problem:

currently unable to resize partitions using parted utility.
option to resize partitions was removed from parted.
cu would like to use resize option in parted instead of deleting and recreating partitions using fdisk.

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

parted version 3.1

Additional info:

option to resize partitions was removed from parted.
cu would like to use resize option in parted instead of deleting and recreating partitions using fdisk.
this was requested by cu in case # 01778631

Comment 2 Brian Lane 2017-02-17 17:21:38 UTC
Upstream removed the filesystem resize feature and moved it into a library. It will not be added back into parted. If you want to resize filesystems use a tool provided by the filesystem.

My opinion, as I have stated in previous bugs for this, is that since parted does not closely track filesystem development it is dangerous to depend on it for resizing your filesystems. Use the tools created for that purpose by the filesystem creators.

Comment 3 Red Hat Bugzilla Rules Engine 2017-02-17 17:21:44 UTC
Development Management has reviewed and declined this request. You may appeal this decision by reopening this request.

Comment 4 Joerg K 2017-02-24 18:36:58 UTC
(In reply to Brian Lane from comment #2)
> Upstream removed the filesystem resize feature and moved it into a library.
> It will not be added back into parted. If you want to resize filesystems use
> a tool provided by the filesystem.

Well, the [documentation](https://www.gnu.org/software/parted/manual/parted.html) of parted stated in section 2.4 that the resize command is removed after version 2.4. But a new option called [resizepart](https://www.gnu.org/software/parted/manual/parted.html#resizepart) was added instead. This option offers the exact functionality I would like to use.

Because filesystem tools like `resize2fs` could only grow a filesystem to the boundary of the partition the `resizepart` command is needed to moves the end of a partition number first. Of course in case of shrinking a partition you have to use tools like `resize2fs` first to shrink the filesystem, before you shrink the partition with `resizepart`.

> My opinion, as I have stated in previous bugs for this, is that since parted
> does not closely track filesystem development it is dangerous to depend on
> it for resizing your filesystems. Use the tools created for that purpose by
> the filesystem creators.

To avoid a misunderstanding. I would not use parted to resize a filesystem. But I would like to use it to resize the partition in which the filesystems live. The solution of using fdisk to resize a partition as suggested in the [storage administration guide section 12.4](https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html-single/Storage_Administration_Guide/index.html#s2-disk-storage-parted-resize-part) is imho much worse than using parted with the resizepart command.

Please, reconsider adding parted with the resizepart command to rhel 7.

Comment 5 Brian Lane 2017-02-24 21:54:35 UTC
Ah! Sorry, I thought you meant the combined filesystem and partition resize.

It looks like this would need these commits backported:

5c79385 - Document resizepart command
56bfbe2 - parted: Add stub resize command for backward compatibility
f09ca96 - libparted: Add support for partition resize
33fd692 - tests: excersise resize command
21c58e1 - parted: add resizepart command

It's a moderate amount of work, not a simple change, but it looks like it's mostly self-contained.

Comment 6 Joerg K 2017-02-25 07:10:36 UTC
Thank you for reconsidering. I'm looking forward to getting this feature.

Comment 8 Joerg K 2017-06-02 13:28:23 UTC
Hello Brian,

Today I had a look on the [RHEL 7.4 Beta Release Notes](https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7-Beta/html-single/7.4_Release_Notes/index.html). I couldn't find there any word from a new parted feature or version.

Does that mean that there won't be a backport of the resize feature from parted 3.1.90 in the next minor release? Or is the change just to small to be mentioned in the release notes and the backport will be available with the final release of 7.4?

Comment 9 Brian Lane 2017-06-02 14:42:38 UTC
(In reply to Joerg K from comment #8)
> Does that mean that there won't be a backport of the resize feature from
> parted 3.1.90 in the next minor release? Or is the change just to small to
> be mentioned in the release notes and the backport will be available with
> the final release of 7.4?

This change wasn't approved for 7.4, we will hopefully get it into 7.5

Comment 10 Joerg K 2017-06-06 06:40:06 UTC
(In reply to Brian Lane from comment #9)
> This change wasn't approved for 7.4, we will hopefully get it into 7.5

Ok, I got confused the version of this bug is 7.4 and target release 'rc'. Thanks for the update. I'm looking forward getting this change in 7.5.

Comment 16 Joerg K 2018-03-31 14:24:11 UTC
Hello,

I just want to let you know that I could successfully resize a partition with parted-3.1-29 in RHEL 7.5 Beta.

Thanks for this backport!
Joerg K.

Comment 18 errata-xmlrpc 2018-04-10 17:40:49 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://access.redhat.com/errata/RHBA-2018:0948

Comment 19 feeble 2018-06-05 21:17:21 UTC
I see this is closed. But I just wanted to add that this change has made it possible to run partprobe on the system partiton without error. In the past you would get a message similiar to this.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.

Now it actually re-reads the table. I am fine with this. But I jsut want to make sure that it does not cause issues with the system disk. I think it is fine.

Comment 20 Brian Lane 2018-06-05 23:09:48 UTC
Glad to hear it works. This included updating the partition sync code to the newer/better way of doing things so that's likely why you see the difference.


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