There is a lot of confusing information in the above comments.
To sum up the solution that I'll be uploading shortly, for precise we did:
 * add to cloud-initramfs-growroot a 'udevadm settle' before invoking growpart 
to apply the change.  This ensures that any disk events for the root block 
device are finished before sfdisk is run.
 * in cloud-utils's growpart, use '--no-reread' argument to sfdisk when making 
changes to the disk.

** Description changed:

  Not a dupe of bug 906722, but it seems very similar.
  
  Occasionally on openstack clouds, we're seeing the root partition not
  being/grown on first-boot as it should be.
  
  This was reported, and I have observed it on precise alpha-2 and will
  attach console logs.  It happens sporadically.
  
  The output of the relevant section of initramfs in the failed case looks
  like this:
  
  | Begin: Running /scripts/init-premount ... done.
  | Begin: Mounting root file system ... Begin: Running /scripts/local-top ... 
done.
  | Begin: Running /scripts/local-premount ... done.
  | [    0.940836] EXT4-fs (vda1): mounted filesystem with ordered data mode. 
Opts: (null)
  | Begin: Running /scripts/local-bottom ... [    0.955771] FDC 0 is a S82078B
  | [    1.012874]  vda: vda1
  | GROWROOT: WARNING: resize failed: FAILED: failed to resize
  | ***** 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 ****
  | [    1.114017] EXT4-fs (vda1): mounted filesystem with ordered data mode. 
Opts: (null)
  | done.
  | done.
  | Begin: Running /scripts/init-bottom ... done.
  
  In the successful case, it looks like this:
  
  | Begin: Running /scripts/init-premount ... done.
  | Begin: Mounting root file system ... Begin: Running /scripts/local-top ... 
done.
  | Begin: Running /scripts/local-premount ... done.
  | [    1.035664] EXT4-fs (vda1): mounted filesystem with ordered data mode. 
Opts: (null)
  | Begin: Running /scripts/local-bottom ... [    1.052365] FDC 0 is a S82078B
  | [    1.094201]  vda: vda1
  | [    1.135831]  vda: vda1
  | GROWROOT: CHANGED: partition=1 start=16065 old: size=4176900 end=4192965 
new: size=20948760,end=20964825
  | [    1.164067] Refined TSC clocksource calibration: 2532.595 MHz.
  | [    1.202383] EXT4-fs (vda1): mounted filesystem with ordered data mode. 
Opts: (null)
  | done.
  | done.
  | Begin: Running /scripts/init-bottom ... done.
  
  The code that is running here is growroot/scripts/local-bottom/growroot
  [1], growpart is part of cloud-utils [2].
  
  Other relevant info, in at least one case, a reboot got the partition
  resized.
  
  --
  [1] 
http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/precise/cloud-initramfs-tools/precise/view/head:/growroot/scripts/local-bottom/growroot
  [2] 
http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/precise/cloud-utils/precise/view/head:/bin/growpart
+ 
+ 
+ Related bugs:
+  * bug 942788: sfdisk without --no-reread is likely to cause race conditions

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

Title:
  root partition may not be grown

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

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to