Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1515835 - growpart fails to resize partition on aarch64
Summary: growpart fails to resize partition on aarch64
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: cloud-utils
Version: 27
Hardware: aarch64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Juerg Haefliger
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-21 13:06 UTC by Sinny Kumari
Modified: 2019-09-19 07:01 UTC (History)
3 users (show)

Fixed In Version: cloud-utils-0.30-1.fc27
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-01-31 21:57:03 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Sinny Kumari 2017-11-21 13:06:11 UTC
Description of problem:
Resizing partition using gropwart seems to fail on aarch64.

Version-Release number of selected component (if applicable): cloud-utils-growpart-0.27-18.fc27.noarch

How reproducible:
To reproduce this problem, I am using Fedora 27 latest cloud-base qcow2 image - https://download.fedoraproject.org/pub/fedora-secondary/releases/27/CloudImages/aarch64/images/Fedora-Cloud-Base-27-1.6.aarch64.qcow2.

Created a disk disk-cloud.qcow2 with size 8G
$ qemu-img create -f qcow2 -b Fedora-Cloud-Base-27-1.6.aarch64.qcow2 disk-cloud.qcow2 8g

Now, boot newly created cloud image and run lsblk

$ lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda      8:0    0    8G  0 disk 
├─sda1   8:1    0  190M  0 part /boot/efi
└─sda2   8:2    0  3.8G  0 part /
sr0     11:0    1  366K  0 rom  

Try to resize /dev/sda2 partition gives error:
$ sudo growpart /dev/sda 2
GPT PMBR size mismatch (8388607 != 16777215) will be corrected by w(rite).
attempt to resize /dev/sda failed. sfdisk output below:
| GPT PMBR size mismatch (8388607 != 16777215) will be corrected by w(rite).
| Backup files:
|         PMBR (offset     0, size   512): /tmp/growpart.mc0Wnd/backup-sda-0x00000000.bak
|   GPT Header (offset   512, size   512): /tmp/growpart.mc0Wnd/backup-sda-0x00000200.bak
|  GPT Entries (offset  1024, size 16384): /tmp/growpart.mc0Wnd/backup-sda-0x00000400.bak
| 
| Disk /dev/sda: 8 GiB, 8589934592 bytes, 16777216 sectors
| Units: sectors of 1 * 512 = 512 bytes
| Sector size (logical/physical): 512 bytes / 512 bytes
| I/O size (minimum/optimal): 512 bytes / 512 bytes
| Disklabel type: gpt
| Disk identifier: F0A5E178-20AD-4F47-B6C8-78F5EC016911
| 
| Old situation:
| 
| Device      Start     End Sectors  Size Type
| /dev/sda1    2048  391167  389120  190M EFI System
| /dev/sda2  391168 8384511 7993344  3.8G Linux filesystem
| 
| >>> Script header accepted.
| >>> Script header accepted.
| >>> Script header accepted.
| >>> Script header accepted.
| >>> Script header accepted.
| >>> Script header accepted.
| >>> Created a new GPT disklabel (GUID: F0A5E178-20AD-4F47-B6C8-78F5EC016911).
| /dev/sda1: Created a new partition 1 of type 'EFI System' and of size 190 MiB.
| Partition #1 contains a vfat signature.
| /dev/sda2: The last usable GPT sector is 8388574, but 16777215 is requested.
| Failed to add #2 partition: Invalid argument
| Leaving.
| 
FAILED: failed to resize
***** WARNING: Resize failed, attempting to revert ******
512+0 records in
512+0 records out
512 bytes copied, 0.0119515 s, 42.8 kB/s
***** Appears to have gone OK ****

Additional Note: This can be reproduced with Fedora 27 Atomic CloudImage as well 
- https://download.fedoraproject.org/pub/alt/atomic/stable/Fedora-Atomic-27-20171110.1/CloudImages/aarch64/images/Fedora-Atomic-27-20171110.1.aarch64.qcow2

Comment 1 Sinny Kumari 2017-11-21 13:23:18 UTC
I did further investigation and found that using growpart from cloud-utils-0.28 (along with patch https://launchpadlibrarian.net/262778744/0001-fix-partx-invocation.patch ) or later versions work fine on aarch64.

I have gone through Changelog of cloud-utils-0.28 to figure out which change might have fixed it but couldn't figure out so far.

I see that 0.30 is the latest upstream version of cloud-utils, just wondering do we have plan to update with latest version in Fedora?

Comment 2 Dusty Mabe 2017-11-21 13:56:16 UTC
(In reply to Sinny Kumari from comment #1)
> I did further investigation and found that using growpart from
> cloud-utils-0.28 (along with patch
> https://launchpadlibrarian.net/262778744/0001-fix-partx-invocation.patch )
> or later versions work fine on aarch64.
> 

so does that mean cloud-utils-0.28 + the patch works? Or does cloud-utils-0.28 include the patch?

could we apply the patch to cloud-utils-0.27 and have it work?

Comment 3 Sinny Kumari 2017-11-21 14:16:31 UTC
(In reply to Dusty Mabe from comment #2)
> (In reply to Sinny Kumari from comment #1)
> > I did further investigation and found that using growpart from
> > cloud-utils-0.28 (along with patch
> > https://launchpadlibrarian.net/262778744/0001-fix-partx-invocation.patch )
> > or later versions work fine on aarch64.
> > 
> 
> so does that mean cloud-utils-0.28 + the patch works? Or does
> cloud-utils-0.28 include the patch?

cloud-utils-0.28 + the patch works(patch is part of 0.29 - http://bazaar.launchpad.net/~cloud-utils-dev/cloud-utils/trunk/view/head:/ChangeLog#L22). From Changelog of 0.28 release, I don't know yet what fixed it.

> could we apply the patch to cloud-utils-0.27 and have it work?

Comment 4 Dusty Mabe 2017-12-01 21:03:52 UTC
sinny, can you email juergh and copy me on it and we can see if we can get them to respond and look at our issue?

Comment 5 Sinny Kumari 2017-12-04 09:16:29 UTC
(In reply to Dusty Mabe from comment #4)
> sinny, can you email juergh and copy me on it and we can see if we
> can get them to respond and look at our issue?

Yes, done!

Comment 6 Sinny Kumari 2017-12-13 15:09:30 UTC
(In reply to Sinny Kumari from comment #5)
> (In reply to Dusty Mabe from comment #4)
> > sinny, can you email juergh and copy me on it and we can see if we
> > can get them to respond and look at our issue?
> 
> Yes, done!

As per conversation on email with Juerg, updating cloud-utils package in Fedora to 0.30 version is a good idea. Pull Request with required patch to update to 0.30 is at https://src.fedoraproject.org/rpms/cloud-utils/pull-request/1

Comment 7 Fedora Update System 2017-12-21 09:15:57 UTC
cloud-utils-0.30-1.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-6ad062c8ff

Comment 8 Fedora Update System 2017-12-21 20:26:59 UTC
cloud-utils-0.30-1.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-6ad062c8ff

Comment 9 Fedora Update System 2018-01-31 21:57:03 UTC
cloud-utils-0.30-1.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.


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