[Bug 1244662] Re: growpart reverses changes because of partx failure

Scott Moser smoser at ubuntu.com
Wed Jan 8 03:48:03 UTC 2014


Attaching a seemingly working patch.

@Psusi,
  Could you please look at this patch and see if you think it is valid?  It seems to fix the issue for me.

  I'm not sure if the style is correct.  I chose to put the helper
function inside partx rather than in partitions.c where other helper
functions live (just for reference, I'll attach a patch that does that
too, but that requires exporting a new function in libblkid).


** Patch added: "util-linux-1244662.patch: suggested patch"
   https://bugs.launchpad.net/ubuntu/+source/cloud-utils/+bug/1244662/+attachment/3942963/+files/util-linux-1244662.patch

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to util-linux in Ubuntu.
https://bugs.launchpad.net/bugs/1244662

Title:
  growpart reverses changes because of partx failure

Status in “cloud-utils” package in Ubuntu:
  Confirmed
Status in “util-linux” package in Ubuntu:
  Confirmed

Bug description:
  growpart is failing to resize my virtual servers because partx fails
  to reload the partition table:

  root at pierce:~# growpart /dev/vda 3
  failed [pt_update:1] pt_update /dev/vda 3
  partx: /dev/vda: error updating partition 3
  FAILED: pt_resize failed
  ***** WARNING: Resize failed, attempting to revert ******
  Re-reading the partition table ...
  BLKRRPART: Device or resource busy
  The command to re-read the partition table failed.
  Run partprobe(8), kpartx(8) or reboot your system now,
  before using mkfs
  ***** Appears to have gone OK ****

  root at pierce:~# partx --update 3 /dev/vda
  partx: /dev/vda: error updating partition 3

  Apparently it tries to delete the partition, which fails because it's
  in use:

  ioctl(3, BLKPG, {BLKPG_DEL_PARTITION, flags=0, datalen=148, {start=0,
  length=0, pno=3, devname="", volname=""}}) = -1 EBUSY (Device or
  resource busy)

  partprobe doesn't do this, and it works fine, so when I edit
  pt_update() like this:

          #partx --update "$part" "$dev"
          partprobe "$dev"

  ... everything works as expected.

  Version numbers:
  cloud-guest-utils: 0.27-0ubuntu4
  Description:	Ubuntu 13.10
  Release:	13.10

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cloud-utils/+bug/1244662/+subscriptions



More information about the foundations-bugs mailing list