error resizing root filesystem

Bug #880984 reported by Scott Moser
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init (Ubuntu)
Invalid
Undecided
Unassigned
e2fsprogs (Debian)
Fix Released
Unknown
e2fsprogs (Ubuntu)
Fix Released
High
Scott Moser

Bug Description

I launched a cloud-image of precise on openstack and saw in cloud-init log:

011-10-24 17:12:45,578 - cc_resizefs.py[DEBUG]: resizing root filesystem (type=ext4, maj=253, min=1)
2011-10-24 17:12:45,582 - cc_resizefs.py[WARNING]: Failed to resize filesystem (['resize2fs', '/tmp/tmpiTX_2n'])
2011-10-24 17:12:45,583 - cc_resizefs.py[WARNING]: output=Filesystem at /tmp/tmpiTX_2n is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 1

error=resize2fs 1.42-WIP (9-Oct-2011)
resize2fs: Inappropriate ioctl for device While checking for on-line resizing support

2011-10-24 17:12:45,590 - __init__.py[WARNING]: Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/cloudinit/CloudConfig/__init__.py", line 108, in run_cc_modules
    cc.handle(name, run_args, freq=freq)
  File "/usr/lib/python2.7/dist-packages/cloudinit/CloudConfig/__init__.py", line 72, in handle
    [ name, self.cfg, self.cloud, cloudinit.log, args ])
  File "/usr/lib/python2.7/dist-packages/cloudinit/__init__.py", line 309, in sem_and_run
    func(*args)
  File "/usr/lib/python2.7/dist-packages/cloudinit/CloudConfig/cc_resizefs.py", line 74, in handle
    (out,err) = util.subp(resize_cmd)
  File "/usr/lib/python2.7/dist-packages/cloudinit/util.py", line 148, in subp
    raise subprocess.CalledProcessError(sp.returncode,args, (out,err))
CalledProcessError: Command '['resize2fs', '/tmp/tmpiTX_2n']' returned non-zero exit status 1

2011-10-24 17:12:45,590 - __init__.py[ERROR]: config handling of resizefs, None, [] failed

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: cloud-init 0.6.1-0ubuntu22
ProcVersionSignature: User Name 3.1.0-1.1-virtual 3.1.0-rc10
Uname: Linux 3.1.0-1-virtual x86_64
ApportVersion: 1.24-0ubuntu1
Architecture: amd64
Date: Mon Oct 24 17:23:36 2011
Ec2AMI: ami-000000da
Ec2AMIManifest: FIXME
Ec2AvailabilityZone: nova
Ec2InstanceType: m1.small
Ec2Kernel: unavailable
Ec2Ramdisk: unavailable
PackageArchitecture: all
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: cloud-init
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

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

This is reproducible well after boot, with:
$ sudo resize2fs /dev/vda1
resize2fs 1.42-WIP (9-Oct-2011)
Filesystem at /dev/vda1 is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 1
resize2fs: Inappropriate ioctl for device While checking for on-line resizing support

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

Note a few things:
a.) /dev/vda has has been grown during first boot, its partition table rewritten
   GROWROOT: CHANGED: partition=1 start=16065 old: size=4176900 end=4192965 new: size=20948760,end=20964825

   $ sudo sfdisk -g /dev/vda
   /dev/vda: 20805 cylinders, 16 heads, 63 sectors/track
   $ sudo sfdisk -l -uS /dev/vda

   Disk /dev/vda: 20805 cylinders, 16 heads, 63 sectors/track
   Warning: The partition table looks like it was made
     for C/H/S=*/255/63 (instead of 20805/16/63).
   For this listing I'll assume that geometry.
   Units = sectors of 512 bytes, counting from 0

      Device Boot Start End #sectors Id System
   /dev/vda1 * 16065 20964824 20948760 83 Linux
   /dev/vda2 0 - 0 0 Empty
   /dev/vda3 0 - 0 0 Empty
   /dev/vda4 0 - 0 0 Empty

b.) this does not occur for the ext3 (not ext4) filesystem on /dev/vdb
c.) this same error does not occur on oneiric

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

more info. I booted an oneiric system with userdata containing :
#cloud-config
cloud_init_modules:
 - bootcmd
 - set_hostname
 - update_hostname
 - update_etc_hosts
 - rsyslog
 - ssh

Essentially that stops cloud-init from doing the resize2fs on boot, so I can subsequently install other packages and try. Heres what I found, after install e2fsprogs, e2fslibs, libcom, libss2 of the appropriate versions:

BOOT_SYS| e2fsprogs | result
precise_| debian | PASS
oneiric_| debian | PASS
precise_| precise | FAIL
precise_| oneiric | PASS

debian e2fsprogs: 1.42~WIP-2011-10-16-1
precise e2fsprogs: 1.42~WIP-2011-10-09-1ubuntu1
oneiric e2fsprogs: 1.41.14-1ubuntu3

So, this seems to be squarely a regression in the ubuntu delta from debian *and* the ubuntu deleta oneiric -> precise.

Changed in e2fsprogs (Ubuntu):
importance: Undecided → High
status: New → Confirmed
Changed in cloud-init (Ubuntu):
status: New → Invalid
Revision history for this message
Scott Moser (smoser) wrote :

Just noticed i was not comparing ubuntu version to debian version of the same. We're behind debian by 7 days in a WIP snapshot, that changelog contained:

e2fsprogs (1.42~WIP-2011-10-16-1) unstable; urgency=low
  * New upstream release
  * Fix online resizing with resize2fs (Closes: #644989)

So, we need that.

Changed in e2fsprogs (Ubuntu):
status: Confirmed → Triaged
Scott Moser (smoser)
Changed in e2fsprogs (Ubuntu):
assignee: nobody → Scott Moser (smoser)
Changed in e2fsprogs (Debian):
status: Unknown → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package e2fsprogs - 1.42~WIP-2011-10-16-1ubuntu1

---------------
e2fsprogs (1.42~WIP-2011-10-16-1ubuntu1) precise; urgency=low

  * Merge from Debian unstable, remaining changes:
    - debian/control: Do not build-depend on dietlibc-dev, which is universe.
    - debian/rules:
      + Do now allow pkg-create-dbgsym to operate on this package.
  * fix online resizing bug (LP: #880984)
 -- Scott Moser <email address hidden> Mon, 24 Oct 2011 17:00:17 -0400

Changed in e2fsprogs (Ubuntu):
status: Triaged → Fix Released
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.