cloud-init should run resize2fs in the background

Bug #961226 reported by Alex Bligh
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Fix Released
Low
Unassigned
cloud-init (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

cloud-init should run resize2fs in the background. In a development environment I am looking at, the resize takes 2 minutes. Scott Moser pointed out that as it runs on a mounted file system, there is no reason not to complete the boot process whilst it runs.

Related branches

Revision history for this message
Alex Bligh (ubuntu-alex-org) wrote :

The particular development platform I was trying this has an I/O speed about the same as a floppy disk drive, so this is perhaps not as important as one might think. However, it might still be useful as a feature to speed up boot time.

Revision history for this message
Scott Moser (smoser) wrote :

I've decided to turn this into a config option and leave it off by default (block on resize2fs).

this is pretty much worst possible scenario for io
 * on disk file was stored as 1.4G ish (possibly larger, but sparse)
 * hypervisor grows it to some larger size (10 or 20G or something) but probably leaves it sparse.
 * initramfs grew the partition table on the disk
 * resize2fs is run, which does loads of reads and writes
 * at the same time the system is under intense IO to boot itself.

The end result is that it changes people's expectation and possibly doesn't save much (my very small number of non-scientific tests showed small savings at best). But clearly, if you were resizing to 100G, that might take 5 minutes, and you might be able to finish boot and use the system during 4 of that 5.

So, I've just committed a change to allow this to be set by a user by setting cloud-config 'resize_rootfs' to a value of 'noblock'.

Changed in cloud-init:
status: New → Fix Committed
importance: Undecided → Low
Changed in cloud-init (Ubuntu):
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 0.6.3~bzr551-0ubuntu1

---------------
cloud-init (0.6.3~bzr551-0ubuntu1) precise; urgency=low

  * New upstream snapshot.
    * support running resize2fs in the background (default=off) (LP: #961226)
 -- Scott Moser <email address hidden> Thu, 22 Mar 2012 14:33:59 -0400

Changed in cloud-init (Ubuntu):
status: Triaged → Fix Released
Scott Moser (smoser)
Changed in cloud-init:
status: Fix Committed → Fix Released
Revision history for this message
James Falcon (falcojr) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.