[Gptfdisk-general] strange sgdisk failure on ppc64el
Brought to you by:
srs5694
From: Scott M. <sm...@ub...> - 2014-02-26 15:55:32
|
Hi, We use gptfdisk (sgdisk) from growpart to grow gpt disks on boot grow the mounted root filesystem. It may sound crazy, but it works really well. We're seeing an issue on ppc64el systems with gpt partition tables. This reproduces only occasionally. I've opened an ubuntu bug at https://bugs.launchpad.net/ubuntu/+source/gdisk/+bug/1285197 The failure we saw was this (we only have logs), and subsequent run of identical 'growpart' finished fine: command: growpart /dev/sda 1 exit code: 2 stdout: 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 **** Note there the odd '1 from 40532396646334464 to 0'. I'm wondering if you've seen anything like this. I think its only fair to point out: a.) this occured on a ppc64el guest running on ppc64 under kvm. Its a new platform, and its possible that there are issues in kvm or the underlying virtual hardware. b.) it doens't occur that often c.) in ppc64el the 'el' is "little endian". All that said, most of the time it works fine. To generally reproduce what is going on here via use of /dev/loop0, we can do the following. Obviously you're not stressing the whole stack that was in play (not running a ppc64el guest or kernel). imgurl="http://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-ppc64el-gpt1.img" imgdist="${imgurl##*/}" wget "$imgurl" -O "$imgdist" qemu-img convert -O raw "$imgdist" my.img qemu-img resize my.img 10G LODEV="/dev/loop0" sudo losetup $LODEV "$PWD/my.img" mkdir ./mp sudo mount ${LODEV}p1 ./mp sudo growpart "$LODEV" 1 sudo umount ./mp sudo losetup -d "$LODEV" Thoughts? Scott |