Red Hat Bugzilla – Bug 1314587
Partition re-size bug for 64GB and larger sd cards
Last modified: 2016-12-20 14:13:56 EST
Description of problem:
We have a Fedora remix, FedBerry (specifically for the Rasppberry Pi 2B) that uses a python script (rootfs-resize) to automatically resize the rootfs partition on first boot. rootfs-resize itself relies on pyparted to make all the relevant partitioning modifications (i.e to grow the last partition on the sd card). See: https://github.com/ctyler/rootfs-resize
One of our users recently describe a problem whereby the resize script does not work correctly when used on sd cards that are > 32 GB. See: github.com/fedberry/fedberry/issues/8
I haven't delved into the relevant pyparted functions but as mentioned in the above issue, I can see when root.getMaxGeometry(constraint).end is called, it returns an incorrect value for my card. I'm not exactly sure if there is a problem with defining the constraint or if there is a deeper issue within pyparted.
If you need any more info (in addition to what is already posted to github.com/fedberry/fedberry/issues/8, then please just ask and I will try to help where I can.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Use 64 GB or larger SD card
2. root.getMaxGeometry(constraint).end returns incorrect value
Corrupted filesystem table and unusable SD card due to incorrect geometry value...
We start seeing problems when rootfs-resize calls the getMaxGeometry() (pyparted function in 'Partition' class) and it returns an incorrect end geometry value for the partition. I would have expect this value would be approximately (exactly?) the 'maxSize' returned from optimalAlignedConstraint() but alas, its not (98703359 vs 124735488 sectors).
parted.Constraint instance --
startAlign: <parted.alignment.Alignment object at 0x744d4c10> endAlign: <parted.alignment.Alignment object at 0x744d4bf0>
startRange: <parted.geometry.Geometry object at 0x744d4cd0> endRange: <parted.geometry.Geometry object at 0x744d4cf0>
minSize: 1 maxSize: 124735488
PedConstraint: <_ped.Constraint object at 0x744e1308>
Other arguments passed to setPartitionGeometry() seem ok.
root.getMaxGeometry(constraint).end should return correct disk geometries
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora 'version'
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.
Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 23 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
Thank you for reporting this bug and we are sorry it could not be fixed.