** Description changed: growpart uses sgdisk to resize gpt partition tables and then 'partx --update' to inform the kernel of those changes. an example usage of sgdisk ends up looking like this: - # Modify the partition table. all in one go (order is important!): - # - move the GPT backup header to the end of the disk - # - delete the partition - # - recreate the partition with the new size - # - set the partition code - # - set the partition GUID - # - set the partition name - sgdisk --move-second-header --delete=1 --new=1:18432:20971486 - --typecode=1:0FC63DAF-8483-4772-8E79-3D69D8477DE4 - --partition-guid=1:53FFEF70-1623-46CC-AFB7-EBC1EB5340F2 - '--change-name=1:Linux filesystem' /dev/sda + # Modify the partition table. all in one go (order is important!): + # - move the GPT backup header to the end of the disk + # - delete the partition + # - recreate the partition with the new size + # - set the partition code + # - set the partition GUID + # - set the partition name + sgdisk --move-second-header --delete=1 --new=1:18432:20971486 + --typecode=1:0FC63DAF-8483-4772-8E79-3D69D8477DE4 + --partition-guid=1:53FFEF70-1623-46CC-AFB7-EBC1EB5340F2 + '--change-name=1:Linux filesystem' /dev/sda We're seeing an issue on ppc64el systems with gpt partition tables. - This reproduces only occasionally. + This reproduces only occasionally. Note, when growpart runs, the partition it is updating is mounted. It does this to accomodate space at the end (a grow virtual disk). - - The failure we saw was this (we only have logs), and subsequent run of + The failure we saw was this (we only have logs), and subsequent run of 'growpart' finished fine: command: growpart /dev/sda 1 exit code: 2 stdout: - FAILED: disk=/dev/sda partition=1: failed to repartition + FAILED: disk=/dev/sda partition=1: failed to repartition stderr: - failed [sgdisk_mod:4] sgdisk --move-second-header --delete=1 - --new=1:18432:20971486 --typecode=1:0FC63DAF-8483-4772-8E79-3D69D8477DE4 - --partition-guid=1:53FFEF70-1623-46CC-AFB7-EBC1EB5340F2 - --change-name=1:Linux filesystem /dev/sda - Could not create partition 1 from 40532396646334464 to 0 - Could not change partition 1's type code to 0FC63DAF-8483-4772-8E79-3D69D8477DE4! - Unable to set partition 1's name to 'Linux filesystem'! - Error encountered; not saving changes. - ***** WARNING: Resize failed, attempting to revert ****** - ***** Appears to have gone OK **** + failed [sgdisk_mod:4] sgdisk --move-second-header --delete=1 + --new=1:18432:20971486 --typecode=1:0FC63DAF-8483-4772-8E79-3D69D8477DE4 + --partition-guid=1:53FFEF70-1623-46CC-AFB7-EBC1EB5340F2 + --change-name=1:Linux filesystem /dev/sda + Could not create partition 1 from 40532396646334464 to 0 + Could not change partition 1's type code to 0FC63DAF-8483-4772-8E79-3D69D8477DE4! + Unable to set partition 1's name to 'Linux filesystem'! + Error encountered; not saving changes. + ***** WARNING: Resize failed, attempting to revert ****** + ***** Appears to have gone OK **** Note there the odd '1 from 40532396646334464 to 0'. + + [Test Case] + + On a ppc64el system with a sacrificial GPT disk (because it will blow + away your /dev/sda1): + + while sudo sgdisk --delete=1 --new=1:18432:37748702 /dev/sda; do :; + done + + This will normally fail after less than 20 iterations, usually like + this: + + Could not create partition 1 from 40532396646334464 to 0 + + [Regression Potential] + + Very minimal. The patch just initialises an uninitialised variable, + which happens to usually (and on x86 apparently always) contain a benign + value. + ProblemType: Bug DistroRelease: Ubuntu 14.04 Package: cloud-guest-utils 0.27-0ubuntu7 ProcVersionSignature: User Name 3.13.0-12.32-generic 3.13.4 Uname: Linux 3.13.0-12-generic ppc64le ApportVersion: 2.13.2-0ubuntu5 Architecture: ppc64el Date: Wed Feb 26 14:50:02 2014 PackageArchitecture: all ProcEnviron: - TERM=xterm - PATH=(custom, no user) - XDG_RUNTIME_DIR=<set> - LANG=en_US.UTF-8 - SHELL=/bin/bash + TERM=xterm + PATH=(custom, no user) + XDG_RUNTIME_DIR=<set> + LANG=en_US.UTF-8 + SHELL=/bin/bash SourcePackage: cloud-utils UpgradeStatus: No upgrade log present (probably fresh install)
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1285197 Title: growpart failed in ppc64el guest To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gdisk/+bug/1285197/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
